@sentry/junior 0.319.0 → 0.321.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-8_S6Birm.js → adapter-BkDQYdg6.js} +1 -1
- package/dist/{admin-EsbUON1j.js → admin-XS3G9BOj.js} +1 -1
- package/dist/{agent-CtzMl32d.js → agent-CL9ZkOgx.js} +45 -52
- package/dist/{agent-update-delivery-pAvsbuGL.js → agent-update-delivery-t0bXEgPs.js} +4 -4
- package/dist/api/schema.d.ts +4 -12
- package/dist/api/schema.js +4 -4
- package/dist/api.js +30 -25
- package/dist/{app-tACXxJPI.d.ts → app-CwFRvmEH.d.ts} +2 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +22 -219
- package/dist/{change-record-K-KsqNhT.d.ts → change-record-CRuG9Mu3.d.ts} +1 -6
- package/dist/{channel-access-DET5hzZM.js → channel-access-BUHB0saC.js} +1 -1
- package/dist/{chat-core-engine-DpM3tMVi.js → chat-core-engine-DuBaPbqK.js} +31 -14
- package/dist/cli/chat.js +16 -16
- package/dist/cli/check.js +4 -4
- package/dist/cli/main.js +2 -2
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.js +2 -2
- package/dist/{continue-in-slack-CFzDyxkH.js → continue-in-slack-D9naZmqM.js} +3 -3
- package/dist/{conversation-feed-DEUdD7mb.js → conversation-feed-B1_1NJc8.js} +2 -12
- package/dist/{conversation-privacy-C2vYK55O.js → conversation-privacy-C0mixZKx.js} +1 -1
- package/dist/{create-Ta3SEIB5.js → create-CLV0M1vw.js} +2 -2
- package/dist/{credential-sync-DyRqDmY4.js → credential-sync-DL9r-ry5.js} +11 -11
- package/dist/{db-BCaNWl9p.js → db-CbURDbaB.js} +49 -28
- package/dist/{deployment-CfOew1Tm.js → deployment-D9uPRDMD.js} +1 -1
- package/dist/{engine-context-CiExoy1B.js → engine-context-BP0h6u4m.js} +389 -13
- package/dist/{html-Bb2Si1bR.js → html-l4hKICAL.js} +4 -4
- package/dist/instrumentation.js +2 -2
- package/dist/{list-wwDcROh9.js → list-cGaO9_Hf.js} +12 -37
- package/dist/{logging-BRPTXAdf.js → logging-CqgOoICc.js} +1 -1
- package/dist/{markers-9QoqW5ov.js → markers-BtUv4-oc.js} +40 -37
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-vhL9b-PZ.js → oauth-callback-server-C3GxhsuB.js} +2 -2
- package/dist/{oauth-relay-CH2v7WiB.js → oauth-relay-BGm6sLCB.js} +1 -1
- package/dist/{profile-D9LdwmZi.js → profile-bLo0h7Le.js} +12 -6
- package/dist/{prompt-3TqxEOtc.js → prompt-CX29OGO9.js} +1 -1
- package/dist/{reports-K-tbtEyx.js → reports-DeDCCu_H.js} +2 -2
- package/dist/{resolve-BBV2qf8A.js → resolve-D9RKNH3v.js} +5 -5
- package/dist/{result-5IdGJP4M.js → result-BFBwK1M2.js} +7 -7
- package/dist/{runner-BK_joPlM.js → runner-DNdoVQg8.js} +7 -7
- package/dist/{sandbox-egress-signals-DXgWXXmm.js → sandbox-egress-signals-BBcCiEhm.js} +1 -1
- package/dist/{schema-zWGG6VC1.js → schema-RzsplzdI.js} +5 -3
- package/dist/{service-account-CateFyhw.js → service-account-B7E7OIFP.js} +2 -2
- package/dist/{skills-Ccjw8h2P.js → skills-DMJsS5e4.js} +4 -4
- package/dist/{slack-conversation-unfurl-ZC_TSpc4.js → slack-conversation-unfurl-EWYTnBZI.js} +7 -7
- package/dist/{storage-C9U7R5rM.js → storage-XD0lB4Gk.js} +2 -2
- package/dist/{system-prompt-table-YBTHIFlP.js → system-prompt-table-C886lsT9.js} +4 -4
- package/dist/{types-BNHkJrOP.js → types-CGgQ3-Bb.js} +1 -9
- package/dist/{users-CCRAqYb_.js → users-DBrcQl47.js} +1 -1
- package/dist/{validation-BCUpJa8K.js → validation-CofUHWqz.js} +1 -1
- package/dist/{version-BNm0JYj3.js → version-D_vbXyNw.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{worker-BhgpZ7_b.js → worker-buhFcpl9.js} +4 -4
- package/migrations/20261127150242_drop_space_members/migration.sql +9 -0
- package/migrations/20261127150242_drop_space_members/snapshot.json +53 -0
- package/package.json +6 -6
package/dist/api.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { n as getAttachmentStorage } from "./storage-
|
|
2
|
-
import { $ as canActOnInboxItem, $
|
|
3
|
-
import { T as withSpan, f as logException, g as runBestEffort, m as logWarn, p as logInfo, v as setSentryUser } from "./logging-
|
|
4
|
-
import { $n as updateViewerAutomation, $t as decodeImageId, At as resolveObjectLinkNow, B as listOwnedWatches, Cr as closeBreaker, Dn as createAttachmentUpload, Dt as OBJECT_LINK_TTL_MS, Fn as jsonResponse, G as getSpaceLead, I as reportConversationRead, In as throwApiError, J as getProductionSlackAdapter, Jn as activateViewerAutomationVersion, Kt as conversationSummaryFromStoredConversation, Ln as readSlackAttachmentSource, M as setConversationArchive, N as stopArchivedWork, Nt as viewerCanViewPluginLink, Ot as readLinkObjectType, Pn as emptyResponse, Pt as guardedFetch, Qt as IMAGE_WIDTHS, Rt as resolvePersonLink, Sr as breakerStates, Tn as AttachmentUploadError, Vn as readLiveAttachment, W as postSlackDetachNotice, Xn as deleteViewerTask, Xt as createViewerMcp, Yn as changeViewerAutomationLifecycle, Yt as readFirstHumanMessageTexts, Zn as readViewerAutomationEdit, _n as updateSpace, a as AttachmentDownloadError, ar as readViewerAutomationSummary, br as addStats, cr as AutomationEditError, dt as readConversationEventPage, er as ViewerTaskNotFoundError, fr as viewerAutomationCollection, gn as readSpace, gt as reportParentAgentInput, hn as listSpaces, ir as readViewerAutomationRuns, jn as inviteToConversation, jr as listSpaceConfiguration, jt as resolveObjectLinks, kn as writeAttachmentUpload, kt as readObjectLinkTypes, mn as createSpace, o as readAttachmentContent, or as readViewerAutomationVersions, pr as SAVINGS_NAMESPACE, rr as readViewerAutomationExecutions, s as previewOriginBelongsTo, sr as readViewerAutomations, tr as collectionRowTitle, ut as transcriptEntriesFromReportEvents, vn as acceptsWebMessages, wn as webActorFromUser, wr as connectedState, xr as readStats, yr as savingsTotals } from "./agent-
|
|
5
|
-
import { At as spaceListQuerySchema, B as conversationDetailQuerySchema, C as automationScheduleIntentSchema, D as automationVersionActivateSchema, E as automationUpdateSchema, G as conversationParamsSchema, It as updateSpaceBodySchema, L as conversationAttachmentParamsSchema,
|
|
6
|
-
import { $ as userSearchQuerySchema, $t as conversationChildAgentsReportSchema, A as cacheHealthQuerySchema, At as startConnectionResponseSchema, B as serviceAccountParamsSchema, Bt as codeRepositoryQuerySchema, C as inboxSnoozeResourceQuerySchema, Ct as pushSubscriptionBodySchema, D as inboxSnoozeWakesClearSchema, Dt as connectionParamsSchema, E as inboxSnoozeSubjectSchema, Et as connectionListSchema, F as cacheWarmingSavingsRefillResponseSchema, G as createPersonalTokenBodySchema, Gt as conversationTodoSchema, H as startServiceAccountSignInResponseSchema, I as cacheWarmingSavingsReportSchema, Jt as todoStatusBodySchema, K as createdPersonalTokenSchema, Kt as conversationTodosReportSchema, L as closeCacheWarmingBreakerResponseSchema, Lt as codeOverviewReportSchema, M as cacheWarmingBreakerListSchema, N as cacheWarmingBreakerParamsSchema, Nt as codeChangeSearchQuerySchema, O as gatewayProvidersSchema, P as cacheWarmingSavingsQuerySchema, Pt as codeChangeSearchReportSchema, R as disconnectServiceAccountResponseSchema, Rt as codePersonReportSchema, S as inboxSnoozeCreateSchema, St as notificationSettingsSchema, T as inboxSnoozeSchema, Tt as testNotificationResponseSchema, U as searchQuerySchema, Vt as codeRepositoryReportSchema, W as searchReportSchema, Wt as personCodeQuerySchema, X as revokePersonalTokenResponseSchema, Xt as conversationWatchesReportSchema, Y as personalTokenParamsSchema, Zt as watchParamsSchema, _ as inboxItemListSchema, _n as acceptedConversationMessageSchema, _t as locationParamsSchema, a as statsReportSchema, an as objectLinksQuerySchema, at as avatarParamsSchema, b as inboxItemWaitingConversationsSchema, bn as forkConversationBodySchema, bt as activitySixHours$1, c as workspaceBodySchema, ct as peopleSearchReportSchema, dn as conversationDeliveryResponseSchema, dt as personalSpendReportSchema, en as continueConversationInSlackBodySchema, et as userSearchReportSchema, f as workspaceSchema, fn as conversationCatchUpBodySchema, g as inboxItemListQuerySchema, gn as createAttachmentUploadBodySchema, gt as locationDirectoryReportSchema, h as inboxItemCountSchema, hn as attachmentUploadSchema, ht as locationDetailReportSchema, in as attachObjectLinkResponseSchema, it as actorProfileReportSchema, j as cacheHealthReportSchema, k as updateGatewayProvidersBodySchema, kt as disconnectConnectionResponseSchema, l as workspaceListSchema, ln as conversationOutlineSchema, lt as personCardReportSchema, m as inboxItemCountQuerySchema, mn as attachmentUploadParamsSchema, n as versionsQuerySchema, on as objectLinksReportSchema, p as inboxItemActionSchema, pn as conversationCatchUpSchema, pt as spaceConfigurationSchema, q as personalTokenListSchema, qt as todoParamsSchema, r as versionsSchema, rn as attachObjectLinkBodySchema, rt as actorDirectoryReportSchema, s as deleteWorkspaceResponseSchema, sn as conversationStatsReportSchema, st as peopleSearchQuerySchema, tn as continueConversationInSlackResponseSchema, u as workspaceParamsSchema, un as conversationDeliveryBodySchema, ut as personParamsSchema, v as inboxItemParamsSchema, vn as createConversationBodySchema, vt as activityDays$1, w as inboxSnoozeResourceSchema, wt as pushSubscriptionDeleteBodySchema, xn as forkConversationResponseSchema, y as inboxItemSchema, yn as createConversationMessageBodySchema, yt as activityHours$2, z as serviceAccountListSchema, zt as codeRepositoryParamsSchema } from "./schema-
|
|
7
|
-
import { A as conversationUnchangedDetailWithMailboxSchema, B as runtimeInfoReportSchema, M as steerConversationPendingMessagesResponseSchema, N as healthReportSchema, P as pluginOperationalReportFeedSchema, T as conversationDetailWithMailboxReportSchema, U as skillReportsSchema, V as skillDetailReportSchema, _ as reorderPinnedConversationsBodySchema, a as conversationInviteResponseSchema, i as conversationInviteBodySchema, j as steerConversationPendingMessagesBodySchema, k as conversationPendingMessagesReportSchema, n as conversationFeedSchema, t as conversationFeedQuerySchema, v as reorderPinnedConversationsResponseSchema, z as pluginsSchema } from "./conversation-feed-
|
|
8
|
-
import {
|
|
9
|
-
import { A as setConversationSubscriptionOperation, C as cancelQueuedMessagesOperation, D as renameConversationOperation, E as pinConversationOperation, J as resolveMentions, M as reorderPinnedConversations, N as apiOperationHandler, O as setConversationAutoArchiveOperation, Q as readInboxItemForUser, S as archiveDoneConversationsOperation, T as leaveConversationOperation, X as actOnInboxItem, Y as InboxItemActionError, _ as createConversationForViewer, a as resolveInboxItemSubjects, at as updateUserSettings, c as readConversationAuxiliaryCostsFromSql, d as conversationVersionsQuery, f as readConversationDetailEtag, g as appendConversationMessageForViewer, gt as startSavingsRefill, h as readConversationEvents, i as encodePageCursor, it as readUserSettings, j as stopConversationOperation, k as setConversationSpaceOperation, l as childAgentTotalsReport, m as keepQuickQuestionForViewer, mt as readSavingsRefill, n as readConversationFeed, o as readConversationDetail, p as forkConversationForViewer, pt as scheduleInboxSnoozeTimer, q as requireConversationPendingMessages, r as decodePageCursor, rt as DEFAULT_USER_SETTINGS, s as readConversationTreeStates, t as conversationFeedVersionQuery, u as readConversationTreeMetricsFromSql, v as requireWebMessageConversation, x as archiveConversationOperation, yt as readHealthReport } from "./list-
|
|
10
|
-
import { E as parseSlackChannelId, L as botConfig, O as parseSlackTeamId, R as getChatConfig, f as credentialContextForActor, i as getStateAdapter, u as withLock } from "./adapter-
|
|
11
|
-
import { i as continueConversationInSlack, r as canContinueInSlack, t as BUSY } from "./continue-in-slack-
|
|
1
|
+
import { n as getAttachmentStorage } from "./storage-XD0lB4Gk.js";
|
|
2
|
+
import { $ as canActOnInboxItem, $c as subjectKindDismissNote, $o as pauseConversationDelivery, Ac as countInboxItemsNeedingUserBySubject, As as isPublicConversation, B as conversationAggregateColumns, Bd as finishServiceAccountSignIn, Bl as fuzzyMatch, Bs as deletePushSubscription, Bt as setTodoStatusByUser, Dp as juniorConversationEvents, Dr as createConversationAccessReader, Ep as juniorConversationMetrics, Et as getRegistrations, Fa as AutomationConflictError, Fl as contentVersionHeaders, G as conversationStatusSql, Gd as startServiceAccountSignIn, Gl as scoredSearchMatches, Gp as juniorDestinations, Gs as isPausedBySlack, H as conversationUsageCostExpr, Hl as prefixMatch, Hp as slackPersonPredicate, Hs as readNotificationSchedule, Il as revalidateContent, Ir as rootVisibleToViewer, Ja as readAutomationTitlesByConversationId, Jc as inboxItemTitle, Jf as rootSpaceIdSql, Ju as completeText, K as conversationTurnFailedSql, Ll as memoryDb, Mc as listWaitingConversations, Mp as codeRepositorySearchDocument, Ms as readWebPushConfig, Nd as getAppContext, Nl as REVALIDATED_READ_PATHS, Np as juniorCodeChanges, Ns as sendPushNotificationToUser, Ot as apiRoutePrefix, Pl as contentVersion, Pp as juniorCodeRepositories, Ps as resolveNotificationTimezone, Qa as microUsdToUsd, Qc as questionLinks, Qf as topLevelConversation, Rl as searchTypedMemories, Rn as createInboxItemShow, Rp as juniorConversations, Rr as getVercelConversationWorkQueue, Sp as juniorConversationParticipants, Ss as upsertPluginAnnotation, Tl as getDashboardSettingsLink, Tt as getPlugins, U as conversationIsActiveSql, Uc as ownerConversationId, Ul as prefixRank, Up as slackPersonSearchDocument, Us as saveNotificationSchedule, V as conversationRangeColumns, Vd as getServiceAccountStatus, Vl as fuzzyRank, Vp as juniorIdentities, Vs as listPushSubscriptions, Wc as searchInboxItems, Wd as serviceAccountPlugins, Wl as rankSearchMatches, Wp as juniorUsers, Ws as savePushSubscription, Xc as INBOX_SUBJECT_KINDS, Xf as listedConversation, Y as conversationKindFromRow, Yc as itemQuestion, Za as microUsdSql, Zf as notLeadConversation, Zo as canPauseConversationDelivery, _c as updateViewerDisplayName, _l as settleInboxSnoozes, _p as juniorInboxItemConversations, _t as itemNeedsUser, a as getDb, aa as createPluginCache, ad as createCache, ap as todoFuzzyTitle, as as codeChangeSubjectProvider, bl as unsnoozeInboxRow, bp as juniorAgentBindings, cp as questionFuzzyTitle, cs as codeChangeUrl, dl as clearInboxWakeReasons, dp as automationFuzzyTitle, dt as inboxItemReaderForUserInConversation, el as subjectKindLabel, eo as usdToMicroUsdUnbiased, es as resumeConversationDelivery, fo as getEventCatalog, fp as automationSearchDocument, ft as inboxItemVisibleTo, gl as readViewerInboxSnoozes, gp as inboxItemSearchDocument, gs as annotationSubject, hc as resolveViewerUser, hp as inboxItemFuzzyTitle, ht as isOnlyAssignee, i as getConversationStore, id as cacheKeyPrefix, il as identityAvatarUrl, ip as juniorTodos, is as codeChangeSubjectKinds, jc as inboxItemsNeedingUserVersionQuery, jp as codeChangeSearchDocument, jr as readableSlackTeamId, ko as cancelWatch, kp as juniorApiTokens, kr as readConversationAccessFromSql, lc as findUserByEmail, lp as questionSearchDocument, ls as codeRepositoryUrl, mc as readViewerAvatarUrl, ml as inboxItemSnoozedBy, mn as steerWebPendingMessages, ms as ANNOTATION_SUBJECT_KINDS, mt as isInboxItemForEveryone, mu as automationEventCatalog, nd as readServedProviders, nl as subjectTodo, o as getSqlExecutor, ol as readAvatarFetch, op as todoSearchDocument, os as readSubjectLinks, pf as webActorUserIds, pl as inboxItemInRow, pp as juniorAutomations, qc as inboxItemRequest, qi as createPluginEmbedder, rd as saveEnabledProviders, rt as canUserReadInboxItem, sl as readUserAvatarUrls, sp as juniorQuestions, ss as subjectKey, st as inboxItemForUser, td as readEnabledProviders, ti as runWithSlackInstallation, tl as subjectKindPlugin, tt as canAnswerInboxItem, up as juniorAutomationRuns, us as linkedCodeProviders, ut as inboxItemReaderForUser, vl as snoozeInboxItems, vp as juniorInboxItems, vr as hasAssigneeRoles, vu as eventWatchUnavailable, w as loadConversationSlackTenantIds, wl as getDashboardPersonLink, yl as snoozeTimerTrigger, ys as listConversationAnnotations, zc as getInboxItem, zd as disconnectServiceAccount, zl as parseTypedQuery, zn as pushConversationInboxItemsNow, zt as listTodos } from "./db-CbURDbaB.js";
|
|
3
|
+
import { T as withSpan, f as logException, g as runBestEffort, m as logWarn, p as logInfo, v as setSentryUser } from "./logging-CqgOoICc.js";
|
|
4
|
+
import { $n as updateViewerAutomation, $t as decodeImageId, At as resolveObjectLinkNow, B as listOwnedWatches, Cr as closeBreaker, Dn as createAttachmentUpload, Dt as OBJECT_LINK_TTL_MS, Fn as jsonResponse, G as getSpaceLead, I as reportConversationRead, In as throwApiError, J as getProductionSlackAdapter, Jn as activateViewerAutomationVersion, Kt as conversationSummaryFromStoredConversation, Ln as readSlackAttachmentSource, M as setConversationArchive, N as stopArchivedWork, Nt as viewerCanViewPluginLink, Ot as readLinkObjectType, Pn as emptyResponse, Pt as guardedFetch, Qt as IMAGE_WIDTHS, Rt as resolvePersonLink, Sr as breakerStates, Tn as AttachmentUploadError, Vn as readLiveAttachment, W as postSlackDetachNotice, Xn as deleteViewerTask, Xt as createViewerMcp, Yn as changeViewerAutomationLifecycle, Yt as readFirstHumanMessageTexts, Zn as readViewerAutomationEdit, _n as updateSpace, a as AttachmentDownloadError, ar as readViewerAutomationSummary, br as addStats, cr as AutomationEditError, dt as readConversationEventPage, er as ViewerTaskNotFoundError, fr as viewerAutomationCollection, gn as readSpace, gt as reportParentAgentInput, hn as listSpaces, ir as readViewerAutomationRuns, jn as inviteToConversation, jr as listSpaceConfiguration, jt as resolveObjectLinks, kn as writeAttachmentUpload, kt as readObjectLinkTypes, mn as createSpace, o as readAttachmentContent, or as readViewerAutomationVersions, pr as SAVINGS_NAMESPACE, rr as readViewerAutomationExecutions, s as previewOriginBelongsTo, sr as readViewerAutomations, tr as collectionRowTitle, ut as transcriptEntriesFromReportEvents, vn as acceptsWebMessages, wn as webActorFromUser, wr as connectedState, xr as readStats, yr as savingsTotals } from "./agent-CL9ZkOgx.js";
|
|
5
|
+
import { At as spaceListQuerySchema, B as conversationDetailQuerySchema, C as automationScheduleIntentSchema, D as automationVersionActivateSchema, E as automationUpdateSchema, G as conversationParamsSchema, It as updateSpaceBodySchema, L as conversationAttachmentParamsSchema, Ln as apiErrorSchema, Mt as spaceParamsSchema, N as CONVERSATION_DETAIL_VERSION_HEADER, O as automationVersionListSchema, On as automationTaskText, Ot as archiveSpaceBodySchema, P as CONVERSATION_VERSION_HEADER, Pt as spaceSchema, R as conversationAttachmentQuerySchema, Rt as conversationReadPositionSchema, T as automationSummarySchema, U as conversationEventPageSchema, V as conversationDetailReportSchema, W as conversationEventsQuerySchema, _ as automationListQuerySchema, an as ScheduleIntentError, b as automationRunListSchema, c as automationEditSchema, g as automationListPageSchema, jn as notificationScheduleSchema, jt as spaceListSchema, k as automationVersionParamsSchema, kt as createSpaceBodySchema, l as automationEventCatalogSchema, m as automationLifecycleSchema, o as isOpenTodoStatus, on as compileScheduleIntent, pn as inboxItemQuestion, qt as MAX_ATTACHMENT_BYTES, s as automationEditErrorSchema, u as automationExecutionListSchema, w as automationSchedulePreviewSchema, y as automationParamsSchema } from "./types-CGgQ3-Bb.js";
|
|
6
|
+
import { $ as userSearchQuerySchema, $t as conversationChildAgentsReportSchema, A as cacheHealthQuerySchema, At as startConnectionResponseSchema, B as serviceAccountParamsSchema, Bt as codeRepositoryQuerySchema, C as inboxSnoozeResourceQuerySchema, Ct as pushSubscriptionBodySchema, D as inboxSnoozeWakesClearSchema, Dt as connectionParamsSchema, E as inboxSnoozeSubjectSchema, Et as connectionListSchema, F as cacheWarmingSavingsRefillResponseSchema, G as createPersonalTokenBodySchema, Gt as conversationTodoSchema, H as startServiceAccountSignInResponseSchema, I as cacheWarmingSavingsReportSchema, Jt as todoStatusBodySchema, K as createdPersonalTokenSchema, Kt as conversationTodosReportSchema, L as closeCacheWarmingBreakerResponseSchema, Lt as codeOverviewReportSchema, M as cacheWarmingBreakerListSchema, N as cacheWarmingBreakerParamsSchema, Nt as codeChangeSearchQuerySchema, O as gatewayProvidersSchema, P as cacheWarmingSavingsQuerySchema, Pt as codeChangeSearchReportSchema, R as disconnectServiceAccountResponseSchema, Rt as codePersonReportSchema, S as inboxSnoozeCreateSchema, St as notificationSettingsSchema, T as inboxSnoozeSchema, Tt as testNotificationResponseSchema, U as searchQuerySchema, Vt as codeRepositoryReportSchema, W as searchReportSchema, Wt as personCodeQuerySchema, X as revokePersonalTokenResponseSchema, Xt as conversationWatchesReportSchema, Y as personalTokenParamsSchema, Zt as watchParamsSchema, _ as inboxItemListSchema, _n as acceptedConversationMessageSchema, _t as locationParamsSchema, a as statsReportSchema, an as objectLinksQuerySchema, at as avatarParamsSchema, b as inboxItemWaitingConversationsSchema, bn as forkConversationBodySchema, bt as activitySixHours$1, c as workspaceBodySchema, ct as peopleSearchReportSchema, dn as conversationDeliveryResponseSchema, dt as personalSpendReportSchema, en as continueConversationInSlackBodySchema, et as userSearchReportSchema, f as workspaceSchema, fn as conversationCatchUpBodySchema, g as inboxItemListQuerySchema, gn as createAttachmentUploadBodySchema, gt as locationDirectoryReportSchema, h as inboxItemCountSchema, hn as attachmentUploadSchema, ht as locationDetailReportSchema, in as attachObjectLinkResponseSchema, it as actorProfileReportSchema, j as cacheHealthReportSchema, k as updateGatewayProvidersBodySchema, kt as disconnectConnectionResponseSchema, l as workspaceListSchema, ln as conversationOutlineSchema, lt as personCardReportSchema, m as inboxItemCountQuerySchema, mn as attachmentUploadParamsSchema, n as versionsQuerySchema, on as objectLinksReportSchema, p as inboxItemActionSchema, pn as conversationCatchUpSchema, pt as spaceConfigurationSchema, q as personalTokenListSchema, qt as todoParamsSchema, r as versionsSchema, rn as attachObjectLinkBodySchema, rt as actorDirectoryReportSchema, s as deleteWorkspaceResponseSchema, sn as conversationStatsReportSchema, st as peopleSearchQuerySchema, tn as continueConversationInSlackResponseSchema, u as workspaceParamsSchema, un as conversationDeliveryBodySchema, ut as personParamsSchema, v as inboxItemParamsSchema, vn as createConversationBodySchema, vt as activityDays$1, w as inboxSnoozeResourceSchema, wt as pushSubscriptionDeleteBodySchema, xn as forkConversationResponseSchema, y as inboxItemSchema, yn as createConversationMessageBodySchema, yt as activityHours$2, z as serviceAccountListSchema, zt as codeRepositoryParamsSchema } from "./schema-RzsplzdI.js";
|
|
7
|
+
import { A as conversationUnchangedDetailWithMailboxSchema, B as runtimeInfoReportSchema, M as steerConversationPendingMessagesResponseSchema, N as healthReportSchema, P as pluginOperationalReportFeedSchema, T as conversationDetailWithMailboxReportSchema, U as skillReportsSchema, V as skillDetailReportSchema, _ as reorderPinnedConversationsBodySchema, a as conversationInviteResponseSchema, i as conversationInviteBodySchema, j as steerConversationPendingMessagesBodySchema, k as conversationPendingMessagesReportSchema, n as conversationFeedSchema, t as conversationFeedQuerySchema, v as reorderPinnedConversationsResponseSchema, z as pluginsSchema } from "./conversation-feed-B1_1NJc8.js";
|
|
8
|
+
import { Mt as readUserCustomization, Nt as saveUserCustomization, Pt as addConversationNote, Xt as deleteWorkspace, Yt as createWorkspace, Zt as getWorkspace, an as workspaceRepoCheckoutPath, en as listWorkspaces, ht as parseEmail, i as listChildAgents, lr as createPluginEgress, nn as updateWorkspace, pt as isAllowedDomain, rn as WorkspaceValidationError, tn as listWorkspacesByRepository, un as isExperimentalFeatureEnabled } from "./markers-BtUv4-oc.js";
|
|
9
|
+
import { A as setConversationSubscriptionOperation, C as cancelQueuedMessagesOperation, D as renameConversationOperation, E as pinConversationOperation, J as resolveMentions, M as reorderPinnedConversations, N as apiOperationHandler, O as setConversationAutoArchiveOperation, Q as readInboxItemForUser, S as archiveDoneConversationsOperation, T as leaveConversationOperation, X as actOnInboxItem, Y as InboxItemActionError, _ as createConversationForViewer, a as resolveInboxItemSubjects, at as updateUserSettings, c as readConversationAuxiliaryCostsFromSql, d as conversationVersionsQuery, f as readConversationDetailEtag, g as appendConversationMessageForViewer, gt as startSavingsRefill, h as readConversationEvents, i as encodePageCursor, it as readUserSettings, j as stopConversationOperation, k as setConversationSpaceOperation, l as childAgentTotalsReport, m as keepQuickQuestionForViewer, mt as readSavingsRefill, n as readConversationFeed, o as readConversationDetail, p as forkConversationForViewer, pt as scheduleInboxSnoozeTimer, q as requireConversationPendingMessages, r as decodePageCursor, rt as DEFAULT_USER_SETTINGS, s as readConversationTreeStates, t as conversationFeedVersionQuery, u as readConversationTreeMetricsFromSql, v as requireWebMessageConversation, x as archiveConversationOperation, yt as readHealthReport } from "./list-cGaO9_Hf.js";
|
|
10
|
+
import { E as parseSlackChannelId, L as botConfig, O as parseSlackTeamId, R as getChatConfig, f as credentialContextForActor, i as getStateAdapter, u as withLock } from "./adapter-BkDQYdg6.js";
|
|
11
|
+
import { i as continueConversationInSlack, r as canContinueInSlack, t as BUSY } from "./continue-in-slack-D9naZmqM.js";
|
|
12
12
|
import { a as INPUT_IMAGE_TYPES, i as INLINE_VIDEO_TYPES, n as userCustomizationSchema, o as detectImageMediaType } from "./user-customization-CvfuY9Eo.js";
|
|
13
13
|
import { u as sentry_exports } from "./sentry-CPbZjomA.js";
|
|
14
14
|
import { _ as utcHourKey, c as HOUR_MS$3, d as fillUtcSixHours, f as startOfUtcHour, g as trailingUtcSixHourWindow, h as trailingUtcHourWindow, l as fillUtcDays, m as trailingUtcDayWindow, p as sumUtcHoursIntoSixHours, s as DAY_MS$3, u as fillUtcHours } from "./agent-status-Bq_AIpyp.js";
|
|
15
|
-
import { A as createUserTokenStore, n as hash, t as create, u as SANDBOX_RUNTIME } from "./profile-
|
|
16
|
-
import { a as isConnectableProvider, c as startConnection, i as disconnectConnection, o as listConnections, t as escapeHtml, u as htmlCallbackResponse } from "./html-
|
|
17
|
-
import { G as mapBounded, h as createPluginLogger } from "./prompt-
|
|
18
|
-
import { o as getSandboxResources, t as getCachedSnapshot } from "./resolve-
|
|
15
|
+
import { A as createUserTokenStore, n as hash, t as create, u as SANDBOX_RUNTIME } from "./profile-bLo0h7Le.js";
|
|
16
|
+
import { a as isConnectableProvider, c as startConnection, i as disconnectConnection, o as listConnections, t as escapeHtml, u as htmlCallbackResponse } from "./html-l4hKICAL.js";
|
|
17
|
+
import { G as mapBounded, h as createPluginLogger } from "./prompt-CX29OGO9.js";
|
|
18
|
+
import { o as getSandboxResources, t as getCachedSnapshot } from "./resolve-D9RKNH3v.js";
|
|
19
19
|
import { Hono } from "hono";
|
|
20
20
|
import * as z from "zod";
|
|
21
21
|
import path from "node:path";
|
|
@@ -1500,8 +1500,9 @@ async function cancelConversationWatchForViewer(viewer, conversationId, watchId)
|
|
|
1500
1500
|
// src/api/conversations/todos.ts
|
|
1501
1501
|
/** Closed To-dos that the report shows after the open ones. */
|
|
1502
1502
|
const RECENT_CLOSED_TODOS = 5;
|
|
1503
|
-
function reportTodo(todo, canViewPrivateContent) {
|
|
1503
|
+
function reportTodo(todo, canViewPrivateContent, viewer) {
|
|
1504
1504
|
const { assignee } = todo;
|
|
1505
|
+
const forViewer = assignee.kind === "user" && viewer !== void 0 && assignee.userId === viewer.id ? { viewer: true } : void 0;
|
|
1505
1506
|
return {
|
|
1506
1507
|
id: todo.id,
|
|
1507
1508
|
status: todo.status,
|
|
@@ -1511,13 +1512,17 @@ function reportTodo(todo, canViewPrivateContent) {
|
|
|
1511
1512
|
...todo.notes ? { notes: todo.notes } : void 0,
|
|
1512
1513
|
assignee: assignee.kind === "user" ? {
|
|
1513
1514
|
kind: "user",
|
|
1514
|
-
name: assignee.name ?? assignee.email
|
|
1515
|
+
name: assignee.name ?? assignee.email,
|
|
1516
|
+
...forViewer
|
|
1515
1517
|
} : assignee,
|
|
1516
1518
|
...todo.changedBy ? { changedBy: todo.changedBy.name ?? todo.changedBy.email } : todo.changedByAgent?.name ? { changedBy: todo.changedByAgent.name } : void 0
|
|
1517
1519
|
} : {
|
|
1518
1520
|
assignee: assignee.kind === "agent" ? {
|
|
1519
1521
|
kind: "agent",
|
|
1520
1522
|
conversationId: assignee.conversationId
|
|
1523
|
+
} : assignee.kind === "user" ? {
|
|
1524
|
+
kind: "user",
|
|
1525
|
+
...forViewer
|
|
1521
1526
|
} : { kind: assignee.kind },
|
|
1522
1527
|
redacted: true
|
|
1523
1528
|
}
|
|
@@ -1535,7 +1540,7 @@ async function requireConversationTodos(conversationId, options = {}) {
|
|
|
1535
1540
|
const closed = todos.filter((todo) => !isOpenTodoStatus(todo.status)).sort((left, right) => right.updatedAtMs - left.updatedAtMs).slice(0, RECENT_CLOSED_TODOS);
|
|
1536
1541
|
return {
|
|
1537
1542
|
conversationId,
|
|
1538
|
-
todos: [...todos.filter((todo) => isOpenTodoStatus(todo.status)), ...closed].map((todo) => reportTodo(todo, canViewPrivateContent))
|
|
1543
|
+
todos: [...todos.filter((todo) => isOpenTodoStatus(todo.status)), ...closed].map((todo) => reportTodo(todo, canViewPrivateContent, options.viewer))
|
|
1539
1544
|
};
|
|
1540
1545
|
}
|
|
1541
1546
|
/**
|
|
@@ -1554,7 +1559,7 @@ async function setConversationTodoStatus(viewer, conversationId, todoId, body) {
|
|
|
1554
1559
|
userId: viewer.id
|
|
1555
1560
|
});
|
|
1556
1561
|
if (!todo) throwApiError(404, "To-do not found.");
|
|
1557
|
-
return reportTodo(todo, conversationAccess.canViewPrivateContent);
|
|
1562
|
+
return reportTodo(todo, conversationAccess.canViewPrivateContent, viewer);
|
|
1558
1563
|
}
|
|
1559
1564
|
// src/api/conversations/routes.ts
|
|
1560
1565
|
/** Create the HTTP routes owned by the conversations API. */
|
|
@@ -3509,7 +3514,7 @@ async function readPeoplePluginReports(args) {
|
|
|
3509
3514
|
reports: [],
|
|
3510
3515
|
source: "plugins"
|
|
3511
3516
|
});
|
|
3512
|
-
const { getPluginProfileReports } = await import("./reports-
|
|
3517
|
+
const { getPluginProfileReports } = await import("./reports-DeDCCu_H.js");
|
|
3513
3518
|
return pluginOperationalReportFeedSchema.parse({
|
|
3514
3519
|
generatedAt: new Date(nowMs).toISOString(),
|
|
3515
3520
|
reports: await getPluginProfileReports({
|
|
@@ -5972,7 +5977,7 @@ function readDescriptionText(home) {
|
|
|
5972
5977
|
}
|
|
5973
5978
|
/** Read discovered skills for runtime diagnostics and the Automation editor. */
|
|
5974
5979
|
async function readSkillReports() {
|
|
5975
|
-
const { discoverSkills } = await import("./skills-
|
|
5980
|
+
const { discoverSkills } = await import("./skills-DMJsS5e4.js").then((n) => n.s);
|
|
5976
5981
|
const skills = await discoverSkills();
|
|
5977
5982
|
return skillReportsSchema.parse(skills.map((skill) => ({
|
|
5978
5983
|
name: skill.name,
|
|
@@ -5986,7 +5991,7 @@ async function readSkillReports() {
|
|
|
5986
5991
|
* what the skill tells Junior. Returns null when no skill has that name.
|
|
5987
5992
|
*/
|
|
5988
5993
|
async function readSkillDetailReport(name) {
|
|
5989
|
-
const { discoverSkills, findSkillByName, parseSkillFile } = await import("./skills-
|
|
5994
|
+
const { discoverSkills, findSkillByName, parseSkillFile } = await import("./skills-DMJsS5e4.js").then((n) => n.s);
|
|
5990
5995
|
const skill = findSkillByName(name, await discoverSkills());
|
|
5991
5996
|
if (!skill) return null;
|
|
5992
5997
|
const parsed = parseSkillFile(await fs$1.readFile(path.join(skill.skillPath, "SKILL.md"), "utf8"), skill.name);
|
|
@@ -6001,7 +6006,7 @@ async function readSkillDetailReport(name) {
|
|
|
6001
6006
|
}
|
|
6002
6007
|
/** Read safe configured plugin metadata for authenticated runtime diagnostics. */
|
|
6003
6008
|
async function readPlugins() {
|
|
6004
|
-
const { getAppContext } = await import("./db-
|
|
6009
|
+
const { getAppContext } = await import("./db-CbURDbaB.js").then((n) => n.jd);
|
|
6005
6010
|
return pluginsSchema.parse(getAppContext().catalog.getProviders().map((plugin) => ({
|
|
6006
6011
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
6007
6012
|
description: plugin.manifest.description,
|
|
@@ -6013,7 +6018,7 @@ async function readPlugins() {
|
|
|
6013
6018
|
async function readRuntimeInfoReport() {
|
|
6014
6019
|
const [{ homeDir }, { getAppContext }, plugins, skills] = await Promise.all([
|
|
6015
6020
|
import("./topics-DxuKurCX.js").then((n) => n.c),
|
|
6016
|
-
import("./db-
|
|
6021
|
+
import("./db-CbURDbaB.js").then((n) => n.jd),
|
|
6017
6022
|
readPlugins(),
|
|
6018
6023
|
readSkillReports()
|
|
6019
6024
|
]);
|
|
@@ -6030,7 +6035,7 @@ async function readRuntimeInfoReport() {
|
|
|
6030
6035
|
/** Read sanitized operational summaries contributed by plugins. */
|
|
6031
6036
|
async function readPluginOperationalReportFeed() {
|
|
6032
6037
|
const nowMs = Date.now();
|
|
6033
|
-
const { getPluginOperationalReports } = await import("./reports-
|
|
6038
|
+
const { getPluginOperationalReports } = await import("./reports-DeDCCu_H.js");
|
|
6034
6039
|
return pluginOperationalReportFeedSchema.parse({
|
|
6035
6040
|
source: "plugins",
|
|
6036
6041
|
generatedAt: new Date(nowMs).toISOString(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as JuniorPluginSet } from "./plugins-DhGXZjlu.js";
|
|
2
2
|
import { n as ConversationQueueMessage, r as ConversationWorkQueue, t as WaitUntilFn } from "./types-fnU7Xs__.js";
|
|
3
|
-
import "./change-record-
|
|
3
|
+
import "./change-record-CRuG9Mu3.js";
|
|
4
4
|
import "./db-BpxcYXfD.js";
|
|
5
5
|
import "./sentry-DrKC2NeM.js";
|
|
6
6
|
import { Hono } from "hono";
|
|
@@ -13,6 +13,7 @@ import "@modelcontextprotocol/sdk/client/auth.js";
|
|
|
13
13
|
import "@modelcontextprotocol/sdk/client";
|
|
14
14
|
import "ai";
|
|
15
15
|
import "@earendil-works/pi-ai";
|
|
16
|
+
import "@vercel/queue";
|
|
16
17
|
import "@earendil-works/pi-agent-core";
|
|
17
18
|
import { StateAdapter } from "chat";
|
|
18
19
|
import { SlackAdapter } from "@chat-adapter/slack";
|
package/dist/app.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as MemoryOptions, n as createApp, r as JuniorDashboardOptions, t as JuniorAppOptions } from "./app-
|
|
1
|
+
import { i as MemoryOptions, n as createApp, r as JuniorDashboardOptions, t as JuniorAppOptions } from "./app-CwFRvmEH.js";
|
|
2
2
|
import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-DhGXZjlu.js";
|
|
3
3
|
import { t as JUNIOR_VERSION } from "./version-Cc2OFd9G.js";
|
|
4
4
|
export { JUNIOR_VERSION, JuniorAppOptions, type JuniorDashboardOptions, type JuniorPluginInput, type JuniorPluginSet, type JuniorPluginSetOptions, type MemoryOptions, createApp, defineJuniorPlugins };
|
package/dist/app.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { C as parseActorUserId, E as parseSlackChannelId, F as slackMessageTsFromMs, G as loadConfig, I as slackMessageTsSchema, K as parseEnvList, L as botConfig, M as slackTeamIdSchema, P as parseSlackMessageTs, R as getChatConfig, W as installChatConfig, i as getStateAdapter, j as slackChannelIdSchema, l as fenceLock, s as MUTATION_LOCK_TTL_MS, u as withLock, v as createSlackActor } from "./adapter-
|
|
2
|
-
import { $ as canActOnInboxItem, $
|
|
3
|
-
import { C as withContext, D as GOOGLE_IDENTITY_PROVIDER, T as withSpan, f as logException, k as normalizeIdentityEmail, m as logWarn, n as createRequestContext, p as logInfo, w as withLogContext, y as setSpanAttributes } from "./logging-
|
|
4
|
-
import { $ as slackInboundMessageId, C as
|
|
5
|
-
import { A as createUserTokenStore, C as clearSandboxEgressSignals, D as parseSandboxEgressCredentialToken, P as normalizeSandboxEgressTracePropagationDomains, T as consumeSandboxEgressPermissionDeniedSignal, c as isVercelSandboxEgressRequest, l as proxyVercelSandboxEgressRequest, w as consumeSandboxEgressAuthRequiredSignal } from "./profile-
|
|
6
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-
|
|
1
|
+
import { C as parseActorUserId, E as parseSlackChannelId, F as slackMessageTsFromMs, G as loadConfig, I as slackMessageTsSchema, K as parseEnvList, L as botConfig, M as slackTeamIdSchema, P as parseSlackMessageTs, R as getChatConfig, W as installChatConfig, i as getStateAdapter, j as slackChannelIdSchema, l as fenceLock, s as MUTATION_LOCK_TTL_MS, u as withLock, v as createSlackActor } from "./adapter-BkDQYdg6.js";
|
|
2
|
+
import { $ as canActOnInboxItem, $f as juniorTurnOutbox, $r as annotationKeyDigest, As as isPublicConversation, Au as eventIndexLockKey, Br as verifyConversationQueueMessage, Cp as juniorConversationEventLexemes, Cr as canAddConversationMessages, Ct as inboxItemOwnerConversationId, Di as openSlackModal, Dl as getDashboardTaskLink, Dp as juniorConversationEvents, Dt as validatePlugins, Ec as recordGoogleSignIn, En as pruneActiveConversation, Et as getRegistrations, Fu as storeConversationEventLexemes, Gp as juniorDestinations, Hn as resolveSlackInboxItemCardConversationId, Hr as conversationQueueMessageSchema, Hu as backfillConversationEmbeddings, Jn as parseSlackInboxItemFormTarget, Jr as getQueueProvider, Kn as buildSlackInboxItemModal, Md as createAppContext, Ml as projectConversationMessages, Nd as getAppContext, Ni as slackEntitySchema, O as withConversationMutationLock, Oi as postSlackEphemeralMessage, Op as juniorTurns, Ou as EVENT_INDEX_LOCK_TTL_MS, Pd as installAppContext, Pi as slackExternalRefIdSchema, Qr as renderSlackObjectCard, Rc as dismissOpenInboxItems, Rn as createInboxItemShow, Rp as juniorConversations, Rr as getVercelConversationWorkQueue, Si as notifyAutomationBlocked, Sl as getDashboardInboxItemLink, Sn as hasRunnableConversationWork, Tp as juniorConversationEmbeddings, U as conversationIsActiveSql, Uf as touchConversationDetail, Un as syncInboxItemSlackCards, Ur as isConversationQueueMessageRejectedError, Ut as appendAndEnqueueInboundMessage, Uu as createConversationEmbedder, Vn as runInboxItemPushTimers, Vu as isEventEmbeddingsEnabled, Wc as searchInboxItems, Wf as createSlackDestination, Wn as findSlackThreadOwnerId, Xa as refreshAutomationLastRun, Xn as parseSlackUserInputSubmission, Xs as getSlackClient, Yc as itemQuestion, Zt as clearExpiredConversationLease, _a as withScheduledAutomationLock, a as getDb, al as parseAvatarUrl, an as getConversationWorkState, ar as createVercelPluginTaskCallback, at as inboxItemAddedByAnyAutomation, bi as markDispatchFailed, bp as juniorAgentBindings, cr as sendVercelPluginTask, da as listScheduledAutomationsForTeam, dc as readActorIdentity, dt as inboxItemReaderForUserInConversation, ei as decodeAnnotationRef, ep as juniorTurnInbox, er as createPluginEventPublisher, es as resumeConversationDelivery, fi as getDispatchRecord, fl as deleteExpiredInboxSnoozes, ga as scheduledRunId, gi as listPendingDispatchMailboxAppends, gt as isPluginInboxItem, ha as saveScheduledAutomationInLock, hc as resolveViewerUser, hi as isTerminalDispatchStatus, ho as slackChannelMessageEvent, i as getConversationStore, in as getConversation, ja as automationVersionOf, kr as readConversationAccessFromSql, ku as embedConversationEvents, li as getDispatchConversationId, lr as queueCallback, m as deleteMessageLinks, n as getConversationEventStore, ni as verifySlackSignature, nr as getPluginRoutes, o as getSqlExecutor, oc as getWorkspaceTeamId, pa as readScheduledAutomation, po as SLACK_EVENT_NAMESPACE, pp as juniorAutomations, qn as parseSlackInboxItemClick, rn as ensureConversationWake, ro as syncAutomationAlerts, sc as runWithWorkspaceTeamId, si as confirmDispatchMailboxAppend, sn as listActiveConversationIds, sp as juniorQuestions, ss as subjectKey, ti as runWithSlackInstallation, tr as getPluginApiRoutes, tt as canAnswerInboxItem, u as isPostgresErrorCode, up as juniorAutomationRuns, ut as inboxItemReaderForUser, v as withConversationEventLock, vn as CONVERSATION_WORK_STALE_ENQUEUE_MS, vp as juniorInboxItems, wn as isInvalidConversationRecordError, wp as juniorConversationEventEmbeddings, wt as inboxItemVisibility, xl as getDashboardConversationLink, yc as resolveActorIdentityId, ys as listConversationAnnotations, z as conversationCostOf, za as existingConversationId, zi as slackMention, zn as pushConversationInboxItemsNow, zo as takeDueTimerWatches, zr as resolveConversationWorkTopic } from "./db-CbURDbaB.js";
|
|
3
|
+
import { C as withContext, D as GOOGLE_IDENTITY_PROVIDER, T as withSpan, f as logException, k as normalizeIdentityEmail, m as logWarn, n as createRequestContext, p as logInfo, w as withLogContext, y as setSpanAttributes } from "./logging-CqgOoICc.js";
|
|
4
|
+
import { $ as slackInboundMessageId, C as processWorkspaceSnapshotJob, Cn as recordWebConversationActivity, En as collectAttachmentUploadGarbage, F as markConversationRead, Ft as isPublicAddress, Gn as readPublicArtifact, Hn as requestAttachmentDeletion, It as publicAddressLookup, J as getProductionSlackAdapter, K as createProductionConversationWorkOptions, Kn as unpublishedArtifactHeaders, L as deliverInboxItemChange, Q as clearSlackPendingReactions, R as inboxItemChangeRecord, S as createVercelCacheWarmupCallback, T as ingestEvent, Un as parseSlackThreadId, Ut as readConversationRecordFromSql, Wn as publicArtifactHeaders, Z as buildSlackInboundMessage, _t as recordSkippedConversationMessage, ar as readViewerAutomationSummary, at as enqueueAgentDispatch, b as vercelBackgroundCompactionQueue, bn as conversationTurnIdForMessage, cn as startProcessingReaction, dr as effectiveTaskOutcomes, dt as readConversationEventPage, er as ViewerTaskNotFoundError, et as normalizeIncomingSlackThreadId, fn as SubscribedReplyReason, ft as readConversationEventPageAfter, ht as readConversationMessageEventSeq, i as scheduledAutomationRunAttributes, in as bindMessageAgent, kt as readObjectLinkTypes, ln as stripLeadingBotMention, lr as findAutomationSkill, mt as readConversationLastEventSeq, on as createAgentRunner, ot as failStoppedDispatch, pn as getThreadStopDecision, q as createProductionSlackWebhookServices, r as logScheduledAutomationRunSkipped, rr as readViewerAutomationExecutions, sn as bindMessageAuthorIdentityId, sr as readViewerAutomations, st as processPluginTask, t as executeAgentRun, tn as bindSpawnAgent, tt as withNormalizedThreadId, un as parseContent, ur as missingAutomationSkillReason, vt as stopConversation, w as verifyWorkspaceSnapshotJobMessage, wn as webActorFromUser, wt as readLiveAnnotations, x as verifyBackgroundCompactionMessage, xn as createAndEnqueueConversation, y as processBackgroundCompaction, yn as appendAndEnqueueWebMessage, yt as createSlackWebApiStatusSender, z as renderInboxItemMessage, zn as collectAttachmentGarbage } from "./agent-CL9ZkOgx.js";
|
|
5
|
+
import { A as createUserTokenStore, C as clearSandboxEgressSignals, D as parseSandboxEgressCredentialToken, P as normalizeSandboxEgressTracePropagationDomains, T as consumeSandboxEgressPermissionDeniedSignal, c as isVercelSandboxEgressRequest, l as proxyVercelSandboxEgressRequest, w as consumeSandboxEgressAuthRequiredSignal } from "./profile-bLo0h7Le.js";
|
|
6
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-CofUHWqz.js";
|
|
7
7
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-D_Ru4CWc.js";
|
|
8
|
-
import { $ as reviewItemChange, B as mcpIdempotencyKeySchema, F as mcpAuthorizationSchema$1, G as readMcpPendingWork, H as mcpMessageTextSchema, I as mcpConversation, K as readMcpPendingWorkAfterSend, L as mcpConversationIdSchema, P as mcpAcceptedMessageSchema, Q as readInboxItemForUser, R as mcpConversationSchema, U as mcpMessages, V as mcpMessageSchema, W as mcpPendingMessagesSchema, X as actOnInboxItem, Y as InboxItemActionError, Z as closeInboxItemsAnsweredByReply, _ as createConversationForViewer, _t as backfillCacheWarmingGaps, a as resolveInboxItemSubjects, b as encodeConversationCursor, ct as listOpenAutomationQuestions, dt as getScheduledAutomationDispatch, et as createEventAppPublisher, ft as runInboxSnoozeTimers, g as appendConversationMessageForViewer, ht as runSavingsRefillSlice, lt as createHeartbeatContext, n as readConversationFeed, nt as runAutoArchiveSweep, o as readConversationDetail, ot as automationReplyAttribution, st as settleEventAutomationRuns, tt as ingestEventAutomations, ut as dispatchScheduledAutomation, vt as GET$4, w as conversationOperations, y as decodeConversationCursor, z as mcpCursorSchema } from "./list-
|
|
9
|
-
import {
|
|
10
|
-
import { Bt as annotationCard, Kt as automationCardStatus,
|
|
11
|
-
import { t as createEndStoppedChildWork } from "./result-
|
|
12
|
-
import { h as createPluginLogger } from "./prompt-
|
|
13
|
-
import { n as getAttachmentStorage } from "./storage-
|
|
8
|
+
import { $ as reviewItemChange, B as mcpIdempotencyKeySchema, F as mcpAuthorizationSchema$1, G as readMcpPendingWork, H as mcpMessageTextSchema, I as mcpConversation, K as readMcpPendingWorkAfterSend, L as mcpConversationIdSchema, P as mcpAcceptedMessageSchema, Q as readInboxItemForUser, R as mcpConversationSchema, U as mcpMessages, V as mcpMessageSchema, W as mcpPendingMessagesSchema, X as actOnInboxItem, Y as InboxItemActionError, Z as closeInboxItemsAnsweredByReply, _ as createConversationForViewer, _t as backfillCacheWarmingGaps, a as resolveInboxItemSubjects, b as encodeConversationCursor, ct as listOpenAutomationQuestions, dt as getScheduledAutomationDispatch, et as createEventAppPublisher, ft as runInboxSnoozeTimers, g as appendConversationMessageForViewer, ht as runSavingsRefillSlice, lt as createHeartbeatContext, n as readConversationFeed, nt as runAutoArchiveSweep, o as readConversationDetail, ot as automationReplyAttribution, st as settleEventAutomationRuns, tt as ingestEventAutomations, ut as dispatchScheduledAutomation, vt as GET$4, w as conversationOperations, y as decodeConversationCursor, z as mcpCursorSchema } from "./list-cGaO9_Hf.js";
|
|
9
|
+
import { Bn as appendConversationMessages, F as getAuthPausedConversationTurnId, Kn as settleConversationTitleWork, Z as coerceThreadConversationState, ft as findTrustedUser, ht as parseEmail, jt as renderTaskInput, mt as isTrustedSlackAuthor, pt as isAllowedDomain, un as isExperimentalFeatureEnabled } from "./markers-BtUv4-oc.js";
|
|
10
|
+
import { Bt as annotationCard, Dn as automationTaskSchema, Kt as automationCardStatus, Nn as getNextRunAtMs, On as automationTaskText, _ as automationListQuerySchema, _n as buttonUserInputField, in as scheduledRunSchema, p as automationExecutionStatusSchema, pn as inboxItemQuestion } from "./types-CGgQ3-Bb.js";
|
|
11
|
+
import { t as createEndStoppedChildWork } from "./result-BFBwK1M2.js";
|
|
12
|
+
import { h as createPluginLogger } from "./prompt-CX29OGO9.js";
|
|
13
|
+
import { n as getAttachmentStorage } from "./storage-XD0lB4Gk.js";
|
|
14
14
|
import { i as getActiveSpan, u as sentry_exports } from "./sentry-CPbZjomA.js";
|
|
15
|
-
import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-
|
|
15
|
+
import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-DL9r-ry5.js";
|
|
16
16
|
import { t as nameRequestRoute } from "./sentry-route-name-C6EIzAGP.js";
|
|
17
17
|
import { t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
|
|
18
|
-
import { a as resolveSlackActingUser, i as unfurlDashboardConversationLinks, n as handleSlackContinueHereClick, o as isSlackWorkspaceMember, s as slackWorkspaceBotId, t as SLACK_CONTINUE_HERE_ACTION_ID } from "./slack-conversation-unfurl-
|
|
19
|
-
import { l as unlinkProvider, n as renderHtmlPage, r as requestHasSameOrigin, t as escapeHtml } from "./html-
|
|
20
|
-
import { s as joinPublicChannel } from "./channel-access-
|
|
21
|
-
import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, c as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, d as JUNIOR_TURN_ENDED_CALLBACK_ROUTE, f as JUNIOR_TURN_STEP_CALLBACK_ROUTE, i as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, n as JUNIOR_AUTO_ARCHIVE_ROUTE, p as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, r as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE } from "./deployment-
|
|
22
|
-
import { t as processConversationWork } from "./worker-
|
|
23
|
-
import { a as
|
|
24
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
25
|
-
import { D as conversationPendingMessageDeliverySchema, f as conversationTitleSchema, t as conversationFeedQuerySchema } from "./conversation-feed-
|
|
18
|
+
import { a as resolveSlackActingUser, i as unfurlDashboardConversationLinks, n as handleSlackContinueHereClick, o as isSlackWorkspaceMember, s as slackWorkspaceBotId, t as SLACK_CONTINUE_HERE_ACTION_ID } from "./slack-conversation-unfurl-EWYTnBZI.js";
|
|
19
|
+
import { l as unlinkProvider, n as renderHtmlPage, r as requestHasSameOrigin, t as escapeHtml } from "./html-l4hKICAL.js";
|
|
20
|
+
import { s as joinPublicChannel } from "./channel-access-BUHB0saC.js";
|
|
21
|
+
import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, c as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, d as JUNIOR_TURN_ENDED_CALLBACK_ROUTE, f as JUNIOR_TURN_STEP_CALLBACK_ROUTE, i as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, n as JUNIOR_AUTO_ARCHIVE_ROUTE, p as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, r as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE } from "./deployment-D9uPRDMD.js";
|
|
22
|
+
import { t as processConversationWork } from "./worker-buhFcpl9.js";
|
|
23
|
+
import { a as createGatewayModelClient, c as findStalledTurns, d as countMetric, f as withSpan$1, i as turnTools, l as publishTurnEnded, n as createDeploymentDelivery, o as turnStepConsumer, r as turnEndedConsumer, t as createEngineContext, u as publishTurnStep } from "./engine-context-BP0h6u4m.js";
|
|
24
|
+
import { t as JUNIOR_VERSION } from "./version-D_vbXyNw.js";
|
|
25
|
+
import { D as conversationPendingMessageDeliverySchema, f as conversationTitleSchema, t as conversationFeedQuerySchema } from "./conversation-feed-B1_1NJc8.js";
|
|
26
26
|
import { t as isMissingVirtualModule } from "./virtual-module-BeKA_EII.js";
|
|
27
27
|
import { createRequire } from "node:module";
|
|
28
28
|
import { Hono } from "hono";
|
|
29
29
|
import * as z from "zod";
|
|
30
30
|
import { and, asc, desc, eq, gt, gte, inArray, isNotNull, isNull, lt, lte, ne, not, notExists, notInArray, or, sql } from "drizzle-orm";
|
|
31
31
|
import { alias, pgTable, text } from "drizzle-orm/pg-core";
|
|
32
|
-
import {
|
|
32
|
+
import { eventTriggerFiltersText, identityDispatchOptionsSchema, userSchema } from "@sentry/junior-plugin-api";
|
|
33
33
|
import { pathToFileURL } from "node:url";
|
|
34
34
|
import { createHash, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
35
35
|
import { Message, ThreadImpl } from "chat";
|
|
@@ -3269,203 +3269,6 @@ function backgroundCompactionCallback() {
|
|
|
3269
3269
|
function createVercelBackgroundCompactionCallback() {
|
|
3270
3270
|
return backgroundCompactionCallback().create();
|
|
3271
3271
|
}
|
|
3272
|
-
// src/delivery/deliver.ts
|
|
3273
|
-
/**
|
|
3274
|
-
* A send that failed but can work on a later try. The sender sets
|
|
3275
|
-
* `retryAfterMs` when the provider says when to try again.
|
|
3276
|
-
*/
|
|
3277
|
-
var DeliveryRetryableError = class extends Error {
|
|
3278
|
-
retryAfterMs;
|
|
3279
|
-
constructor(message, options = {}) {
|
|
3280
|
-
super(message, { cause: options.cause });
|
|
3281
|
-
this.name = "DeliveryRetryableError";
|
|
3282
|
-
this.retryAfterMs = options.retryAfterMs;
|
|
3283
|
-
}
|
|
3284
|
-
};
|
|
3285
|
-
const LOCK_MISS_DELAY_MS = 1e3;
|
|
3286
|
-
const MAX_DELIVERY_ATTEMPTS = 5;
|
|
3287
|
-
const RETRY_BASE_DELAY_MS = 1e3;
|
|
3288
|
-
const RETRY_MAX_DELAY_MS = 6e4;
|
|
3289
|
-
const tryLockResultSchema = z.object({ rows: z.tuple([z.object({ locked: z.boolean() })]) });
|
|
3290
|
-
/**
|
|
3291
|
-
* Sends the Conversation's pending outbox rows in event order, each to the
|
|
3292
|
-
* Destination stored on its row. To try again later, it sends the message
|
|
3293
|
-
* that the Turn ended again, with a delay.
|
|
3294
|
-
*/
|
|
3295
|
-
async function deliverTurn({ executor, queue }, message, delivery) {
|
|
3296
|
-
while (true) {
|
|
3297
|
-
const next = await executor.transaction(() => sendNextRow({ executor }, message.conversationId, delivery));
|
|
3298
|
-
if (next.kind === "idle") return;
|
|
3299
|
-
if (next.kind === "later") {
|
|
3300
|
-
await publishTurnEnded({ queue }, message, { delayMs: next.delayMs });
|
|
3301
|
-
return;
|
|
3302
|
-
}
|
|
3303
|
-
}
|
|
3304
|
-
}
|
|
3305
|
-
/**
|
|
3306
|
-
* Sends the Conversation's first pending row, if this transaction gets the
|
|
3307
|
-
* Conversation's lock and the row's Turn has ended. A retryable failure
|
|
3308
|
-
* leaves the row pending, so the rows after it wait.
|
|
3309
|
-
*/
|
|
3310
|
-
async function sendNextRow({ executor }, conversationId, delivery) {
|
|
3311
|
-
const db = executor.db();
|
|
3312
|
-
if (!tryLockResultSchema.parse(await db.execute(sql`select pg_try_advisory_xact_lock(hashtext(${`junior:delivery:${conversationId}`})) as locked`)).rows[0].locked) return {
|
|
3313
|
-
kind: "later",
|
|
3314
|
-
delayMs: LOCK_MISS_DELAY_MS
|
|
3315
|
-
};
|
|
3316
|
-
const [row] = await db.select({
|
|
3317
|
-
id: juniorTurnOutbox.id,
|
|
3318
|
-
eventSeq: juniorTurnOutbox.eventSeq,
|
|
3319
|
-
destination: juniorTurnOutbox.destination,
|
|
3320
|
-
attempts: juniorTurnOutbox.attempts,
|
|
3321
|
-
turnState: juniorTurns.state
|
|
3322
|
-
}).from(juniorTurnOutbox).innerJoin(juniorTurns, eq(juniorTurns.id, juniorTurnOutbox.turnId)).where(and(eq(juniorTurnOutbox.conversationId, conversationId), eq(juniorTurnOutbox.state, "pending"))).orderBy(asc(juniorTurnOutbox.eventSeq)).limit(1);
|
|
3323
|
-
if (!row || row.turnState === "queued" || row.turnState === "running") return { kind: "idle" };
|
|
3324
|
-
const markFailed = async (error) => {
|
|
3325
|
-
await db.update(juniorTurnOutbox).set({
|
|
3326
|
-
state: "failed",
|
|
3327
|
-
error,
|
|
3328
|
-
updatedAt: /* @__PURE__ */ new Date()
|
|
3329
|
-
}).where(eq(juniorTurnOutbox.id, row.id));
|
|
3330
|
-
return { kind: "settled" };
|
|
3331
|
-
};
|
|
3332
|
-
const parsed = destinationSchema.safeParse(row.destination);
|
|
3333
|
-
if (!parsed.success) {
|
|
3334
|
-
logException(parsed.error, "turn.delivery.failed", { "gen_ai.conversation.id": conversationId });
|
|
3335
|
-
return markFailed("The Destination is not valid");
|
|
3336
|
-
}
|
|
3337
|
-
const destination = parsed.data;
|
|
3338
|
-
const [event] = await db.select().from(juniorConversationEvents).where(and(eq(juniorConversationEvents.conversationId, conversationId), eq(juniorConversationEvents.seq, row.eventSeq)));
|
|
3339
|
-
const text = event ? replyText(event) : void 0;
|
|
3340
|
-
if (!text) return markFailed("The event is not a reply");
|
|
3341
|
-
try {
|
|
3342
|
-
const result = await delivery.send({
|
|
3343
|
-
conversationId,
|
|
3344
|
-
destination,
|
|
3345
|
-
text
|
|
3346
|
-
});
|
|
3347
|
-
const now = /* @__PURE__ */ new Date();
|
|
3348
|
-
await db.update(juniorTurnOutbox).set({
|
|
3349
|
-
state: "sent",
|
|
3350
|
-
sentAt: now,
|
|
3351
|
-
updatedAt: now,
|
|
3352
|
-
providerMessageId: result.providerMessageId ?? null
|
|
3353
|
-
}).where(eq(juniorTurnOutbox.id, row.id));
|
|
3354
|
-
return { kind: "settled" };
|
|
3355
|
-
} catch (error) {
|
|
3356
|
-
const attempts = row.attempts + 1;
|
|
3357
|
-
if (error instanceof DeliveryRetryableError && attempts < MAX_DELIVERY_ATTEMPTS) {
|
|
3358
|
-
await db.update(juniorTurnOutbox).set({
|
|
3359
|
-
attempts,
|
|
3360
|
-
updatedAt: /* @__PURE__ */ new Date()
|
|
3361
|
-
}).where(eq(juniorTurnOutbox.id, row.id));
|
|
3362
|
-
return {
|
|
3363
|
-
kind: "later",
|
|
3364
|
-
delayMs: retryDelayMs(error, attempts)
|
|
3365
|
-
};
|
|
3366
|
-
}
|
|
3367
|
-
logException(error, "turn.delivery.failed", { "gen_ai.conversation.id": conversationId });
|
|
3368
|
-
await db.update(juniorTurnOutbox).set({
|
|
3369
|
-
state: "failed",
|
|
3370
|
-
attempts,
|
|
3371
|
-
error: error instanceof Error ? error.message : String(error),
|
|
3372
|
-
updatedAt: /* @__PURE__ */ new Date()
|
|
3373
|
-
}).where(eq(juniorTurnOutbox.id, row.id));
|
|
3374
|
-
return { kind: "settled" };
|
|
3375
|
-
}
|
|
3376
|
-
}
|
|
3377
|
-
/**
|
|
3378
|
-
* The wait before the next try of a retryable send. The cap keeps a row that
|
|
3379
|
-
* waits for its retry well inside the sweep's stale window.
|
|
3380
|
-
*/
|
|
3381
|
-
function retryDelayMs(error, attempts) {
|
|
3382
|
-
return Math.min(error.retryAfterMs ?? RETRY_BASE_DELAY_MS * 2 ** (attempts - 1), RETRY_MAX_DELAY_MS);
|
|
3383
|
-
}
|
|
3384
|
-
// src/delivery/slack.ts
|
|
3385
|
-
/**
|
|
3386
|
-
* Creates the sender of replies to Slack Destinations. A Slack failure that a
|
|
3387
|
-
* later try can fix throws `DeliveryRetryableError`.
|
|
3388
|
-
*/
|
|
3389
|
-
function createSlackSender(args) {
|
|
3390
|
-
return async (reply) => {
|
|
3391
|
-
const { channelId, teamId, threadTs } = reply.destination;
|
|
3392
|
-
let messageIds;
|
|
3393
|
-
try {
|
|
3394
|
-
messageIds = await runWithSlackInstallation({
|
|
3395
|
-
adapter: args.getSlackAdapter(),
|
|
3396
|
-
installation: { teamId },
|
|
3397
|
-
task: async () => sendSlackReply({
|
|
3398
|
-
channelId,
|
|
3399
|
-
threadTs,
|
|
3400
|
-
conversationId: reply.conversationId,
|
|
3401
|
-
formatting: {
|
|
3402
|
-
configuration: await getLocationConfigurationService({
|
|
3403
|
-
platform: "slack",
|
|
3404
|
-
teamId,
|
|
3405
|
-
channelId
|
|
3406
|
-
}).resolveValues(),
|
|
3407
|
-
teamId
|
|
3408
|
-
},
|
|
3409
|
-
text: reply.text
|
|
3410
|
-
})
|
|
3411
|
-
});
|
|
3412
|
-
} catch (error) {
|
|
3413
|
-
if (isRetryableSlackPostError(error)) throw new DeliveryRetryableError("Slack did not take the reply", { cause: error });
|
|
3414
|
-
throw error;
|
|
3415
|
-
}
|
|
3416
|
-
const providerMessageId = messageIds.at(-1);
|
|
3417
|
-
return providerMessageId ? { providerMessageId } : {};
|
|
3418
|
-
};
|
|
3419
|
-
}
|
|
3420
|
-
// src/turn-steps/metrics.ts
|
|
3421
|
-
/**
|
|
3422
|
-
* Writes the metrics of an ended Turn. A rerun replaces the same rows, so a
|
|
3423
|
-
* Turn counts once however often its Turn-ended message arrives. A Turn that
|
|
3424
|
-
* never ran or has not ended writes nothing.
|
|
3425
|
-
*/
|
|
3426
|
-
async function recordTurnMetrics(ctx, message) {
|
|
3427
|
-
const turn = await findTurn(ctx, message.turnId);
|
|
3428
|
-
if (!turn?.startedAt || !turn.endedAt) return;
|
|
3429
|
-
const [history, actorIdentityId] = await Promise.all([loadTurnAgentHistory(ctx, message.turnId), findTurnActor(ctx, message.turnId)]);
|
|
3430
|
-
const usage = await turnUsage(ctx, message.turnId, history);
|
|
3431
|
-
const { startedAt, endedAt } = turn;
|
|
3432
|
-
await withConversationMutationLock(ctx.executor, message.conversationId, () => replaceConversationMetrics(ctx.executor, {
|
|
3433
|
-
actorIdentityId,
|
|
3434
|
-
conversationId: message.conversationId,
|
|
3435
|
-
runId: message.turnId,
|
|
3436
|
-
occurredAtMs: startedAt.getTime(),
|
|
3437
|
-
updatedAtMs: endedAt.getTime(),
|
|
3438
|
-
durationMs: endedAt.getTime() - startedAt.getTime(),
|
|
3439
|
-
usage
|
|
3440
|
-
}));
|
|
3441
|
-
}
|
|
3442
|
-
// src/turn-steps/turn-ended.ts
|
|
3443
|
-
/**
|
|
3444
|
-
* Creates the Delivery of this deployment. It sends replies to Slack
|
|
3445
|
-
* Destinations. Other platforms have no sender yet, so their replies fail.
|
|
3446
|
-
*/
|
|
3447
|
-
function createDeploymentDelivery(args) {
|
|
3448
|
-
const sendToSlack = createSlackSender(args);
|
|
3449
|
-
return { send: async (reply) => {
|
|
3450
|
-
const { destination } = reply;
|
|
3451
|
-
if (destination.platform === "slack") return sendToSlack({
|
|
3452
|
-
...reply,
|
|
3453
|
-
destination
|
|
3454
|
-
});
|
|
3455
|
-
throw new Error(`No sender for ${destination.platform} Destinations`);
|
|
3456
|
-
} };
|
|
3457
|
-
}
|
|
3458
|
-
/**
|
|
3459
|
-
* The queue consumer of the messages that a Turn ended. It records the Turn's
|
|
3460
|
-
* metrics, then sends its replies, so a send that waits does not hold back
|
|
3461
|
-
* the spend. The host mounts it on `engineCtx.queue`.
|
|
3462
|
-
*/
|
|
3463
|
-
function turnEndedConsumer(engineCtx, delivery) {
|
|
3464
|
-
return readTurnEndedMessages(engineCtx, async (message) => {
|
|
3465
|
-
await recordTurnMetrics(engineCtx, message);
|
|
3466
|
-
await deliverTurn(engineCtx, message, delivery);
|
|
3467
|
-
});
|
|
3468
|
-
}
|
|
3469
3272
|
// src/core/turn/sweep.ts
|
|
3470
3273
|
const STALE_MS$1 = 3e5;
|
|
3471
3274
|
const BATCH$1 = 100;
|
|
@@ -91,11 +91,6 @@ declare function buttonUserInputField(request: UserInputRequest): Extract<UserIn
|
|
|
91
91
|
* option labels, one value for a `choice` field, and trimmed text.
|
|
92
92
|
*/
|
|
93
93
|
declare function normalizeUserInputAnswer(request: UserInputRequest, answer: UserInputAnswer): UserInputAnswer;
|
|
94
|
-
/**
|
|
95
|
-
* Return the option labels that an answer picked, in field order. Text
|
|
96
|
-
* fields and the note pick no option.
|
|
97
|
-
*/
|
|
98
|
-
declare function answeredChoices(request: UserInputRequest, answer: UserInputAnswer): string[];
|
|
99
94
|
/** Return true when an answer has no value and no free text. */
|
|
100
95
|
declare function isEmptyUserInputAnswer(answer: UserInputAnswer): boolean;
|
|
101
96
|
/**
|
|
@@ -235,4 +230,4 @@ declare const inboxItemChangeRecordSchema: z.ZodObject<{
|
|
|
235
230
|
reviewItemId: z.ZodString;
|
|
236
231
|
}, z.core.$strict>;
|
|
237
232
|
type InboxItemChangeRecord = z.output<typeof inboxItemChangeRecordSchema>;
|
|
238
|
-
export {
|
|
233
|
+
export { InputFile as _, annotationCard as a, MessageAttachment as b, AutomationCard as c, UserInputAnswer as d, UserInputField as f, normalizeUserInputAnswer as g, isEmptyUserInputAnswer as h, MessageCard as i, inboxItemQuestion as l, buttonUserInputField as m, conversationTurnFailureCodeSchema as n, messageCardText as o, UserInputRequest as p, conversationTurnFailureReasonSchema as r, resolveMessageCards as s, InboxItemChangeRecord as t, USER_INPUT_NOTE as u, MAX_ATTACHMENT_BYTES as v, MAX_INPUT_ATTACHMENTS as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ks as SlackActionError, Xs as getSlackClient, i as getConversationStore, ic as withSlackRetries } from "./db-CbURDbaB.js";
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
// src/chat/slack/channel.ts
|
|
4
4
|
const replySubtypeSchema = z.object({ subtype: z.string().optional() });
|