@sentry/junior 0.317.0 → 0.319.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 +1833 -0
- package/dist/{admin-CAugg87B.js → admin-EsbUON1j.js} +1 -1
- package/dist/{agent-runner-AjrEV6Qe.js → agent-CtzMl32d.js} +19953 -6727
- package/dist/{agent-status-BA5x3Xtp.js → agent-status-Bq_AIpyp.js} +105 -1
- package/dist/{agent-update-delivery-B_YIZcgf.js → agent-update-delivery-pAvsbuGL.js} +4 -5
- package/dist/api/schema.d.ts +85 -51
- package/dist/api/schema.js +4 -4
- package/dist/api.js +81 -94
- package/dist/{app-MoNAsVV5.d.ts → app-tACXxJPI.d.ts} +8 -13
- package/dist/app.d.ts +2 -2
- package/dist/app.js +246 -153
- package/dist/{change-record-BzJgLsv7.d.ts → change-record-K-KsqNhT.d.ts} +9 -5
- package/dist/{channel-access-j-YAVYK4.js → channel-access-DET5hzZM.js} +1 -1
- package/dist/{chat-core-engine-aH85nEHv.js → chat-core-engine-DpM3tMVi.js} +7 -7
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +38 -30
- package/dist/cli/check.js +5 -5
- package/dist/cli/main.js +2 -2
- package/dist/cli/plugins.d.ts +1 -1
- package/dist/cli/plugins.js +8 -8
- package/dist/cli/snapshot-create.js +5 -6
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -4
- package/dist/{continue-in-slack-D-FZ8Fin.js → continue-in-slack-CFzDyxkH.js} +3 -2
- package/dist/{conversation-feed--9S0_PXL.js → conversation-feed-DEUdD7mb.js} +2 -106
- package/dist/{conversation-privacy-B1uXn5sf.js → conversation-privacy-C2vYK55O.js} +1 -1
- package/dist/{create-DoDIYgtZ.js → create-Ta3SEIB5.js} +124 -16
- package/dist/{credential-sync-BJOqGnjV.js → credential-sync-DyRqDmY4.js} +17 -20
- package/dist/{db-BFmyYZtJ.js → db-BCaNWl9p.js} +6536 -1920
- package/dist/{deployment-DXq9ZLU4.js → deployment-CfOew1Tm.js} +3 -3
- package/dist/{engine-context-CgQ7mlHt.js → engine-context-CiExoy1B.js} +181 -155
- package/dist/{html-B3VKTGbJ.js → html-Bb2Si1bR.js} +6 -8
- package/dist/instrumentation.js +7 -23
- package/dist/list-wwDcROh9.js +5007 -0
- package/dist/{logging--smS7XRK.js → logging-BRPTXAdf.js} +10 -81
- package/dist/{mailbox-turn-uSXhUFc9.js → markers-9QoqW5ov.js} +1875 -1458
- package/dist/nitro.d.ts +2 -2
- package/dist/nitro.js +7 -8
- package/dist/{oauth-callback-server-CE4soEIY.js → oauth-callback-server-vhL9b-PZ.js} +2 -2
- package/dist/{oauth-relay-C36gX1gH.js → oauth-relay-CH2v7WiB.js} +1 -1
- package/dist/{plugins-fBrz8PCV.d.ts → plugins-DhGXZjlu.d.ts} +1 -0
- package/dist/{profile-BQ-iBDsZ.js → profile-D9LdwmZi.js} +17 -19
- package/dist/{prompt-Dv7gkpD6.js → prompt-3TqxEOtc.js} +10 -10
- package/dist/{reports-WKHfGTsU.js → reports-K-tbtEyx.js} +2 -2
- package/dist/{resolve-tony4ibz.js → resolve-BBV2qf8A.js} +5 -5
- package/dist/{result-Bta_dlWa.js → result-5IdGJP4M.js} +24 -13
- package/dist/{runner-BstDRbD9.js → runner-BK_joPlM.js} +9 -18
- package/dist/{sandbox-egress-signals-oSJMJOnn.js → sandbox-egress-signals-DXgWXXmm.js} +1 -1
- package/dist/{schema-DfqrHACA.js → schema-zWGG6VC1.js} +13 -7
- package/dist/{service-account-CTV_jaNu.js → service-account-CateFyhw.js} +4 -5
- package/dist/{skills-BCEU41zM.js → skills-Ccjw8h2P.js} +10 -9
- package/dist/{slack-conversation-unfurl-DxVmhbGP.js → slack-conversation-unfurl-ZC_TSpc4.js} +7 -7
- package/dist/storage-C9U7R5rM.js +273 -0
- package/dist/{system-prompt-table-CiXy0eNR.js → system-prompt-table-YBTHIFlP.js} +26 -84
- package/dist/topic-B2EWKKBT.js +6 -0
- package/dist/{package-discovery-DD9vencX.js → topics-DxuKurCX.js} +21 -1
- package/dist/{types-C4iC-IMC.js → types-BNHkJrOP.js} +79 -59
- package/dist/{users-ByG5RCEJ.js → users-CCRAqYb_.js} +1 -1
- package/dist/{validation-8gjfR91V.js → validation-BCUpJa8K.js} +4 -4
- package/dist/{version-BeZhWWBE.js → version-BNm0JYj3.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{worker-BqMQQNRk.js → worker-BhgpZ7_b.js} +5 -5
- package/migrations/20261127002500_turn_discarded_usage/migration.sql +2 -0
- package/migrations/20261127002500_turn_discarded_usage/snapshot.json +73 -0
- package/migrations/20261127052408_space_name_nullable/migration.sql +5 -0
- package/migrations/20261127052408_space_name_nullable/snapshot.json +29 -0
- package/migrations/20261127060000_annotation_object_id_index/migration.sql +1 -0
- package/migrations/20261127060000_annotation_object_id_index/snapshot.json +69 -0
- package/migrations/20261127060001_annotation_subjects/migration.sql +78 -0
- package/migrations/20261127060001_annotation_subjects/snapshot.json +104 -0
- package/migrations/20261127060002_annotation_subject_index/migration.sql +1 -0
- package/migrations/20261127060002_annotation_subject_index/snapshot.json +70 -0
- package/migrations/20261127060003_annotation_title_url/migration.sql +84 -0
- package/migrations/20261127060003_annotation_title_url/snapshot.json +73 -0
- package/package.json +9 -7
- package/dist/catalog-runtime-DfSpJZdY.js +0 -6
- package/dist/child-message-DHjQLEd1.js +0 -19
- package/dist/config-CHQ8X251.js +0 -2422
- package/dist/conversation-turn-BUE_7xaN.js +0 -1157
- package/dist/job-runner-A1lCkybD.js +0 -1506
- package/dist/lineage-Bktb0UcV.js +0 -36
- package/dist/list-Bxvg5wXf.js +0 -12623
- package/dist/message-BNenhsmB.js +0 -154
- package/dist/model-input-BReSnwHp.js +0 -82
- package/dist/parent-result-Ck1rFYRQ.js +0 -310
- package/dist/registry-iXMT5Jmh.js +0 -3279
- package/dist/run-conversation-DL6ru7iW.js +0 -336
- package/dist/sender-actors-CPglLd5R.js +0 -83
- package/dist/spawn-frczVPIr.js +0 -48
- package/dist/task-runner-C9Yc2_ae.js +0 -1526
- package/dist/thread-context-CqZDKErp.js +0 -166
- package/dist/topic-CRYYBYp-.js +0 -7
- package/dist/topics-SRN7IVX-.js +0 -24
- package/dist/turn-membership-CENFf3kI.js +0 -856
- package/dist/turn-wake-BhloiI2h.js +0 -151
package/dist/api.js
CHANGED
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $
|
|
3
|
-
import {
|
|
4
|
-
import { $t as
|
|
5
|
-
import { At as spaceListQuerySchema, B as conversationDetailQuerySchema, C as automationScheduleIntentSchema, D as automationVersionActivateSchema, E as automationUpdateSchema,
|
|
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,
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { a as listChildAgents } from "./parent-result-Ck1rFYRQ.js";
|
|
13
|
-
import { i as continueConversationInSlack, r as canContinueInSlack, t as BUSY } from "./continue-in-slack-D-FZ8Fin.js";
|
|
1
|
+
import { n as getAttachmentStorage } from "./storage-C9U7R5rM.js";
|
|
2
|
+
import { $ as canActOnInboxItem, $a as microUsdToUsd, $f as notLeadConversation, Ao as cancelWatch, Ar as readConversationAccessFromSql, B as conversationAggregateColumns, Bc as getInboxItem, Bl as searchTypedMemories, Bn as pushConversationInboxItemsNow, Bp as juniorConversations, Bt as listTodos, Cs as upsertPluginAnnotation, Dl as getDashboardSettingsLink, Dt as getRegistrations, El as getDashboardPersonLink, Et as getPlugins, Fd as getAppContext, Fl as REVALIDATED_READ_PATHS, Fp as juniorCodeChanges, Fs as resolveNotificationTimezone, G as conversationStatusSql, Gc as searchInboxItems, Gl as prefixRank, Gp as slackPersonSearchDocument, Gs as savePushSubscription, H as conversationUsageCostExpr, Hd as finishServiceAccountSignIn, Hl as fuzzyMatch, Hs as listPushSubscriptions, Ia as AutomationConflictError, Il as contentVersion, Ip as juniorCodeRepositories, Ji as createPluginEmbedder, K as conversationTurnFailedSql, Kd as serviceAccountPlugins, Kl as rankSearchMatches, Kp as juniorUsers, Ks as isPausedBySlack, Ll as contentVersionHeaders, Lr as rootVisibleToViewer, Mc as inboxItemsNeedingUserVersionQuery, Mr as readableSlackTeamId, Nc as listWaitingConversations, Np as codeChangeSearchDocument, Ns as readWebPushConfig, Op as juniorConversationMetrics, Or as createConversationAccessReader, Pp as codeRepositorySearchDocument, Ps as sendPushNotificationToUser, Qa as microUsdSql, Qc as INBOX_SUBJECT_KINDS, Qf as listedConversation, Qo as canPauseConversationDelivery, Rl as revalidateContent, Sl as unsnoozeInboxRow, Sp as juniorAgentBindings, U as conversationIsActiveSql, Ud as getServiceAccountStatus, Ul as fuzzyRank, Up as juniorIdentities, Us as readNotificationSchedule, V as conversationRangeColumns, Vd as disconnectServiceAccount, Vl as parseTypedQuery, Vs as deletePushSubscription, Vt as setTodoStatusByUser, Wc as ownerConversationId, Wl as prefixMatch, Wp as slackPersonPredicate, Ws as saveNotificationSchedule, Xc as inboxItemTitle, Xf as rootSpaceIdSql, Xu as completeText, Y as conversationKindFromRow, Ya as readAutomationTitlesByConversationId, Yc as inboxItemRequest, Zc as itemQuestion, _p as inboxItemFuzzyTitle, _s as annotationSubject, a as getDb, ad as saveEnabledProviders, as as codeChangeSubjectKinds, bl as snoozeInboxItems, bp as juniorInboxItems, bs as listConversationAnnotations, bu as eventWatchUnavailable, cl as readAvatarFetch, cp as todoSearchDocument, cs as subjectKey, dp as questionSearchDocument, ds as linkedCodeProviders, dt as inboxItemReaderForUser, el as questionLinks, ep as topLevelConversation, es as pauseConversationDelivery, fp as juniorAutomationRuns, ft as inboxItemReaderForUserInConversation, gc as resolveViewerUser, gl as inboxItemSnoozedBy, gt as isOnlyAssignee, gu as automationEventCatalog, hc as readViewerAvatarUrl, hf as webActorUserIds, hl as inboxItemInRow, hn as steerWebPendingMessages, hp as juniorAutomations, hs as ANNOTATION_SUBJECT_KINDS, ht as isInboxItemForEveryone, i as getConversationStore, id as readServedProviders, il as subjectTodo, jc as countInboxItemsNeedingUserBySubject, jp as juniorApiTokens, js as isPublicConversation, kp as juniorConversationEvents, kt as apiRoutePrefix, ll as readUserAvatarUrls, lp as juniorQuestions, ls as codeChangeUrl, mp as automationSearchDocument, ni as runWithSlackInstallation, nl as subjectKindLabel, o as getSqlExecutor, oa as createPluginCache, od as cacheKeyPrefix, ol as identityAvatarUrl, op as juniorTodos, os as codeChangeSubjectProvider, pl as clearInboxWakeReasons, po as getEventCatalog, pp as automationFuzzyTitle, pt as inboxItemVisibleTo, qd as startServiceAccountSignIn, ql as scoredSearchMatches, qp as juniorDestinations, rd as readEnabledProviders, rl as subjectKindPlugin, rt as canUserReadInboxItem, sd as createCache, sp as todoFuzzyTitle, ss as readSubjectLinks, st as inboxItemForUser, tl as subjectKindDismissNote, to as usdToMicroUsdUnbiased, ts as resumeConversationDelivery, tt as canAnswerInboxItem, uc as findUserByEmail, up as questionFuzzyTitle, us as codeRepositoryUrl, vc as updateViewerDisplayName, vl as readViewerInboxSnoozes, vp as inboxItemSearchDocument, vt as itemNeedsUser, w as loadConversationSlackTenantIds, wp as juniorConversationParticipants, xl as snoozeTimerTrigger, yl as settleInboxSnoozes, yp as juniorInboxItemConversations, yr as hasAssigneeRoles, zl as memoryDb, zn as createInboxItemShow, zr as getVercelConversationWorkQueue } from "./db-BCaNWl9p.js";
|
|
3
|
+
import { T as withSpan, f as logException, g as runBestEffort, m as logWarn, p as logInfo, v as setSentryUser } from "./logging-BRPTXAdf.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-CtzMl32d.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, Mn as notificationScheduleSchema, Mt as spaceParamsSchema, N as CONVERSATION_DETAIL_VERSION_HEADER, O as automationVersionListSchema, Ot as archiveSpaceBodySchema, P as CONVERSATION_VERSION_HEADER, Pt as spaceSchema, R as conversationAttachmentQuerySchema, Rn as apiErrorSchema, 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, jt as spaceListSchema, k as automationVersionParamsSchema, kn as automationTaskText, 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-BNHkJrOP.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-zWGG6VC1.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-DEUdD7mb.js";
|
|
8
|
+
import { Ft as addConversationNote, Nt as readUserCustomization, Pt as saveUserCustomization, Qt as getWorkspace, Xt as createWorkspace, Zt as deleteWorkspace, dn as isExperimentalFeatureEnabled, gt as parseEmail, i as listChildAgents, in as WorkspaceValidationError, lr as createPluginEgress, mt as isAllowedDomain, nn as listWorkspacesByRepository, on as workspaceRepoCheckoutPath, rn as updateWorkspace, tn as listWorkspaces } from "./markers-9QoqW5ov.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-wwDcROh9.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-8_S6Birm.js";
|
|
11
|
+
import { i as continueConversationInSlack, r as canContinueInSlack, t as BUSY } from "./continue-in-slack-CFzDyxkH.js";
|
|
14
12
|
import { a as INPUT_IMAGE_TYPES, i as INLINE_VIDEO_TYPES, n as userCustomizationSchema, o as detectImageMediaType } from "./user-customization-CvfuY9Eo.js";
|
|
15
13
|
import { u as sentry_exports } from "./sentry-CPbZjomA.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { F as listSpaceConfiguration } from "./job-runner-A1lCkybD.js";
|
|
22
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-DfSpJZdY.js";
|
|
23
|
-
import { o as getSandboxResources, t as getCachedSnapshot } from "./resolve-tony4ibz.js";
|
|
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-D9LdwmZi.js";
|
|
16
|
+
import { a as isConnectableProvider, c as startConnection, i as disconnectConnection, o as listConnections, t as escapeHtml, u as htmlCallbackResponse } from "./html-Bb2Si1bR.js";
|
|
17
|
+
import { G as mapBounded, h as createPluginLogger } from "./prompt-3TqxEOtc.js";
|
|
18
|
+
import { o as getSandboxResources, t as getCachedSnapshot } from "./resolve-BBV2qf8A.js";
|
|
24
19
|
import { Hono } from "hono";
|
|
25
20
|
import * as z from "zod";
|
|
26
21
|
import path from "node:path";
|
|
27
|
-
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
28
|
-
import { normalizeEventIdentifier, objectPresentation, pluginUserPageContentSchema, pluginUserPageCursorSchema, pluginUserPageFilterSchema, pluginUserPageLinksSchema, pluginUserPageQuerySchema } from "@sentry/junior-plugin-api";
|
|
29
22
|
import { and, asc, count as count$1, desc, eq, exists, gt, gte, inArray, isNotNull, isNull, like, lt, lte, ne, or, sql } from "drizzle-orm";
|
|
30
23
|
import { alias, union } from "drizzle-orm/pg-core";
|
|
31
|
-
import
|
|
24
|
+
import { normalizeEventIdentifier, objectPresentation, pluginUserPageContentSchema, pluginUserPageCursorSchema, pluginUserPageFilterSchema, pluginUserPageLinksSchema, pluginUserPageQuerySchema } from "@sentry/junior-plugin-api";
|
|
32
25
|
import { readFileSync } from "node:fs";
|
|
26
|
+
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
27
|
+
import fs$1 from "node:fs/promises";
|
|
33
28
|
import { HTTPException } from "hono/http-exception";
|
|
34
29
|
import { bodyLimit } from "hono/body-limit";
|
|
35
30
|
import { waitUntil } from "@vercel/functions";
|
|
@@ -69,16 +64,19 @@ async function attachObjectLink(viewer, conversationId, url) {
|
|
|
69
64
|
key: `object_attached:${linkType.owner}:${object.key}`,
|
|
70
65
|
text: [`${viewer.displayName ?? viewer.email} attached ${article} ${type} (${link}) to this Conversation.`, readTool ? `Read it live with \`${readTool}\` when the work needs its content.` : ""].filter(Boolean).join(" ")
|
|
71
66
|
});
|
|
72
|
-
await
|
|
67
|
+
await upsertPluginAnnotation(db, {
|
|
68
|
+
annotation: {
|
|
69
|
+
kind: "resource_link",
|
|
70
|
+
key: object.key,
|
|
71
|
+
objectType: object.objectType,
|
|
72
|
+
url: link
|
|
73
|
+
},
|
|
73
74
|
conversationId,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
label: link.slice(0, 256),
|
|
80
|
-
objectType: object.objectType,
|
|
81
|
-
url: link
|
|
75
|
+
plugin: linkType.owner,
|
|
76
|
+
subject: annotationSubject(linkType.owner, object) ?? {
|
|
77
|
+
id: link,
|
|
78
|
+
kind: ANNOTATION_SUBJECT_KINDS.link
|
|
79
|
+
}
|
|
82
80
|
});
|
|
83
81
|
return { status: "attached" };
|
|
84
82
|
}
|
|
@@ -230,26 +228,6 @@ async function catchUpOnConversation(viewer, conversationId, range) {
|
|
|
230
228
|
...conversation.title ? { title: conversation.title } : void 0
|
|
231
229
|
});
|
|
232
230
|
}
|
|
233
|
-
// src/chat/slack/detach-notice.ts
|
|
234
|
-
function detachNoticeText(conversationId, actorName) {
|
|
235
|
-
const url = getDashboardConversationLink(conversationId);
|
|
236
|
-
const dashboard = url ? formatSlackLink(url, "the dashboard") : "the dashboard";
|
|
237
|
-
return `${escapeSlackMrkdwnText(actorName)} detached this conversation from Slack. Updates continue in ${dashboard}. Mention me here to attach it again.`;
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Tell a Slack thread once that its Conversation was detached, so people
|
|
241
|
-
* there know replies stopped. Call it only when the detach changed state.
|
|
242
|
-
* Run it inside the Slack installation of `location.teamId`.
|
|
243
|
-
*/
|
|
244
|
-
async function postSlackDetachNotice(args) {
|
|
245
|
-
const { location } = args;
|
|
246
|
-
if (!location.threadTs) return;
|
|
247
|
-
await postSlackMessage({
|
|
248
|
-
channelId: location.channelId,
|
|
249
|
-
text: detachNoticeText(args.conversationId, args.actorName),
|
|
250
|
-
threadTs: location.threadTs
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
231
|
// src/api/conversations/delivery.ts
|
|
254
232
|
/**
|
|
255
233
|
* Detach a root from its Location, or attach it again. Only a participant
|
|
@@ -3012,19 +2990,16 @@ function createSpaceArchiveRoutes(options) {
|
|
|
3012
2990
|
const { archived } = context.req.valid("json");
|
|
3013
2991
|
const space = await requireMemberSpace(viewerUserId, spaceId);
|
|
3014
2992
|
const lead = await getSpaceLead(spaceId);
|
|
3015
|
-
if (archived !== (space.archivedAt !== null)) {
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
});
|
|
3026
|
-
await writeLegacySpaceArchive(spaceId, result.status === "archived" ? new Date(result.archivedAt) : null);
|
|
3027
|
-
}
|
|
2993
|
+
if (archived !== (space.archivedAt !== null)) await setConversationArchive(archived ? {
|
|
2994
|
+
applyToChildren: true,
|
|
2995
|
+
archived: true,
|
|
2996
|
+
conversationId: lead.conversationId
|
|
2997
|
+
} : {
|
|
2998
|
+
applyToChildren: true,
|
|
2999
|
+
archived: false,
|
|
3000
|
+
conversationId: lead.conversationId,
|
|
3001
|
+
userId: viewerUserId
|
|
3002
|
+
});
|
|
3028
3003
|
if (archived) await stopArchivedWork(lead.conversationId, options.queue);
|
|
3029
3004
|
return await spaceResponse(viewerUserId, spaceId);
|
|
3030
3005
|
});
|
|
@@ -3072,12 +3047,12 @@ const TREE_STATE_ORDER = [
|
|
|
3072
3047
|
*/
|
|
3073
3048
|
async function readSpaceStates(db, spaceIds, viewerUserId) {
|
|
3074
3049
|
if (spaceIds.length === 0) return /* @__PURE__ */ new Map();
|
|
3075
|
-
const leads = db.select({ id: spaceLead.conversationId }).from(spaceLead).where(and(eq(spaceLead.kind, "lead"), inArray(spaceLead.spaceId, [...spaceIds])))
|
|
3050
|
+
const leads = sql`array(${db.select({ id: spaceLead.conversationId }).from(spaceLead).where(and(eq(spaceLead.kind, "lead"), inArray(spaceLead.spaceId, [...spaceIds])))})`;
|
|
3076
3051
|
const roots = await db.select({
|
|
3077
3052
|
conversationId: juniorConversations.conversationId,
|
|
3078
3053
|
spaceId: rootSpaceIdSql(juniorConversations),
|
|
3079
3054
|
latestTurnFailed: conversationTurnFailedSql(juniorConversations)
|
|
3080
|
-
}).from(juniorConversations).where(and(or(
|
|
3055
|
+
}).from(juniorConversations).where(and(or(sql`${juniorConversations.conversationId} = any(${leads})`, sql`${juniorConversations.parentConversationId} = any(${leads})`), isNull(juniorConversations.archivedAt), isNull(juniorConversations.quickQuestionAt), rootVisibleToViewer(viewerUserId))).orderBy(desc(juniorConversations.lastActivityAt)).limit(SPACE_STATE_CONVERSATION_LIMIT);
|
|
3081
3056
|
const trees = await readConversationTreeStates(db, roots.map((root) => root.conversationId), viewerUserId);
|
|
3082
3057
|
const states = new Map(spaceIds.map((spaceId) => [spaceId, {
|
|
3083
3058
|
latestTurnFailed: false,
|
|
@@ -3534,7 +3509,7 @@ async function readPeoplePluginReports(args) {
|
|
|
3534
3509
|
reports: [],
|
|
3535
3510
|
source: "plugins"
|
|
3536
3511
|
});
|
|
3537
|
-
const { getPluginProfileReports } = await import("./reports-
|
|
3512
|
+
const { getPluginProfileReports } = await import("./reports-K-tbtEyx.js");
|
|
3538
3513
|
return pluginOperationalReportFeedSchema.parse({
|
|
3539
3514
|
generatedAt: new Date(nowMs).toISOString(),
|
|
3540
3515
|
reports: await getPluginProfileReports({
|
|
@@ -4148,12 +4123,6 @@ async function searchAutomationsForViewer(viewer, query, limit) {
|
|
|
4148
4123
|
}]);
|
|
4149
4124
|
}
|
|
4150
4125
|
// src/chat/inbox-items/search.ts
|
|
4151
|
-
function codeChangeSubjectKinds() {
|
|
4152
|
-
return getPlugins().flatMap((plugin) => (plugin.inboxSubjects ?? []).flatMap((subject) => {
|
|
4153
|
-
const kind = `${plugin.manifest.name}:${subject.kind}`;
|
|
4154
|
-
return codeChangeSubjectProvider(kind) ? [kind] : [];
|
|
4155
|
-
}));
|
|
4156
|
-
}
|
|
4157
4126
|
function subjectCodeChange(item, change) {
|
|
4158
4127
|
return and(eq(change.providerId, item.subjectId), eq(change.provider, sql`split_part(${item.subjectKind}, ':', 1)`));
|
|
4159
4128
|
}
|
|
@@ -4396,7 +4365,7 @@ function callbackUrl(request, provider) {
|
|
|
4396
4365
|
return new URL(`api/service-accounts/${encodeURIComponent(provider)}/callback`, base.endsWith("/") ? base : `${base}/`).toString();
|
|
4397
4366
|
}
|
|
4398
4367
|
function requirePlugin(provider) {
|
|
4399
|
-
const plugin =
|
|
4368
|
+
const plugin = getAppContext().catalog.getDefinition(provider);
|
|
4400
4369
|
if (!plugin?.manifest.accounts?.serviceAccount) throwApiError(404, "Service account not found.");
|
|
4401
4370
|
return plugin;
|
|
4402
4371
|
}
|
|
@@ -4413,7 +4382,7 @@ function callbackPage(title, message, status) {
|
|
|
4413
4382
|
*/
|
|
4414
4383
|
function createServiceAccountRoutes() {
|
|
4415
4384
|
const app = new Hono();
|
|
4416
|
-
app.get("/", requireAdmin, async () => jsonResponse(serviceAccountListSchema, { serviceAccounts: await mapBounded(serviceAccountPlugins(
|
|
4385
|
+
app.get("/", requireAdmin, async () => jsonResponse(serviceAccountListSchema, { serviceAccounts: await mapBounded(serviceAccountPlugins(getAppContext().catalog.getProviders()), getServiceAccountStatus) }));
|
|
4417
4386
|
app.post("/:provider", requireAdmin, validateRequest("param", serviceAccountParamsSchema, "Invalid provider."), async (context) => {
|
|
4418
4387
|
const { provider } = context.req.valid("param");
|
|
4419
4388
|
const { authorizationUrl } = await startServiceAccountSignIn({
|
|
@@ -5482,6 +5451,19 @@ async function readItemRoots(db, items, viewer) {
|
|
|
5482
5451
|
}]];
|
|
5483
5452
|
}));
|
|
5484
5453
|
}
|
|
5454
|
+
/**
|
|
5455
|
+
* Read the owner Conversations of a page of items that the viewer cannot
|
|
5456
|
+
* see. Only a role on a plugin item's object (`assigneeRoles`) puts a
|
|
5457
|
+
* person on an item outside its Conversation, so only those owners are
|
|
5458
|
+
* read. Their card then shows the item and its subject, and no
|
|
5459
|
+
* Conversation.
|
|
5460
|
+
*/
|
|
5461
|
+
async function readHiddenOwners(db, items, viewer) {
|
|
5462
|
+
const ids = [...new Set(items.flatMap((item) => hasAssigneeRoles(item) ? ownerConversationId(item) ?? [] : []))];
|
|
5463
|
+
if (ids.length === 0) return /* @__PURE__ */ new Set();
|
|
5464
|
+
const access = await readConversationAccessFromSql(db, ids, viewer);
|
|
5465
|
+
return new Set(ids.filter((id) => !access.get(id)?.canViewPrivateContent));
|
|
5466
|
+
}
|
|
5485
5467
|
// src/api/inbox-items/mentions.ts
|
|
5486
5468
|
/**
|
|
5487
5469
|
* Resolve the people that each Inbox item's title, body, and question
|
|
@@ -5551,6 +5533,7 @@ function subjectPayload(item, views, viewer) {
|
|
|
5551
5533
|
const url = view?.url;
|
|
5552
5534
|
const object = view?.object;
|
|
5553
5535
|
const label = subjectKindLabel(subject.kind, getPlugins(), object, viewer);
|
|
5536
|
+
const dismissNote = subjectKindDismissNote(subject.kind, getPlugins(), object, viewer);
|
|
5554
5537
|
const objectType = url && readLinkObjectType(url);
|
|
5555
5538
|
const snoozeUrl = url ?? questionLinks(item)[0];
|
|
5556
5539
|
const resource = snoozeUrl && snoozeSubjectResource(getEventCatalog(), snoozeUrl);
|
|
@@ -5558,6 +5541,7 @@ function subjectPayload(item, views, viewer) {
|
|
|
5558
5541
|
id: subject.id,
|
|
5559
5542
|
kind: subject.kind,
|
|
5560
5543
|
...label ? { label } : void 0,
|
|
5544
|
+
...dismissNote ? { dismissNote } : void 0,
|
|
5561
5545
|
...url ? { url } : void 0,
|
|
5562
5546
|
...object ? { object } : void 0,
|
|
5563
5547
|
...objectType ? { objectType } : void 0,
|
|
@@ -5580,8 +5564,10 @@ function wakePayload(reason) {
|
|
|
5580
5564
|
};
|
|
5581
5565
|
}
|
|
5582
5566
|
/** Build the API payload of one Inbox item for its viewer. */
|
|
5583
|
-
function inboxItemPayload(item, viewer, roots, mentions, related, wake, views) {
|
|
5584
|
-
const
|
|
5567
|
+
function inboxItemPayload(item, viewer, roots, mentions, related, wake, views, hidden) {
|
|
5568
|
+
const owner = ownerConversationId(item);
|
|
5569
|
+
const conversationHidden = owner !== void 0 && hidden.has(owner);
|
|
5570
|
+
const conversationId = conversationHidden ? void 0 : owner;
|
|
5585
5571
|
const root = conversationId ? roots.get(conversationId) : void 0;
|
|
5586
5572
|
const todo = subjectTodo(item.subject);
|
|
5587
5573
|
const question = inboxItemQuestion(item.request);
|
|
@@ -5592,8 +5578,8 @@ function inboxItemPayload(item, viewer, roots, mentions, related, wake, views) {
|
|
|
5592
5578
|
body: item.body,
|
|
5593
5579
|
canAct: canActOnInboxItem(item, viewer.id),
|
|
5594
5580
|
canAnswer: canAnswerInboxItem(item, viewer.id),
|
|
5595
|
-
canTake: canActOnInboxItem(item, viewer.id) && !isOnlyAssignee(item, viewer.id),
|
|
5596
|
-
conversationIds: item.conversationIds,
|
|
5581
|
+
canTake: canActOnInboxItem(item, viewer.id) && !isOnlyAssignee(item, viewer.id) && !hasAssigneeRoles(item),
|
|
5582
|
+
conversationIds: conversationHidden ? [] : item.conversationIds,
|
|
5597
5583
|
createdAt: item.createdAt.toISOString(),
|
|
5598
5584
|
id: item.id,
|
|
5599
5585
|
kind: item.kind,
|
|
@@ -5605,7 +5591,7 @@ function inboxItemPayload(item, viewer, roots, mentions, related, wake, views) {
|
|
|
5605
5591
|
visibility: item.visibility,
|
|
5606
5592
|
...conversationId ? { rootConversationId: root?.rootConversationId ?? conversationId } : void 0,
|
|
5607
5593
|
...item.answer ? { answer: item.answer } : void 0,
|
|
5608
|
-
...item.addedByTurnId ? { addedByTurnId: item.addedByTurnId } : void 0,
|
|
5594
|
+
...item.addedByTurnId && !conversationHidden ? { addedByTurnId: item.addedByTurnId } : void 0,
|
|
5609
5595
|
...item.addedByAutomationId ? { automationId: item.addedByAutomationId } : void 0,
|
|
5610
5596
|
...item.closeReason ? { closeReason: item.closeReason } : void 0,
|
|
5611
5597
|
...item.closedAt ? { closedAt: item.closedAt.toISOString() } : void 0,
|
|
@@ -5625,8 +5611,9 @@ function inboxItemPayload(item, viewer, roots, mentions, related, wake, views) {
|
|
|
5625
5611
|
*/
|
|
5626
5612
|
async function inboxItemPayloads(items, viewer, reader) {
|
|
5627
5613
|
const db = getDb();
|
|
5628
|
-
const [roots, mentions, related, snoozes, views] = await Promise.all([
|
|
5614
|
+
const [roots, hidden, mentions, related, snoozes, views] = await Promise.all([
|
|
5629
5615
|
readItemRoots(db, items, viewer),
|
|
5616
|
+
readHiddenOwners(db, items, viewer),
|
|
5630
5617
|
readInboxItemMentions(getSqlExecutor(), items),
|
|
5631
5618
|
readRelatedReviewWork(db, reader, viewer, items),
|
|
5632
5619
|
readViewerInboxSnoozes(db, {
|
|
@@ -5636,7 +5623,7 @@ async function inboxItemPayloads(items, viewer, reader) {
|
|
|
5636
5623
|
resolveInboxItemSubjects(viewer, items)
|
|
5637
5624
|
]);
|
|
5638
5625
|
return items.map((item, index) => {
|
|
5639
|
-
const payload = inboxItemPayload(item, viewer, roots, mentions[index], related.get(item.id), snoozes.wakeReasons.get(item.id), views);
|
|
5626
|
+
const payload = inboxItemPayload(item, viewer, roots, mentions[index], related.get(item.id), snoozes.wakeReasons.get(item.id), views, hidden);
|
|
5640
5627
|
return snoozes.snoozed.has(item.id) ? {
|
|
5641
5628
|
...payload,
|
|
5642
5629
|
snoozedByViewer: true
|
|
@@ -5985,7 +5972,7 @@ function readDescriptionText(home) {
|
|
|
5985
5972
|
}
|
|
5986
5973
|
/** Read discovered skills for runtime diagnostics and the Automation editor. */
|
|
5987
5974
|
async function readSkillReports() {
|
|
5988
|
-
const { discoverSkills } = await import("./skills-
|
|
5975
|
+
const { discoverSkills } = await import("./skills-Ccjw8h2P.js").then((n) => n.s);
|
|
5989
5976
|
const skills = await discoverSkills();
|
|
5990
5977
|
return skillReportsSchema.parse(skills.map((skill) => ({
|
|
5991
5978
|
name: skill.name,
|
|
@@ -5999,10 +5986,10 @@ async function readSkillReports() {
|
|
|
5999
5986
|
* what the skill tells Junior. Returns null when no skill has that name.
|
|
6000
5987
|
*/
|
|
6001
5988
|
async function readSkillDetailReport(name) {
|
|
6002
|
-
const { discoverSkills, findSkillByName, parseSkillFile } = await import("./skills-
|
|
5989
|
+
const { discoverSkills, findSkillByName, parseSkillFile } = await import("./skills-Ccjw8h2P.js").then((n) => n.s);
|
|
6003
5990
|
const skill = findSkillByName(name, await discoverSkills());
|
|
6004
5991
|
if (!skill) return null;
|
|
6005
|
-
const parsed = parseSkillFile(await fs.readFile(path.join(skill.skillPath, "SKILL.md"), "utf8"), skill.name);
|
|
5992
|
+
const parsed = parseSkillFile(await fs$1.readFile(path.join(skill.skillPath, "SKILL.md"), "utf8"), skill.name);
|
|
6006
5993
|
if (!parsed.ok) throw new Error(`Invalid skill file for ${skill.name}: ${parsed.error}`);
|
|
6007
5994
|
return skillDetailReportSchema.parse({
|
|
6008
5995
|
name: skill.name,
|
|
@@ -6014,8 +6001,8 @@ async function readSkillDetailReport(name) {
|
|
|
6014
6001
|
}
|
|
6015
6002
|
/** Read safe configured plugin metadata for authenticated runtime diagnostics. */
|
|
6016
6003
|
async function readPlugins() {
|
|
6017
|
-
const {
|
|
6018
|
-
return pluginsSchema.parse(
|
|
6004
|
+
const { getAppContext } = await import("./db-BCaNWl9p.js").then((n) => n.Nd);
|
|
6005
|
+
return pluginsSchema.parse(getAppContext().catalog.getProviders().map((plugin) => ({
|
|
6019
6006
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
6020
6007
|
description: plugin.manifest.description,
|
|
6021
6008
|
displayName: plugin.manifest.displayName,
|
|
@@ -6024,9 +6011,9 @@ async function readPlugins() {
|
|
|
6024
6011
|
}
|
|
6025
6012
|
/** Read authenticated runtime discovery data. */
|
|
6026
6013
|
async function readRuntimeInfoReport() {
|
|
6027
|
-
const [{ homeDir }, {
|
|
6028
|
-
import("./
|
|
6029
|
-
import("./
|
|
6014
|
+
const [{ homeDir }, { getAppContext }, plugins, skills] = await Promise.all([
|
|
6015
|
+
import("./topics-DxuKurCX.js").then((n) => n.c),
|
|
6016
|
+
import("./db-BCaNWl9p.js").then((n) => n.Nd),
|
|
6030
6017
|
readPlugins(),
|
|
6031
6018
|
readSkillReports()
|
|
6032
6019
|
]);
|
|
@@ -6037,13 +6024,13 @@ async function readRuntimeInfoReport() {
|
|
|
6037
6024
|
descriptionText: readDescriptionText(home),
|
|
6038
6025
|
providers: plugins.map((plugin) => plugin.name),
|
|
6039
6026
|
skills,
|
|
6040
|
-
packagedContent:
|
|
6027
|
+
packagedContent: getAppContext().catalog.getPackageContent()
|
|
6041
6028
|
});
|
|
6042
6029
|
}
|
|
6043
6030
|
/** Read sanitized operational summaries contributed by plugins. */
|
|
6044
6031
|
async function readPluginOperationalReportFeed() {
|
|
6045
6032
|
const nowMs = Date.now();
|
|
6046
|
-
const { getPluginOperationalReports } = await import("./reports-
|
|
6033
|
+
const { getPluginOperationalReports } = await import("./reports-K-tbtEyx.js");
|
|
6047
6034
|
return pluginOperationalReportFeedSchema.parse({
|
|
6048
6035
|
source: "plugins",
|
|
6049
6036
|
generatedAt: new Date(nowMs).toISOString(),
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { n as JuniorPluginSet } from "./plugins-
|
|
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-K-KsqNhT.js";
|
|
4
4
|
import "./db-BpxcYXfD.js";
|
|
5
5
|
import "./sentry-DrKC2NeM.js";
|
|
6
6
|
import { Hono } from "hono";
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
import "@earendil-works/pi-ai/compat";
|
|
9
9
|
import "@earendil-works/pi-ai/api/anthropic-messages";
|
|
10
|
-
import "ai";
|
|
11
|
-
import "@earendil-works/pi-ai";
|
|
12
|
-
import { Destination, Source, locationSchema } from "@sentry/junior-plugin-api";
|
|
13
10
|
import "drizzle-orm";
|
|
14
|
-
import "@
|
|
11
|
+
import { Destination, Source, locationSchema } from "@sentry/junior-plugin-api";
|
|
15
12
|
import "@modelcontextprotocol/sdk/client/auth.js";
|
|
16
13
|
import "@modelcontextprotocol/sdk/client";
|
|
14
|
+
import "ai";
|
|
15
|
+
import "@earendil-works/pi-ai";
|
|
16
|
+
import "@earendil-works/pi-agent-core";
|
|
17
17
|
import { StateAdapter } from "chat";
|
|
18
18
|
import { SlackAdapter } from "@chat-adapter/slack";
|
|
19
19
|
interface BotModelConfig {
|
|
@@ -46,8 +46,8 @@ interface RuntimeLimits {
|
|
|
46
46
|
contextWindowTokens?: number;
|
|
47
47
|
/**
|
|
48
48
|
* Levels of child agents that can start their own child agents. The
|
|
49
|
-
* default,
|
|
50
|
-
*
|
|
49
|
+
* default, 2, lets a child of the root and its children start child
|
|
50
|
+
* agents. 0 lets only the root Conversation start them.
|
|
51
51
|
*/
|
|
52
52
|
maxAgentDepth?: number;
|
|
53
53
|
/** Automated turns in a row before Junior stops answering automation. */
|
|
@@ -205,11 +205,6 @@ interface Conversation {
|
|
|
205
205
|
* a Lead stores it.
|
|
206
206
|
*/
|
|
207
207
|
spaceId?: string;
|
|
208
|
-
/**
|
|
209
|
-
* Set on a child whose Location is its own, not a copy of its parent's,
|
|
210
|
-
* such as a Slack Conversation that moved into a Space.
|
|
211
|
-
*/
|
|
212
|
-
ownLocation?: true;
|
|
213
208
|
/**
|
|
214
209
|
* When the Conversation was archived for everyone. Only archive, auto-archive,
|
|
215
210
|
* pin, and a person's message write it; `upsertConversation` does not.
|
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-
|
|
2
|
-
import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-
|
|
1
|
+
import { i as MemoryOptions, n as createApp, r as JuniorDashboardOptions, t as JuniorAppOptions } from "./app-tACXxJPI.js";
|
|
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 };
|