@sentry/junior 0.275.0 → 0.277.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-dE2BiWP_.js → adapter-BtfBHVM5.js} +1 -1
- package/dist/{admin-CkPaAYuZ.js → admin-DzAKbZsm.js} +1 -1
- package/dist/{agent-invocations-C1RNOCs8.js → agent-invocations-Crs3XHhg.js} +6 -1
- package/dist/{agent-runner-bE7aH7ew.js → agent-runner-BsYAbniN.js} +394 -244
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +4 -4
- package/dist/api.d.ts +13 -2
- package/dist/api.js +186 -68
- package/dist/{app-CgkquhZ8.d.ts → app-BjEQwNVP.d.ts} +11 -3
- package/dist/app.d.ts +2 -2
- package/dist/app.js +227 -112
- package/dist/{assistant-reply-CjRU9Z59.js → assistant-reply-NebRGG4G.js} +1 -1
- package/dist/{automation-BGrd03QO.js → automation-Cql9h2vO.js} +42 -13
- package/dist/{background-compaction-queue-BYuOt3qK.js → background-compaction-queue-hh18yCeU.js} +2 -2
- package/dist/{briefs-6xUvmGos.js → briefs-BBo0Eimi.js} +4 -4
- package/dist/{catalog-runtime-DcJ5NHDW.js → catalog-runtime-DE-F4Awo.js} +1 -1
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +14 -14
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.d.ts +1 -1
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +2 -2
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-gnKpkpqP.js → client-DZ8HTnYH.js} +2 -2
- package/dist/{config-D0GKc9sC.js → config-D5uUtrCP.js} +2 -2
- package/dist/{connections-DLqP5Bp1.js → connections-Do24CGP5.js} +14 -14
- package/dist/{conversation-BjTo9ZFL.js → conversation-SsASlWL7.js} +35 -12
- package/dist/{conversation-privacy-BCXFshP9.js → conversation-privacy-VuylvlKr.js} +1 -1
- package/dist/{credential-sync-BjihXFF2.js → credential-sync-BGQK3pOa.js} +13 -13
- package/dist/{db-BMZhoYKj.d.ts → db-DEiwO5Sh.d.ts} +1 -1
- package/dist/{executor-j8VMt-To.js → executor-hPfFTH0C.js} +13 -5
- package/dist/instrumentation.d.ts +14 -0
- package/dist/instrumentation.js +29 -6
- package/dist/{logging-CFHIO4Vs.js → logging-cI3T1dNc.js} +4 -2
- package/dist/{message-DH0cqFRS.js → message-DBwsAl7O.js} +9 -9
- package/dist/nitro.d.ts +2 -2
- package/dist/nitro.js +7 -3
- package/dist/{oauth-callback-server-BgU4EZsJ.js → oauth-callback-server-DXrnbplb.js} +2 -2
- package/dist/{plugins-B_0Cr0MO.d.ts → plugins-DtmjkTza.d.ts} +1 -0
- package/dist/{projection-CTvLSwcm.js → projection-7EFIqzuj.js} +4108 -3898
- package/dist/{prompt-JEWUUpLW.js → prompt-oRfGsxd3.js} +1 -1
- package/dist/{registry-OsyWR4GO.js → registry-Bzefs7kT.js} +24 -8
- package/dist/{resolve-DCrKjmVP.js → resolve-CuiEY_2u.js} +3 -3
- package/dist/{result-Btdt5bSl.js → result-DrcUtFaD.js} +9 -9
- package/dist/{runner-C1AwS93W.js → runner-CDE4CZ52.js} +12 -12
- package/dist/{sandbox-egress-signals-C-5i7Zxm.js → sandbox-egress-signals-0tcmGd13.js} +1 -1
- package/dist/{schema-DfdHlBnb.d.ts → schema-B6N2nc6v.d.ts} +108 -15
- package/dist/{schema-CX9XGKCm.js → schema-Dzi3lkdP.js} +25 -8
- package/dist/{service-account-DZX1KlQl.js → service-account-BOz9pqOE.js} +3 -3
- package/dist/{service-account-CQIW6At4.js → service-account-DIyz_9Uh.js} +3 -3
- package/dist/{session-stop-DjIyORJw.js → session-stop-0juF_BP0.js} +159 -55
- package/dist/{skills-BEfAAT6p.js → skills-CU5Is147.js} +2 -2
- package/dist/{spawn-Dgj4xxvO.js → spawn-6C9jHH4b.js} +2 -2
- package/dist/{stop-DomyNvuv.js → stop-6FVG1c-r.js} +487 -203
- package/dist/{store-Dp3RMEQd.js → store-DKs1WwdB.js} +3 -3
- package/dist/{store-B7Z6zIc7.js → store-DtHZviJ1.js} +11 -9
- package/dist/{task-queue-CVQ9cWnC.js → task-queue-CcvFQE_p.js} +3 -3
- package/dist/{task-runner-DHBG47gS.js → task-runner-DBkNejLl.js} +6 -6
- package/dist/{thread-state-BF8VwIxd.js → thread-state-4hjEIkIq.js} +4 -4
- package/dist/{turn-failure-response-Di7TbgsF.js → turn-failure-response-BZNLydC3.js} +7 -7
- package/dist/{turn-lifecycle-DzXwXmLg.js → turn-lifecycle-BhqYjaa4.js} +6 -1
- package/dist/{turn-session-routing-CIWhXKeT.js → turn-session-routing-jnLOfBHJ.js} +17 -16
- package/dist/{validation-BRmwRaXc.js → validation-BUFmsnKs.js} +1 -1
- package/dist/{version-DBVMsgvA.js → version-DJTk0ZCE.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-BFADRGP8.js → viewer-WY0RYE4E.js} +53 -15
- package/dist/{work-DDaoxZAw.js → work-C5AKvXJV.js} +30 -12
- package/dist/{worker-Bub0fDtW.js → worker-BcYVDVUy.js} +6 -6
- package/migrations/0073_conversation_quick_question.sql +1 -0
- package/migrations/0074_conversation_participant_pins.sql +1 -0
- package/migrations/0075_conversation_detail_version.sql +1 -0
- package/migrations/0076_conversation_auto_archive.sql +5 -0
- package/migrations/meta/0073_snapshot.json +4070 -0
- package/migrations/meta/0074_snapshot.json +4076 -0
- package/migrations/meta/0075_snapshot.json +4299 -0
- package/migrations/meta/0076_snapshot.json +4363 -0
- package/migrations/meta/_journal.json +29 -1
- package/package.json +5 -4
package/dist/api/schema.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { type AcceptedConversationMessage, type ActorActivityDayReport, type ActorDirectoryReport, type ActorDirectoryWindows, type ActorIdentity, type ActorProfileReport, type ActorSummaryReport, type ActorTotalsReport, type ActorWindowMetrics, type ApiError, type ArchiveConversationBody, type ArchiveConversationResponse, type AutomationCard, type AutomationEdit, type AutomationExecution, type AutomationExecutionDay, type AutomationExecutionList, type AutomationExecutionStatusDay, type AutomationList, type AutomationListQuery, type AutomationRun, type AutomationRunList, type AutomationRunWindows, type AutomationScheduleIntent, type AutomationSummary, type AutomationUpdate, type AutomationVersionList, type BaselineSnapshotReport, type CancelConversationPendingMessagesBody, type CancelConversationPendingMessagesResponse, type CodeActivityDay, type CodeChangeSummaryReport, type CodeOverviewReport, type CodePersonReport, type CodeRepositoryReport, type CodeRepositorySummary, type ConversationActivityPreview, type ConversationAgentTreeNode, type ConversationAuxiliaryCosts, type ConversationChildAgent, type ConversationChildAgentTotals, type ConversationChildAgentsReport, type ConversationCost, type ConversationDetailReport, type ConversationEventHistory, type ConversationEventPage, type ConversationFeed, type ConversationMetricDay, type ConversationModelUsage, type ConversationParams, type ConversationPendingMessage, type ConversationPendingMessageDelivery, type ConversationPendingMessagesReport, type ConversationReadPosition, type ConversationReportEvent, type ConversationReportEventData, type ConversationReportMessageEvent, type ConversationReportStatus, type ConversationSourceTask, type ConversationStatsItem, type ConversationStatsReport, type ConversationSummaryReport, type ConversationSurface, type ConversationTurnFailureCode, type ConversationTurnFailureReason, type ConversationUsage, type ConversationWatch, type ConversationWatchesReport, type CreateConversationBody, type CreateConversationMessageBody, type DailyConversationActivity, type GuardianMetricDay, type GuardianStats, type HealthReport, INPUT_IMAGE_TYPES, type InputImage, type ListedAutomationVersion, type LocationActivityDayReport, type LocationActorSummaryReport, type LocationDetailReport, type LocationDirectoryReport, type LocationParams, type LocationSummaryReport, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, type MessageAttachment, type MessageCard, type OwnedObjectAnnotation, type PeopleActivityDayReport, type PersonParams, type PersonalSpendReport, type PersonalTokenMetadata, type Plugin, type PluginOperationalReport, type PluginOperationalReportFeed, type PluginPackageContentItemReport, type PluginPackageContentReport, type Plugins, type ReviewItemActionBody, type ReviewItemPayload, type RuntimeInfoReport, type SkillReport, type SkillReports, type StatReport, type StatsReport, type SteerConversationPendingMessagesBody, type SteerConversationPendingMessagesResponse, type StopConversationTurnResponse, USER_CUSTOMIZATION_MAX_CHARS, USER_INPUT_NOTE, type UserInputAnswer, type UserInputField, type UserInputRequest, type WorkspaceListReport, type WorkspaceReport, acceptedConversationMessageSchema, actorDirectoryReportSchema, actorProfileReportSchema, apiErrorSchema, archiveConversationBodySchema, archiveConversationResponseSchema, automationEditErrorSchema, automationEditSchema, automationEventCatalogSchema, automationExecutionListSchema, automationExecutionSchema, automationExecutionStatusDaySchema, automationExecutionStatusSchema, automationListQuerySchema, automationListSchema, automationParamsSchema, automationRunListSchema, automationRunSchema, automationRunWindowsSchema, automationScheduleIntentSchema, automationSchedulePreviewSchema, automationSummarySchema, automationUpdateSchema, automationVersionActivateSchema, automationVersionListSchema, automationVersionParamsSchema, automationVersionSchema, baselineSnapshotSchema, buttonUserInputField, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, codeActivityDaySchema, codeChangeSummaryReportSchema, codeChangeSummarySchema, codeOverviewReportSchema, codePersonReportSchema, codeRepositoryParamsSchema, codeRepositoryReportSchema, codeRepositorySummarySchema, connectionListSchema, connectionParamsSchema, connectionSchema, conversationActivityPreviewSchema, conversationAuxiliaryCostsSchema, conversationChildAgentSchema, conversationChildAgentTotalsSchema, conversationChildAgentsReportSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventHistorySchema, conversationEventPageSchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReadPositionSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, conversationWatchSchema, conversationWatchesReportSchema, createConversationBodySchema, createConversationMessageBodySchema, createPersonalTokenBodySchema, createdPersonalTokenSchema, dailyConversationActivitySchema, deleteWorkspaceResponseSchema, disconnectConnectionResponseSchema, disconnectServiceAccountResponseSchema, eventAutomationSummarySchema, forkConversationBodySchema, forkConversationResponseSchema, healthReportSchema, isEmptyUserInputAnswer, locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, messageCardText, normalizeUserInputAnswer, personParamsSchema, personalSpendReportSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginSchema, pluginsSchema, resolveMessageCards, reviewItemActionSchema, reviewItemCountSchema, reviewItemListSchema, reviewItemSchema, reviewItemWaitingConversationsSchema, revokePersonalTokenResponseSchema, runtimeInfoReportSchema, scheduledAutomationSummarySchema, serviceAccountListSchema, serviceAccountParamsSchema, serviceAccountSchema, skillReportSchema, skillReportsSchema, startConnectionResponseSchema, startServiceAccountSignInResponseSchema, statSchema, statsReportSchema, steerConversationPendingMessagesBodySchema, steerConversationPendingMessagesResponseSchema, stopConversationTurnResponseSchema, userCustomizationSchema, webMessageId, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };
|
|
1
|
+
import { $ as automationExecutionSchema, $n as ConversationAgentTreeNode, $r as CodeActivityDay, $t as LocationParams, A as StatReport, Ai as MAX_INPUT_IMAGES, An as pinConversationResponseSchema, Ar as conversationDetailQuerySchema, At as PersonalTokenMetadata, B as AutomationListQuery, Bn as conversationStatsReportSchema, Br as conversationPendingMessageSchema, Bt as serviceAccountSchema, C as pluginPackageContentItemReportSchema, Ci as UserInputField, Cn as ConversationChildAgent, Cr as SteerConversationPendingMessagesBody, Ct as workspaceBodySchema, D as runtimeInfoReportSchema, Di as normalizeUserInputAnswer, Dn as PinConversationBody, Dr as cancelConversationPendingMessagesResponseSchema, Dt as workspaceSchema, E as pluginsSchema, Ei as isEmptyUserInputAnswer, En as conversationChildAgentsReportSchema, Er as cancelConversationPendingMessagesBodySchema, Et as workspaceRepoSchema, F as AutomationExecution, Fn as ConversationMetricDay, Fr as conversationFeedQuerySchema, Ft as personalTokenParamsSchema, G as AutomationSummary, Gn as archiveConversationResponseSchema, Gr as createConversationBodySchema, Gt as disconnectConnectionResponseSchema, H as AutomationRunList, Hn as ArchiveConversationResponse, Hr as conversationReportEventDataSchema, Ht as connectionListSchema, I as AutomationExecutionDay, In as ConversationStatsItem, Ir as conversationFeedSchema, It as revokePersonalTokenResponseSchema, J as ListedAutomationVersion, Jn as AcceptedConversationMessage, Jr as forkConversationResponseSchema, Jt as apiErrorSchema, K as AutomationUpdate, Kn as archiveDoneConversationsResponseSchema, Kr as createConversationMessageBodySchema, Kt as startConnectionResponseSchema, L as AutomationExecutionList, Ln as ConversationStatsReport, Lr as conversationParamsSchema, Lt as disconnectServiceAccountResponseSchema, M as statSchema, Mi as MessageAttachment, Mn as conversationReadPositionSchema, Mr as conversationEventHistorySchema, Mt as createdPersonalTokenSchema, N as statsReportSchema, Ni as INPUT_IMAGE_TYPES, Nn as StopConversationTurnResponse, Nr as conversationEventPageSchema, Nt as personalTokenListSchema, O as skillReportSchema, Oi as webMessageId, On as PinConversationResponse, Or as conversationActivityPreviewSchema, Ot as USER_CUSTOMIZATION_MAX_CHARS, P as AutomationEdit, Pn as stopConversationTurnResponseSchema, Pr as conversationEventsQuerySchema, Pt as personalTokenMetadataSchema, Q as automationExecutionListSchema, Qn as ConversationActivityPreview, Qr as conversationTurnFailureReasonSchema, Qt as LocationDirectoryReport, R as AutomationExecutionStatusDay, Rn as GuardianMetricDay, Rr as conversationPendingAuthorizationSchema, Rt as serviceAccountListSchema, S as pluginOperationalReportSchema, Si as UserInputAnswer, Sn as conversationWatchesReportSchema, Sr as CreateConversationMessageBody, St as deleteWorkspaceResponseSchema, T as pluginSchema, Ti as buttonUserInputField, Tn as conversationChildAgentSchema, Tr as acceptedConversationMessageSchema, Tt as workspaceParamsSchema, U as AutomationRunWindows, Un as ConversationAutoArchive, Ur as conversationReportEventSchema, Ut as connectionParamsSchema, V as AutomationRun, Vn as ArchiveConversationBody, Vr as conversationPendingMessagesReportSchema, Vt as startServiceAccountSignInResponseSchema, W as AutomationScheduleIntent, Wn as archiveConversationBodySchema, Wr as conversationSummaryReportSchema, Wt as connectionSchema, X as automationEditSchema, Xn as CancelConversationPendingMessagesBody, Xr as steerConversationPendingMessagesResponseSchema, Xt as LocationActorSummaryReport, Y as automationEditErrorSchema, Yn as ActorIdentity, Yr as steerConversationPendingMessagesBodySchema, Yt as LocationActivityDayReport, Z as automationEventCatalogSchema, Zn as CancelConversationPendingMessagesResponse, Zr as conversationTurnFailureCodeSchema, Zt as LocationDetailReport, _ as RuntimeInfoReport, _i as MessageCard, _n as personParamsSchema, _r as ConversationSurface, _t as scheduledAutomationSummarySchema, a as reviewItemCountSchema, ai as codeActivityDaySchema, an as ActorActivityDayReport, ar as ConversationFeed, at as automationRunListSchema, b as healthReportSchema, bi as AutomationCard, bn as ConversationWatchesReport, br as ConversationUsage, bt as WorkspaceReport, c as reviewItemWaitingConversationsSchema, ci as codeOverviewReportSchema, cn as ActorProfileReport, cr as ConversationPendingMessage, ct as automationScheduleIntentSchema, d as Plugin, di as codeRepositoryReportSchema, dn as ActorWindowMetrics, dr as ConversationReportEvent, dt as automationUpdateSchema, ei as CodeChangeSummaryReport, en as LocationSummaryReport, er as ConversationAuxiliaryCosts, et as automationExecutionStatusDaySchema, f as PluginOperationalReport, fi as codeRepositorySummarySchema, fn as PeopleActivityDayReport, fr as ConversationReportEventData, ft as automationVersionActivateSchema, g as Plugins, gi as dailyConversationActivitySchema, gn as actorProfileReportSchema, gr as ConversationSummaryReport, gt as eventAutomationSummarySchema, h as PluginPackageContentReport, hi as DailyConversationActivity, hn as actorDirectoryReportSchema, hr as ConversationSourceTask, ht as automationVersionSchema, i as reviewItemActionSchema, ii as CodeRepositorySummary, in as locationParamsSchema, ir as ConversationEventPage, it as automationParamsSchema, j as StatsReport, ji as MAX_INPUT_IMAGE_BYTES, jn as ConversationReadPosition, jr as conversationDetailReportSchema, jt as createPersonalTokenBodySchema, k as skillReportsSchema, ki as InputImage, kn as pinConversationBodySchema, kr as conversationAuxiliaryCostsSchema, kt as userCustomizationSchema, l as ReviewItemChangeRecord, li as codePersonReportSchema, ln as ActorSummaryReport, lr as ConversationPendingMessageDelivery, lt as automationSchedulePreviewSchema, m as PluginPackageContentItemReport, mi as conversationChildAgentTotalsSchema, mn as PersonalSpendReport, mr as ConversationReportStatus, mt as automationVersionParamsSchema, n as ReviewItemActionBody, ni as CodePersonReport, nn as locationDetailReportSchema, nr as ConversationDetailReport, nt as automationListQuerySchema, o as reviewItemListSchema, oi as codeChangeSummaryReportSchema, on as ActorDirectoryReport, or as ConversationModelUsage, ot as automationRunSchema, p as PluginOperationalReportFeed, pi as ConversationChildAgentTotals, pn as PersonParams, pr as ConversationReportMessageEvent, pt as automationVersionListSchema, q as AutomationVersionList, qn as conversationAutoArchiveSchema, qr as forkConversationBodySchema, qt as ApiError, r as ReviewItemPayload, ri as CodeRepositoryReport, rn as locationDirectoryReportSchema, rr as ConversationEventHistory, rt as automationListSchema, s as reviewItemSchema, si as codeChangeSummarySchema, sn as ActorDirectoryWindows, sr as ConversationParams, st as automationRunWindowsSchema, t as OwnedObjectAnnotation, ti as CodeOverviewReport, tn as locationActivityDayReportSchema, tr as ConversationCost, tt as automationExecutionStatusSchema, u as HealthReport, ui as codeRepositoryParamsSchema, un as ActorTotalsReport, ur as ConversationPendingMessagesReport, ut as automationSummarySchema, v as SkillReport, vi as messageCardText, vn as personalSpendReportSchema, vr as ConversationTurnFailureCode, vt as BaselineSnapshotReport, w as pluginPackageContentReportSchema, wi as UserInputRequest, wn as ConversationChildAgentsReport, wr as SteerConversationPendingMessagesResponse, wt as workspaceListSchema, x as pluginOperationalReportFeedSchema, xi as USER_INPUT_NOTE, xn as conversationWatchSchema, xr as CreateConversationBody, xt as baselineSnapshotSchema, y as SkillReports, yi as resolveMessageCards, yn as ConversationWatch, yr as ConversationTurnFailureReason, yt as WorkspaceListReport, z as AutomationList, zn as GuardianStats, zr as conversationPendingMessageDeliverySchema, zt as serviceAccountParamsSchema } from "../schema-B6N2nc6v.js";
|
|
2
|
+
export { type AcceptedConversationMessage, type ActorActivityDayReport, type ActorDirectoryReport, type ActorDirectoryWindows, type ActorIdentity, type ActorProfileReport, type ActorSummaryReport, type ActorTotalsReport, type ActorWindowMetrics, type ApiError, type ArchiveConversationBody, type ArchiveConversationResponse, type AutomationCard, type AutomationEdit, type AutomationExecution, type AutomationExecutionDay, type AutomationExecutionList, type AutomationExecutionStatusDay, type AutomationList, type AutomationListQuery, type AutomationRun, type AutomationRunList, type AutomationRunWindows, type AutomationScheduleIntent, type AutomationSummary, type AutomationUpdate, type AutomationVersionList, type BaselineSnapshotReport, type CancelConversationPendingMessagesBody, type CancelConversationPendingMessagesResponse, type CodeActivityDay, type CodeChangeSummaryReport, type CodeOverviewReport, type CodePersonReport, type CodeRepositoryReport, type CodeRepositorySummary, type ConversationActivityPreview, type ConversationAgentTreeNode, type ConversationAutoArchive, type ConversationAuxiliaryCosts, type ConversationChildAgent, type ConversationChildAgentTotals, type ConversationChildAgentsReport, type ConversationCost, type ConversationDetailReport, type ConversationEventHistory, type ConversationEventPage, type ConversationFeed, type ConversationMetricDay, type ConversationModelUsage, type ConversationParams, type ConversationPendingMessage, type ConversationPendingMessageDelivery, type ConversationPendingMessagesReport, type ConversationReadPosition, type ConversationReportEvent, type ConversationReportEventData, type ConversationReportMessageEvent, type ConversationReportStatus, type ConversationSourceTask, type ConversationStatsItem, type ConversationStatsReport, type ConversationSummaryReport, type ConversationSurface, type ConversationTurnFailureCode, type ConversationTurnFailureReason, type ConversationUsage, type ConversationWatch, type ConversationWatchesReport, type CreateConversationBody, type CreateConversationMessageBody, type DailyConversationActivity, type GuardianMetricDay, type GuardianStats, type HealthReport, INPUT_IMAGE_TYPES, type InputImage, type ListedAutomationVersion, type LocationActivityDayReport, type LocationActorSummaryReport, type LocationDetailReport, type LocationDirectoryReport, type LocationParams, type LocationSummaryReport, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, type MessageAttachment, type MessageCard, type OwnedObjectAnnotation, type PeopleActivityDayReport, type PersonParams, type PersonalSpendReport, type PersonalTokenMetadata, type PinConversationBody, type PinConversationResponse, type Plugin, type PluginOperationalReport, type PluginOperationalReportFeed, type PluginPackageContentItemReport, type PluginPackageContentReport, type Plugins, type ReviewItemActionBody, type ReviewItemChangeRecord, type ReviewItemPayload, type RuntimeInfoReport, type SkillReport, type SkillReports, type StatReport, type StatsReport, type SteerConversationPendingMessagesBody, type SteerConversationPendingMessagesResponse, type StopConversationTurnResponse, USER_CUSTOMIZATION_MAX_CHARS, USER_INPUT_NOTE, type UserInputAnswer, type UserInputField, type UserInputRequest, type WorkspaceListReport, type WorkspaceReport, acceptedConversationMessageSchema, actorDirectoryReportSchema, actorProfileReportSchema, apiErrorSchema, archiveConversationBodySchema, archiveConversationResponseSchema, archiveDoneConversationsResponseSchema, automationEditErrorSchema, automationEditSchema, automationEventCatalogSchema, automationExecutionListSchema, automationExecutionSchema, automationExecutionStatusDaySchema, automationExecutionStatusSchema, automationListQuerySchema, automationListSchema, automationParamsSchema, automationRunListSchema, automationRunSchema, automationRunWindowsSchema, automationScheduleIntentSchema, automationSchedulePreviewSchema, automationSummarySchema, automationUpdateSchema, automationVersionActivateSchema, automationVersionListSchema, automationVersionParamsSchema, automationVersionSchema, baselineSnapshotSchema, buttonUserInputField, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, codeActivityDaySchema, codeChangeSummaryReportSchema, codeChangeSummarySchema, codeOverviewReportSchema, codePersonReportSchema, codeRepositoryParamsSchema, codeRepositoryReportSchema, codeRepositorySummarySchema, connectionListSchema, connectionParamsSchema, connectionSchema, conversationActivityPreviewSchema, conversationAutoArchiveSchema, conversationAuxiliaryCostsSchema, conversationChildAgentSchema, conversationChildAgentTotalsSchema, conversationChildAgentsReportSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventHistorySchema, conversationEventPageSchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReadPositionSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, conversationWatchSchema, conversationWatchesReportSchema, createConversationBodySchema, createConversationMessageBodySchema, createPersonalTokenBodySchema, createdPersonalTokenSchema, dailyConversationActivitySchema, deleteWorkspaceResponseSchema, disconnectConnectionResponseSchema, disconnectServiceAccountResponseSchema, eventAutomationSummarySchema, forkConversationBodySchema, forkConversationResponseSchema, healthReportSchema, isEmptyUserInputAnswer, locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, messageCardText, normalizeUserInputAnswer, personParamsSchema, personalSpendReportSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, pinConversationBodySchema, pinConversationResponseSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginSchema, pluginsSchema, resolveMessageCards, reviewItemActionSchema, reviewItemCountSchema, reviewItemListSchema, reviewItemSchema, reviewItemWaitingConversationsSchema, revokePersonalTokenResponseSchema, runtimeInfoReportSchema, scheduledAutomationSummarySchema, serviceAccountListSchema, serviceAccountParamsSchema, serviceAccountSchema, skillReportSchema, skillReportsSchema, startConnectionResponseSchema, startServiceAccountSignInResponseSchema, statSchema, statsReportSchema, steerConversationPendingMessagesBodySchema, steerConversationPendingMessagesResponseSchema, stopConversationTurnResponseSchema, userCustomizationSchema, webMessageId, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };
|
package/dist/api/schema.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as conversationTurnFailureReasonSchema, s as conversationTurnFailureCodeSchema, t as INPUT_IMAGE_TYPES } from "../media-DstkkoNP.js";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as forkConversationResponseSchema, D as createConversationBodySchema, H as MAX_INPUT_IMAGES, M as steerConversationPendingMessagesResponseSchema, N as conversationChildAgentTotalsSchema, O as createConversationMessageBodySchema, P as conversationReadPositionSchema, R as messageCardText, U as MAX_INPUT_IMAGE_BYTES, V as resolveMessageCards, _ as conversationPendingMessageDeliverySchema, a as conversationActivityPreviewSchema, b as conversationReportEventDataSchema, c as conversationDetailQuerySchema, d as conversationEventPageSchema, f as conversationEventsQuerySchema, g as conversationPendingAuthorizationSchema, h as conversationParamsSchema, i as cancelConversationPendingMessagesResponseSchema, j as steerConversationPendingMessagesBodySchema, k as forkConversationBodySchema, l as conversationDetailReportSchema, m as conversationFeedSchema, p as conversationFeedQuerySchema, r as cancelConversationPendingMessagesBodySchema, s as conversationAuxiliaryCostsSchema, t as acceptedConversationMessageSchema, u as conversationEventHistorySchema, v as conversationPendingMessageSchema, w as conversationSummaryReportSchema, x as conversationReportEventSchema, y as conversationPendingMessagesReportSchema } from "../conversation-SsASlWL7.js";
|
|
3
3
|
import { S as userCustomizationSchema, _ as isEmptyUserInputAnswer, b as webMessageId, h as buttonUserInputField, m as USER_INPUT_NOTE, v as normalizeUserInputAnswer, x as USER_CUSTOMIZATION_MAX_CHARS } from "../reporting-window-DgHgwQB3.js";
|
|
4
|
-
import { C as eventAutomationSummarySchema, S as automationVersionSchema, _ as automationSummarySchema, a as automationExecutionSchema, b as automationVersionListSchema, d as automationParamsSchema, f as automationRunListSchema, g as automationSchedulePreviewSchema, h as automationScheduleIntentSchema, i as automationExecutionListSchema, l as automationListQuerySchema, m as automationRunWindowsSchema, n as automationEditSchema, o as automationExecutionStatusDaySchema, p as automationRunSchema, r as automationEventCatalogSchema, s as automationExecutionStatusSchema, t as automationEditErrorSchema, u as automationListSchema, v as automationUpdateSchema, w as scheduledAutomationSummarySchema, x as automationVersionParamsSchema, y as automationVersionActivateSchema } from "../automation-
|
|
4
|
+
import { C as eventAutomationSummarySchema, S as automationVersionSchema, _ as automationSummarySchema, a as automationExecutionSchema, b as automationVersionListSchema, d as automationParamsSchema, f as automationRunListSchema, g as automationSchedulePreviewSchema, h as automationScheduleIntentSchema, i as automationExecutionListSchema, l as automationListQuerySchema, m as automationRunWindowsSchema, n as automationEditSchema, o as automationExecutionStatusDaySchema, p as automationRunSchema, r as automationEventCatalogSchema, s as automationExecutionStatusSchema, t as automationEditErrorSchema, u as automationListSchema, v as automationUpdateSchema, w as scheduledAutomationSummarySchema, x as automationVersionParamsSchema, y as automationVersionActivateSchema } from "../automation-Cql9h2vO.js";
|
|
5
5
|
import { a as pluginPackageContentItemReportSchema, c as pluginsSchema, d as skillReportsSchema, i as pluginOperationalReportSchema, l as runtimeInfoReportSchema, n as healthReportSchema, o as pluginPackageContentReportSchema, r as pluginOperationalReportFeedSchema, s as pluginSchema, t as apiErrorSchema, u as skillReportSchema } from "../common-Eu6sx09c.js";
|
|
6
|
-
import { $ as codeRepositorySummarySchema, B as dailyConversationActivitySchema, C as createdPersonalTokenSchema, D as revokePersonalTokenResponseSchema, E as personalTokenParamsSchema, F as locationDirectoryReportSchema, G as startConnectionResponseSchema, H as connectionParamsSchema, I as locationParamsSchema, J as codeChangeSummarySchema, K as codeActivityDaySchema, M as personalSpendReportSchema, N as locationActivityDayReportSchema, O as actorDirectoryReportSchema, P as locationDetailReportSchema, Q as codeRepositoryReportSchema, S as createPersonalTokenBodySchema, T as personalTokenMetadataSchema, U as connectionSchema, V as connectionListSchema, W as disconnectConnectionResponseSchema, X as codePersonReportSchema, Y as codeOverviewReportSchema, Z as codeRepositoryParamsSchema, _ as disconnectServiceAccountResponseSchema, a as workspaceBodySchema, at as conversationStatsReportSchema, b as serviceAccountSchema, c as workspaceRepoSchema, d as reviewItemCountSchema, et as conversationWatchSchema, g as reviewItemWaitingConversationsSchema, h as reviewItemSchema, i as deleteWorkspaceResponseSchema, it as stopConversationTurnResponseSchema, j as personParamsSchema, k as actorProfileReportSchema, l as workspaceSchema, n as statsReportSchema, nt as conversationChildAgentSchema, o as workspaceListSchema, p as reviewItemListSchema, q as codeChangeSummaryReportSchema, r as baselineSnapshotSchema, rt as conversationChildAgentsReportSchema, s as workspaceParamsSchema, t as statSchema, tt as conversationWatchesReportSchema, u as reviewItemActionSchema, v as serviceAccountListSchema, w as personalTokenListSchema, x as startServiceAccountSignInResponseSchema, y as serviceAccountParamsSchema } from "../schema-
|
|
7
|
-
export { INPUT_IMAGE_TYPES, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, USER_CUSTOMIZATION_MAX_CHARS, USER_INPUT_NOTE, acceptedConversationMessageSchema, actorDirectoryReportSchema, actorProfileReportSchema, apiErrorSchema, archiveConversationBodySchema, archiveConversationResponseSchema, automationEditErrorSchema, automationEditSchema, automationEventCatalogSchema, automationExecutionListSchema, automationExecutionSchema, automationExecutionStatusDaySchema, automationExecutionStatusSchema, automationListQuerySchema, automationListSchema, automationParamsSchema, automationRunListSchema, automationRunSchema, automationRunWindowsSchema, automationScheduleIntentSchema, automationSchedulePreviewSchema, automationSummarySchema, automationUpdateSchema, automationVersionActivateSchema, automationVersionListSchema, automationVersionParamsSchema, automationVersionSchema, baselineSnapshotSchema, buttonUserInputField, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, codeActivityDaySchema, codeChangeSummaryReportSchema, codeChangeSummarySchema, codeOverviewReportSchema, codePersonReportSchema, codeRepositoryParamsSchema, codeRepositoryReportSchema, codeRepositorySummarySchema, connectionListSchema, connectionParamsSchema, connectionSchema, conversationActivityPreviewSchema, conversationAuxiliaryCostsSchema, conversationChildAgentSchema, conversationChildAgentTotalsSchema, conversationChildAgentsReportSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventHistorySchema, conversationEventPageSchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReadPositionSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, conversationWatchSchema, conversationWatchesReportSchema, createConversationBodySchema, createConversationMessageBodySchema, createPersonalTokenBodySchema, createdPersonalTokenSchema, dailyConversationActivitySchema, deleteWorkspaceResponseSchema, disconnectConnectionResponseSchema, disconnectServiceAccountResponseSchema, eventAutomationSummarySchema, forkConversationBodySchema, forkConversationResponseSchema, healthReportSchema, isEmptyUserInputAnswer, locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, messageCardText, normalizeUserInputAnswer, personParamsSchema, personalSpendReportSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginSchema, pluginsSchema, resolveMessageCards, reviewItemActionSchema, reviewItemCountSchema, reviewItemListSchema, reviewItemSchema, reviewItemWaitingConversationsSchema, revokePersonalTokenResponseSchema, runtimeInfoReportSchema, scheduledAutomationSummarySchema, serviceAccountListSchema, serviceAccountParamsSchema, serviceAccountSchema, skillReportSchema, skillReportsSchema, startConnectionResponseSchema, startServiceAccountSignInResponseSchema, statSchema, statsReportSchema, steerConversationPendingMessagesBodySchema, steerConversationPendingMessagesResponseSchema, stopConversationTurnResponseSchema, userCustomizationSchema, webMessageId, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };
|
|
6
|
+
import { $ as codeRepositorySummarySchema, B as dailyConversationActivitySchema, C as createdPersonalTokenSchema, D as revokePersonalTokenResponseSchema, E as personalTokenParamsSchema, F as locationDirectoryReportSchema, G as startConnectionResponseSchema, H as connectionParamsSchema, I as locationParamsSchema, J as codeChangeSummarySchema, K as codeActivityDaySchema, M as personalSpendReportSchema, N as locationActivityDayReportSchema, O as actorDirectoryReportSchema, P as locationDetailReportSchema, Q as codeRepositoryReportSchema, S as createPersonalTokenBodySchema, T as personalTokenMetadataSchema, U as connectionSchema, V as connectionListSchema, W as disconnectConnectionResponseSchema, X as codePersonReportSchema, Y as codeOverviewReportSchema, Z as codeRepositoryParamsSchema, _ as disconnectServiceAccountResponseSchema, a as workspaceBodySchema, at as conversationStatsReportSchema, b as serviceAccountSchema, c as workspaceRepoSchema, ct as archiveDoneConversationsResponseSchema, d as reviewItemCountSchema, dt as pinConversationResponseSchema, et as conversationWatchSchema, g as reviewItemWaitingConversationsSchema, h as reviewItemSchema, i as deleteWorkspaceResponseSchema, it as stopConversationTurnResponseSchema, j as personParamsSchema, k as actorProfileReportSchema, l as workspaceSchema, lt as conversationAutoArchiveSchema, n as statsReportSchema, nt as conversationChildAgentSchema, o as workspaceListSchema, ot as archiveConversationBodySchema, p as reviewItemListSchema, q as codeChangeSummaryReportSchema, r as baselineSnapshotSchema, rt as conversationChildAgentsReportSchema, s as workspaceParamsSchema, st as archiveConversationResponseSchema, t as statSchema, tt as conversationWatchesReportSchema, u as reviewItemActionSchema, ut as pinConversationBodySchema, v as serviceAccountListSchema, w as personalTokenListSchema, x as startServiceAccountSignInResponseSchema, y as serviceAccountParamsSchema } from "../schema-Dzi3lkdP.js";
|
|
7
|
+
export { INPUT_IMAGE_TYPES, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, USER_CUSTOMIZATION_MAX_CHARS, USER_INPUT_NOTE, acceptedConversationMessageSchema, actorDirectoryReportSchema, actorProfileReportSchema, apiErrorSchema, archiveConversationBodySchema, archiveConversationResponseSchema, archiveDoneConversationsResponseSchema, automationEditErrorSchema, automationEditSchema, automationEventCatalogSchema, automationExecutionListSchema, automationExecutionSchema, automationExecutionStatusDaySchema, automationExecutionStatusSchema, automationListQuerySchema, automationListSchema, automationParamsSchema, automationRunListSchema, automationRunSchema, automationRunWindowsSchema, automationScheduleIntentSchema, automationSchedulePreviewSchema, automationSummarySchema, automationUpdateSchema, automationVersionActivateSchema, automationVersionListSchema, automationVersionParamsSchema, automationVersionSchema, baselineSnapshotSchema, buttonUserInputField, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, codeActivityDaySchema, codeChangeSummaryReportSchema, codeChangeSummarySchema, codeOverviewReportSchema, codePersonReportSchema, codeRepositoryParamsSchema, codeRepositoryReportSchema, codeRepositorySummarySchema, connectionListSchema, connectionParamsSchema, connectionSchema, conversationActivityPreviewSchema, conversationAutoArchiveSchema, conversationAuxiliaryCostsSchema, conversationChildAgentSchema, conversationChildAgentTotalsSchema, conversationChildAgentsReportSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventHistorySchema, conversationEventPageSchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReadPositionSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, conversationWatchSchema, conversationWatchesReportSchema, createConversationBodySchema, createConversationMessageBodySchema, createPersonalTokenBodySchema, createdPersonalTokenSchema, dailyConversationActivitySchema, deleteWorkspaceResponseSchema, disconnectConnectionResponseSchema, disconnectServiceAccountResponseSchema, eventAutomationSummarySchema, forkConversationBodySchema, forkConversationResponseSchema, healthReportSchema, isEmptyUserInputAnswer, locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, messageCardText, normalizeUserInputAnswer, personParamsSchema, personalSpendReportSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, pinConversationBodySchema, pinConversationResponseSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginSchema, pluginsSchema, resolveMessageCards, reviewItemActionSchema, reviewItemCountSchema, reviewItemListSchema, reviewItemSchema, reviewItemWaitingConversationsSchema, revokePersonalTokenResponseSchema, runtimeInfoReportSchema, scheduledAutomationSummarySchema, serviceAccountListSchema, serviceAccountParamsSchema, serviceAccountSchema, skillReportSchema, skillReportsSchema, startConnectionResponseSchema, startServiceAccountSignInResponseSchema, statSchema, statsReportSchema, steerConversationPendingMessagesBodySchema, steerConversationPendingMessagesResponseSchema, stopConversationTurnResponseSchema, userCustomizationSchema, webMessageId, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };
|
package/dist/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ConversationWorkQueue } from "./queue-C37RbDVc.js";
|
|
2
|
-
import "./db-
|
|
2
|
+
import "./db-DEiwO5Sh.js";
|
|
3
3
|
import { Hono } from "hono";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { User } from "@sentry/junior-plugin-api";
|
|
@@ -21,6 +21,17 @@ export declare function authenticatePersonalToken(token: string, now?: Date): Pr
|
|
|
21
21
|
* needs a configured list, so an empty list allows no email.
|
|
22
22
|
*/
|
|
23
23
|
export declare function isAllowedSignInEmail(email: string, allowedDomains: readonly string[]): boolean;
|
|
24
|
+
/** A user's auto-archive settings. */
|
|
25
|
+
type AutoArchiveSettings = {
|
|
26
|
+
autoArchiveDefault: boolean;
|
|
27
|
+
autoArchiveGraceHours: number;
|
|
28
|
+
};
|
|
29
|
+
/** Settings of a user who has not changed auto-archive. */
|
|
30
|
+
export declare const DEFAULT_AUTO_ARCHIVE_SETTINGS: AutoArchiveSettings;
|
|
31
|
+
/** Read the user's auto-archive settings. */
|
|
32
|
+
export declare function readUserAutoArchiveSettings(userId: string): Promise<AutoArchiveSettings | undefined>;
|
|
33
|
+
/** Save changed auto-archive settings and return the saved settings. */
|
|
34
|
+
export declare function updateUserAutoArchiveSettings(userId: string, settings: Partial<AutoArchiveSettings>): Promise<AutoArchiveSettings | undefined>;
|
|
24
35
|
/** Resolve or create the canonical user for one authenticated viewer. */
|
|
25
36
|
export declare function resolveViewerUser(email: string): Promise<User | undefined>;
|
|
26
37
|
/** Read the photo path of one canonical user: Slack, then Google. */
|
|
@@ -34,4 +45,4 @@ export interface JuniorApiOptions {
|
|
|
34
45
|
}
|
|
35
46
|
/** Create Junior's production REST API for authenticated dashboard consumers. */
|
|
36
47
|
export declare function createJuniorApi(options?: JuniorApiOptions): Hono<JuniorApiEnv>;
|
|
37
|
-
export type { ConversationWorkQueue, JuniorApiVariables };
|
|
48
|
+
export type { AutoArchiveSettings, ConversationWorkQueue, JuniorApiVariables };
|
package/dist/api.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as escapeXml } from "./client-
|
|
3
|
-
import { m as logInfo, p as logException } from "./logging-
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
1
|
+
import { Bn as getPlugins, Dn as createUserTokenStore, Ha as readConversationViewerMarks, Jn as countReviewItemsNeedingUser, Ka as readConversationEventPage, Ma as createPluginLogger, Na as readConversationAccessFromSql, Qr as getWorkspace, Tn as isExperimentalFeatureEnabled, Xr as createWorkspace, Zr as deleteWorkspace, ar as canActOnReviewItem, ci as create, co as createPluginCache, cr as isOnlyAssignee, ei as listWorkspaces, er as listWaitingConversations, ga as workspaceRepoCheckoutPath, kn as webActorUserIds, li as hash, ni as updateWorkspace, pa as SANDBOX_RUNTIME, pr as reviewItemReaderForUser, ri as WorkspaceValidationError, so as lookupSlackUser, ti as listWorkspacesByRepository, tr as searchReviewItems } from "./projection-7EFIqzuj.js";
|
|
2
|
+
import { m as escapeXml } from "./client-DZ8HTnYH.js";
|
|
3
|
+
import { m as logInfo, p as logException } from "./logging-cI3T1dNc.js";
|
|
4
|
+
import { t as JUNIOR_VERSION } from "./version-DJTk0ZCE.js";
|
|
5
|
+
import { C as getSqlExecutor, D as loadConversationSlackTenantIds, Q as resolveRootConversationId, S as getDb, c as readViewerAvatarUrl, d as updateViewerDisplayName, l as resolveViewerUser, m as readAvatarImage, t as findUserByEmail, x as getConversationStore } from "./viewer-WY0RYE4E.js";
|
|
6
|
+
import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, s as juniorConversations } from "./agent-invocations-Crs3XHhg.js";
|
|
7
|
+
import { C as juniorCodeChanges, b as juniorConversationEvents, h as juniorConversationParticipants, w as juniorCodeRepositories, x as juniorApiTokens, y as juniorConversationMetrics } from "./executor-hPfFTH0C.js";
|
|
7
8
|
import { t as INPUT_IMAGE_TYPES } from "./media-DstkkoNP.js";
|
|
8
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
9
|
-
import { $ as readViewerAutomations,
|
|
10
|
-
import { r as getStateAdapter } from "./adapter-
|
|
11
|
-
import { A as
|
|
12
|
-
import { d as getEventCatalog } from "./session-stop-
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DE-F4Awo.js";
|
|
10
|
+
import { $ as readViewerAutomations, Ct as listChildAgents, Et as conversationSubtreeColumns, G as readViewerAutomationEdit, H as activateViewerAutomationVersion, K as updateViewerAutomation, Mt as saveUserCustomization, Q as readViewerAutomationVersions, S as createSlackReviewItemShow, Tt as conversationSubtree, U as changeViewerAutomationLifecycle, W as deleteViewerTask, X as readViewerAutomationRuns, Y as readViewerAutomationExecutions, Z as readViewerAutomationSummary, et as AutomationEditError, ft as webActorFromUser, gt as readLiveAttachment, h as readStats, jt as readUserCustomization, lt as createAndEnqueueConversation, mt as decodeInputImages, nt as listOwnedWatches, ot as acceptsWebMessages, q as ViewerTaskNotFoundError, st as appendAndEnqueueWebMessage } from "./agent-runner-BsYAbniN.js";
|
|
11
|
+
import { r as getStateAdapter } from "./adapter-BtfBHVM5.js";
|
|
12
|
+
import { A as forkConversationResponseSchema, D as createConversationBodySchema, M as steerConversationPendingMessagesResponseSchema, O as createConversationMessageBodySchema, P as conversationReadPositionSchema, W as readMessageAttachments, c as conversationDetailQuerySchema, d as conversationEventPageSchema, f as conversationEventsQuerySchema, h as conversationParamsSchema, i as cancelConversationPendingMessagesResponseSchema, j as steerConversationPendingMessagesBodySchema, k as forkConversationBodySchema, l as conversationDetailReportSchema, m as conversationFeedSchema, o as conversationAttachmentParamsSchema, p as conversationFeedQuerySchema, r as cancelConversationPendingMessagesBodySchema, t as acceptedConversationMessageSchema, y as conversationPendingMessagesReportSchema } from "./conversation-SsASlWL7.js";
|
|
13
|
+
import { d as getEventCatalog } from "./session-stop-0juF_BP0.js";
|
|
13
14
|
import { S as userCustomizationSchema, a as fillUtcSixHours, b as webMessageId, c as trailingUtcDayWindow, d as utcDayKey, f as utcHourKey, i as fillUtcHours, l as trailingUtcHourWindow, n as HOUR_MS$1, o as startOfUtcHour, r as fillUtcDays, s as sumUtcHoursIntoSixHours, t as DAY_MS$1, u as trailingUtcSixHourWindow } from "./reporting-window-DgHgwQB3.js";
|
|
14
|
-
import { s as getSandboxResources, t as getCachedSnapshot } from "./resolve-
|
|
15
|
-
import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-
|
|
16
|
-
import { E as steerWebPendingMessages, a as cancelHumanFacingPendingMessages, g as getConversationWorkState, h as getConversation } from "./store-
|
|
17
|
-
import { F as conversationRangeColumns, N as conversationActiveDaysColumn, P as conversationAggregateColumns, ct as AutomationConflictError, ft as automationEventCatalog, j as readAutomationTitlesByConversationId } from "./turn-session-routing-
|
|
18
|
-
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-
|
|
19
|
-
import { N as ScheduleIntentError, P as compileScheduleIntent, _ as automationSummarySchema, b as automationVersionListSchema, c as automationLifecycleSchema, d as automationParamsSchema, f as automationRunListSchema, g as automationSchedulePreviewSchema, h as automationScheduleIntentSchema, i as automationExecutionListSchema, l as automationListQuerySchema, n as automationEditSchema, r as automationEventCatalogSchema, t as automationEditErrorSchema, u as automationListSchema, v as automationUpdateSchema, x as automationVersionParamsSchema, y as automationVersionActivateSchema } from "./automation-
|
|
15
|
+
import { s as getSandboxResources, t as getCachedSnapshot } from "./resolve-CuiEY_2u.js";
|
|
16
|
+
import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-hh18yCeU.js";
|
|
17
|
+
import { E as steerWebPendingMessages, a as cancelHumanFacingPendingMessages, g as getConversationWorkState, h as getConversation } from "./store-DKs1WwdB.js";
|
|
18
|
+
import { F as conversationRangeColumns, N as conversationActiveDaysColumn, P as conversationAggregateColumns, ct as AutomationConflictError, ft as automationEventCatalog, j as readAutomationTitlesByConversationId } from "./turn-session-routing-jnLOfBHJ.js";
|
|
19
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-DIyz_9Uh.js";
|
|
20
|
+
import { N as ScheduleIntentError, P as compileScheduleIntent, _ as automationSummarySchema, b as automationVersionListSchema, c as automationLifecycleSchema, d as automationParamsSchema, f as automationRunListSchema, g as automationSchedulePreviewSchema, h as automationScheduleIntentSchema, i as automationExecutionListSchema, l as automationListQuerySchema, n as automationEditSchema, r as automationEventCatalogSchema, t as automationEditErrorSchema, u as automationListSchema, v as automationUpdateSchema, x as automationVersionParamsSchema, y as automationVersionActivateSchema } from "./automation-Cql9h2vO.js";
|
|
20
21
|
import { c as pluginsSchema, d as skillReportsSchema, l as runtimeInfoReportSchema, n as healthReportSchema, r as pluginOperationalReportFeedSchema, t as apiErrorSchema } from "./common-Eu6sx09c.js";
|
|
21
|
-
import {
|
|
22
|
-
import { f as legacyWebMailboxMetadataSchema } from "./result-
|
|
23
|
-
import { a as startConnection, l as getWebAuthorization, n as isConnectableProvider, r as listConnections, t as disconnectConnection, u as htmlCallbackResponse } from "./connections-
|
|
24
|
-
import { A as avatarParamsSchema, C as createdPersonalTokenSchema, D as revokePersonalTokenResponseSchema, E as personalTokenParamsSchema, F as locationDirectoryReportSchema, G as startConnectionResponseSchema, H as connectionParamsSchema, I as locationParamsSchema, L as activityDays$1, M as personalSpendReportSchema, O as actorDirectoryReportSchema, P as locationDetailReportSchema, Q as codeRepositoryReportSchema, R as activityHours$1, S as createPersonalTokenBodySchema, V as connectionListSchema, W as disconnectConnectionResponseSchema, X as codePersonReportSchema, Y as codeOverviewReportSchema, Z as codeRepositoryParamsSchema, _ as disconnectServiceAccountResponseSchema, a as workspaceBodySchema, at as conversationStatsReportSchema, d as reviewItemCountSchema, f as reviewItemListQuerySchema, g as reviewItemWaitingConversationsSchema, h as reviewItemSchema, i as deleteWorkspaceResponseSchema, it as stopConversationTurnResponseSchema, j as personParamsSchema, k as actorProfileReportSchema, l as workspaceSchema, m as reviewItemParamsSchema, n as statsReportSchema, o as workspaceListSchema, p as reviewItemListSchema, rt as conversationChildAgentsReportSchema, s as workspaceParamsSchema, tt as conversationWatchesReportSchema, u as reviewItemActionSchema, v as serviceAccountListSchema, w as personalTokenListSchema, x as startServiceAccountSignInResponseSchema, y as serviceAccountParamsSchema, z as activitySixHours$1 } from "./schema-
|
|
22
|
+
import { G as actOnReviewItem, K as closeReviewItemsAnsweredByReply, N as clearSlackPendingReactions, O as isAllowedSignInEmail, Q as readUserAutoArchiveSettings, U as parseContent, W as ReviewItemActionError, X as archiveViewerDoneConversations, Y as DEFAULT_AUTO_ARCHIVE_SETTINGS, Z as readConversationAutoArchive, _ as resolveMentions, a as readConversationAgentTree, at as getAttachmentStorage, b as encodeConversationCursor, c as readConversationForks, d as readConversationAuxiliaryCostsFromSql, et as setConversationAutoArchive, f as childAgentTotalsReport, g as attachConversationMentions, h as conversationSummaryFromStoredConversation, i as readConversationReadPosition, it as throwApiError, l as readConversationFeed, lt as readHealthReport, m as conversationEventHistory, n as readConversationDetail, nt as emptyResponse, o as forkConversationForViewer, p as readConversationTreeMetricsFromSql, q as readReviewItemForUser, r as markConversationRead, rt as jsonResponse, s as keepQuickQuestionForViewer, t as stopConversationTurnForViewer, tt as updateUserAutoArchiveSettings, u as readConversationRecordFromSql, v as readFirstHumanMessageTexts, w as getProductionSlackAdapter, x as archiveConversation, y as decodeConversationCursor } from "./stop-6FVG1c-r.js";
|
|
23
|
+
import { f as legacyWebMailboxMetadataSchema } from "./result-DrcUtFaD.js";
|
|
24
|
+
import { a as startConnection, l as getWebAuthorization, n as isConnectableProvider, r as listConnections, t as disconnectConnection, u as htmlCallbackResponse } from "./connections-Do24CGP5.js";
|
|
25
|
+
import { A as avatarParamsSchema, C as createdPersonalTokenSchema, D as revokePersonalTokenResponseSchema, E as personalTokenParamsSchema, F as locationDirectoryReportSchema, G as startConnectionResponseSchema, H as connectionParamsSchema, I as locationParamsSchema, L as activityDays$1, M as personalSpendReportSchema, O as actorDirectoryReportSchema, P as locationDetailReportSchema, Q as codeRepositoryReportSchema, R as activityHours$1, S as createPersonalTokenBodySchema, V as connectionListSchema, W as disconnectConnectionResponseSchema, X as codePersonReportSchema, Y as codeOverviewReportSchema, Z as codeRepositoryParamsSchema, _ as disconnectServiceAccountResponseSchema, a as workspaceBodySchema, at as conversationStatsReportSchema, ct as archiveDoneConversationsResponseSchema, d as reviewItemCountSchema, dt as pinConversationResponseSchema, f as reviewItemListQuerySchema, g as reviewItemWaitingConversationsSchema, h as reviewItemSchema, i as deleteWorkspaceResponseSchema, it as stopConversationTurnResponseSchema, j as personParamsSchema, k as actorProfileReportSchema, l as workspaceSchema, lt as conversationAutoArchiveSchema, m as reviewItemParamsSchema, n as statsReportSchema, o as workspaceListSchema, ot as archiveConversationBodySchema, p as reviewItemListSchema, rt as conversationChildAgentsReportSchema, s as workspaceParamsSchema, st as archiveConversationResponseSchema, tt as conversationWatchesReportSchema, u as reviewItemActionSchema, ut as pinConversationBodySchema, v as serviceAccountListSchema, w as personalTokenListSchema, x as startServiceAccountSignInResponseSchema, y as serviceAccountParamsSchema, z as activitySixHours$1 } from "./schema-Dzi3lkdP.js";
|
|
25
26
|
import { Hono } from "hono";
|
|
26
27
|
import path from "node:path";
|
|
27
28
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
@@ -54,6 +55,42 @@ const requireAdmin = createMiddleware(async (context, next) => {
|
|
|
54
55
|
if (viewer.isAdmin !== true) throwApiError(403, "Only Junior admins can do this.");
|
|
55
56
|
await next();
|
|
56
57
|
});
|
|
58
|
+
// src/api/conversations/pin.ts
|
|
59
|
+
/**
|
|
60
|
+
* Pin or unpin one conversation for the signed-in viewer.
|
|
61
|
+
*
|
|
62
|
+
* A pin lives on the viewer's participant row, and that row grants send and
|
|
63
|
+
* control access. So only a participant can pin, the same as archive. The
|
|
64
|
+
* root actor may have no row yet, so pinning adds it. A pin also restores an
|
|
65
|
+
* archived conversation, because the Pinned section shows only active
|
|
66
|
+
* conversations.
|
|
67
|
+
*/
|
|
68
|
+
async function pinConversation(viewer, conversationId, body) {
|
|
69
|
+
if (!(await readConversationAccessFromSql(getDb(), [conversationId], viewer)).get(conversationId)?.isParticipant) throwApiError(404, "Conversation not found.");
|
|
70
|
+
const executor = getSqlExecutor();
|
|
71
|
+
const rootConversationId = await resolveRootConversationId(executor, conversationId);
|
|
72
|
+
const db = executor.db();
|
|
73
|
+
if (!body.pinned) {
|
|
74
|
+
await db.update(juniorConversationParticipants).set({ pinnedAt: null }).where(and(eq(juniorConversationParticipants.userId, viewer.id), eq(juniorConversationParticipants.rootConversationId, rootConversationId)));
|
|
75
|
+
return { pinnedAt: null };
|
|
76
|
+
}
|
|
77
|
+
const [root] = await db.select({ lastActivityAt: juniorConversations.lastActivityAt }).from(juniorConversations).where(eq(juniorConversations.conversationId, rootConversationId)).limit(1);
|
|
78
|
+
if (!root) throwApiError(404, "Conversation not found.");
|
|
79
|
+
const pinnedAt = /* @__PURE__ */ new Date();
|
|
80
|
+
await db.insert(juniorConversationParticipants).values({
|
|
81
|
+
lastMessageAt: root.lastActivityAt,
|
|
82
|
+
pinnedAt,
|
|
83
|
+
rootConversationId,
|
|
84
|
+
userId: viewer.id
|
|
85
|
+
}).onConflictDoUpdate({
|
|
86
|
+
target: [juniorConversationParticipants.userId, juniorConversationParticipants.rootConversationId],
|
|
87
|
+
set: {
|
|
88
|
+
archivedAt: null,
|
|
89
|
+
pinnedAt
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
return { pinnedAt: pinnedAt.toISOString() };
|
|
93
|
+
}
|
|
57
94
|
// src/api/conversations/child-agents.ts
|
|
58
95
|
/**
|
|
59
96
|
* Load the direct child agents of one Conversation, or throw a standard API
|
|
@@ -144,10 +181,7 @@ function parseImages(images) {
|
|
|
144
181
|
}
|
|
145
182
|
function actorFromViewer(viewer) {
|
|
146
183
|
const normalized = viewer.email.trim().toLowerCase();
|
|
147
|
-
return
|
|
148
|
-
...viewer.displayName ? { fullName: viewer.displayName } : void 0,
|
|
149
|
-
userName: normalized.split("@")[0] || normalized
|
|
150
|
-
});
|
|
184
|
+
return webActorFromUser(viewer, { userName: normalized.split("@")[0] || normalized });
|
|
151
185
|
}
|
|
152
186
|
/** Create a dashboard root conversation and enqueue its first message. */
|
|
153
187
|
async function createConversationForViewer(viewer, body, services) {
|
|
@@ -219,6 +253,61 @@ async function appendConversationMessageForViewer(viewer, conversationId, body,
|
|
|
219
253
|
throwApiError(500, "Unable to append message.", error);
|
|
220
254
|
}
|
|
221
255
|
}
|
|
256
|
+
// src/api/conversations/detail-etag.ts
|
|
257
|
+
/**
|
|
258
|
+
* Sum the detail versions of a Conversation and its child agents. Child
|
|
259
|
+
* writes bump only their own row, and the row count changes when a child
|
|
260
|
+
* starts, so the parent needs no bump of its own.
|
|
261
|
+
*/
|
|
262
|
+
async function readSubtreeDetailVersion(conversationId) {
|
|
263
|
+
const [row] = await getDb().select({
|
|
264
|
+
conversations: sql`count(*)::int`,
|
|
265
|
+
version: sql`coalesce(sum(${juniorConversations.detailVersion}), 0)::text`
|
|
266
|
+
}).from(juniorConversations).innerJoin(conversationSubtree([conversationId]), eq(conversationSubtreeColumns.conversationId, juniorConversations.conversationId));
|
|
267
|
+
return row ?? {
|
|
268
|
+
conversations: 0,
|
|
269
|
+
version: "0"
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Return the detail ETag without building the report, or undefined for a
|
|
274
|
+
* missing Conversation.
|
|
275
|
+
*
|
|
276
|
+
* Shared content is covered by `detail_version`. Viewer state (marks, read
|
|
277
|
+
* position, auto-archive choice) and data that other Conversations own (forks,
|
|
278
|
+
* agent tree labels) are cheap, so they are read on each request. Names, avatars, Automation titles, and plugin sidebar
|
|
279
|
+
* labels are not covered: they refresh with the next detail change or a reload.
|
|
280
|
+
*/
|
|
281
|
+
async function readConversationDetailEtag(conversationId, options) {
|
|
282
|
+
const { viewer } = options;
|
|
283
|
+
const [subtree, access, viewerMarks, forks, agentTree, readPosition, autoArchive] = await Promise.all([
|
|
284
|
+
readSubtreeDetailVersion(conversationId),
|
|
285
|
+
readConversationAccessFromSql(getDb(), [conversationId], viewer),
|
|
286
|
+
viewer ? readConversationViewerMarks(viewer, conversationId) : void 0,
|
|
287
|
+
readConversationForks(conversationId, viewer),
|
|
288
|
+
readConversationAgentTree(conversationId, viewer),
|
|
289
|
+
viewer ? readConversationReadPosition(viewer, conversationId) : void 0,
|
|
290
|
+
viewer ? readConversationAutoArchive(viewer, conversationId) : void 0
|
|
291
|
+
]);
|
|
292
|
+
if (subtree.conversations === 0) return void 0;
|
|
293
|
+
const basis = JSON.stringify({
|
|
294
|
+
access: access.get(conversationId) ?? null,
|
|
295
|
+
agentTree: agentTree ?? null,
|
|
296
|
+
autoArchive: autoArchive ?? null,
|
|
297
|
+
forks,
|
|
298
|
+
junior: JUNIOR_VERSION,
|
|
299
|
+
limit: options.limit,
|
|
300
|
+
readPosition: readPosition ?? null,
|
|
301
|
+
subtree,
|
|
302
|
+
viewerMarks: viewerMarks ?? null
|
|
303
|
+
});
|
|
304
|
+
return `W/"${createHash("sha256").update(basis).digest("hex")}"`;
|
|
305
|
+
}
|
|
306
|
+
/** Report whether an `If-None-Match` header names the current ETag. */
|
|
307
|
+
function etagMatches(header, etag) {
|
|
308
|
+
const opaque = etag.replace(/^W\//, "");
|
|
309
|
+
return Boolean(header?.split(",").some((value) => value.trim().replace(/^W\//, "") === opaque));
|
|
310
|
+
}
|
|
222
311
|
// src/api/conversations/event-list.ts
|
|
223
312
|
/** Read one bounded page of reporting events before a signed cursor. */
|
|
224
313
|
async function readConversationEvents(conversationId, beforeValue, options = {}) {
|
|
@@ -288,7 +377,7 @@ async function steerConversationPendingMessagesForViewer(viewer, conversationId,
|
|
|
288
377
|
return {
|
|
289
378
|
conversationId,
|
|
290
379
|
steeredInboundMessageIds: (await steerWebPendingMessages({
|
|
291
|
-
|
|
380
|
+
authorIds: webActorUserIds(viewer),
|
|
292
381
|
conversationId,
|
|
293
382
|
inboundMessageIds: body.inboundMessageIds
|
|
294
383
|
})).steeredInboundMessageIds
|
|
@@ -368,7 +457,8 @@ async function projectPendingMessage(message, canExposePayload) {
|
|
|
368
457
|
...canExposePayload ? {
|
|
369
458
|
actorIdentity: actorIdentityFromWebMetadata(metadata.data),
|
|
370
459
|
text,
|
|
371
|
-
...attachments.length ? { attachments } : void 0
|
|
460
|
+
...attachments.length ? { attachments } : void 0,
|
|
461
|
+
...message.input.reviewItemChange ? { reviewItemChange: message.input.reviewItemChange } : void 0
|
|
372
462
|
} : { redacted: true }
|
|
373
463
|
};
|
|
374
464
|
}
|
|
@@ -398,6 +488,7 @@ async function projectPendingMessage(message, canExposePayload) {
|
|
|
398
488
|
role: "user",
|
|
399
489
|
source: "slack",
|
|
400
490
|
...actorIdentity ? { actorIdentity } : void 0,
|
|
491
|
+
...message.input.reviewItemChange ? { reviewItemChange: message.input.reviewItemChange } : void 0,
|
|
401
492
|
text
|
|
402
493
|
};
|
|
403
494
|
}
|
|
@@ -415,6 +506,16 @@ async function attachPendingMentions(conversationId, messages) {
|
|
|
415
506
|
mentions: mentions[index]
|
|
416
507
|
} : message);
|
|
417
508
|
}
|
|
509
|
+
/** Read the viewer's pending authorization, also one saved before a deploy. */
|
|
510
|
+
async function findViewerWebAuthorization(conversationId, viewer) {
|
|
511
|
+
for (const actorId of webActorUserIds(viewer)) {
|
|
512
|
+
const authorization = await getWebAuthorization({
|
|
513
|
+
actorId,
|
|
514
|
+
conversationId
|
|
515
|
+
});
|
|
516
|
+
if (authorization) return authorization;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
418
519
|
/**
|
|
419
520
|
* Read accepted mailbox messages that have not reached durable history yet.
|
|
420
521
|
*
|
|
@@ -425,12 +526,7 @@ async function readConversationPendingMessages(conversationId, options = {}) {
|
|
|
425
526
|
if (!await getConversationStore().get({ conversationId })) return void 0;
|
|
426
527
|
const access = (await readConversationAccessFromSql(getDb(), [conversationId], options.viewer)).get(conversationId);
|
|
427
528
|
const canExposePayload = access?.canViewPrivateContent ?? false;
|
|
428
|
-
const
|
|
429
|
-
const actorId = options.viewer?.email ? webActorFromEmail(options.viewer.email).userId : void 0;
|
|
430
|
-
const authorization = isParticipant && actorId ? await getWebAuthorization({
|
|
431
|
-
actorId,
|
|
432
|
-
conversationId
|
|
433
|
-
}) : void 0;
|
|
529
|
+
const authorization = (access?.isParticipant ?? false) && options.viewer ? await findViewerWebAuthorization(conversationId, options.viewer) : void 0;
|
|
434
530
|
const pendingMessages = (await getConversation({ conversationId }))?.execution.pendingMessages ?? [];
|
|
435
531
|
const messages = await attachPendingMentions(conversationId, (await Promise.all(pendingMessages.map((message) => projectPendingMessage(message, canExposePayload)))).flatMap((message, index) => {
|
|
436
532
|
if (!message) return [];
|
|
@@ -825,24 +921,32 @@ async function requireConversationWatches(conversationId, options = {}) {
|
|
|
825
921
|
if (!await getConversationStore().get({ conversationId })) throwApiError(404, "Conversation not found.");
|
|
826
922
|
const [accessByConversation, owned] = await Promise.all([readConversationAccessFromSql(getDb(), [conversationId], options.viewer), listOwnedWatches(conversationId)]);
|
|
827
923
|
const canExposePayload = accessByConversation.get(conversationId)?.canViewPrivateContent ?? false;
|
|
828
|
-
const
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
924
|
+
const catalog = getEventCatalog();
|
|
925
|
+
const watches = owned.map(({ childAgent, watch }) => {
|
|
926
|
+
const url = canExposePayload ? catalog[watch.namespace]?.resourceUrl?.({
|
|
927
|
+
identifier: watch.identifier,
|
|
928
|
+
resourceType: watch.resourceType
|
|
929
|
+
}) : void 0;
|
|
930
|
+
return {
|
|
931
|
+
...childAgent ? { childAgent: {
|
|
932
|
+
conversationId: childAgent.conversationId,
|
|
933
|
+
...canExposePayload && childAgent.name ? { name: childAgent.name } : void 0
|
|
934
|
+
} } : void 0,
|
|
935
|
+
createdAt: new Date(watch.createdAtMs).toISOString(),
|
|
936
|
+
events: watch.events,
|
|
937
|
+
expiresAt: new Date(watch.expiresAtMs).toISOString(),
|
|
938
|
+
...watch.firesAtMs !== void 0 ? { firesAt: new Date(watch.firesAtMs).toISOString() } : void 0,
|
|
939
|
+
id: watch.id,
|
|
940
|
+
namespace: watch.namespace,
|
|
941
|
+
resourceType: watch.resourceType,
|
|
942
|
+
...canExposePayload ? {
|
|
943
|
+
intent: watch.intent,
|
|
944
|
+
label: watch.label,
|
|
945
|
+
...watch.match ? { match: watch.match } : void 0,
|
|
946
|
+
...url ? { url } : void 0
|
|
947
|
+
} : { redacted: true }
|
|
948
|
+
};
|
|
949
|
+
});
|
|
846
950
|
return conversationWatchesReportSchema.parse({
|
|
847
951
|
conversationId,
|
|
848
952
|
watches
|
|
@@ -886,19 +990,23 @@ function createConversationRoutes(options) {
|
|
|
886
990
|
const { conversationId } = context.req.valid("param");
|
|
887
991
|
return jsonResponse(stopConversationTurnResponseSchema, await stopConversationTurnForViewer(viewer, conversationId, options));
|
|
888
992
|
});
|
|
889
|
-
app.post("/:conversationId/forks", requireViewer, bodyLimit({ maxSize:
|
|
993
|
+
app.post("/:conversationId/forks", requireViewer, bodyLimit({ maxSize: 32768 }), validateRequest("param", conversationParamsSchema, "Invalid route parameters."), validateRequest("json", forkConversationBodySchema, "Invalid request body."), async (context) => jsonResponse(forkConversationResponseSchema, await forkConversationForViewer(context.get("viewer"), context.req.valid("param").conversationId, context.req.valid("json"))));
|
|
994
|
+
app.post("/:conversationId/quick-question/keep", requireViewer, validateRequest("param", conversationParamsSchema, "Invalid route parameters."), async (context) => jsonResponse(forkConversationResponseSchema, await keepQuickQuestionForViewer(context.get("viewer"), context.req.valid("param").conversationId)));
|
|
890
995
|
app.patch("/:conversationId/archive", requireViewer, validateRequest("param", conversationParamsSchema, "Invalid route parameters."), validateRequest("json", archiveConversationBodySchema, "Invalid request body."), async (context) => {
|
|
891
996
|
const viewer = context.get("viewer");
|
|
892
997
|
const { conversationId } = context.req.valid("param");
|
|
893
998
|
const body = context.req.valid("json");
|
|
894
999
|
return jsonResponse(archiveConversationResponseSchema, await archiveConversation(viewer, conversationId, body));
|
|
895
1000
|
});
|
|
1001
|
+
app.patch("/:conversationId/pin", requireViewer, validateRequest("param", conversationParamsSchema, "Invalid route parameters."), validateRequest("json", pinConversationBodySchema, "Invalid request body."), async (context) => jsonResponse(pinConversationResponseSchema, await pinConversation(context.get("viewer"), context.req.valid("param").conversationId, context.req.valid("json"))));
|
|
896
1002
|
app.put("/:conversationId/read-position", requireViewer, validateRequest("param", conversationParamsSchema, "Invalid route parameters."), validateRequest("json", conversationReadPositionSchema, "Invalid request body."), async (context) => {
|
|
897
1003
|
const viewer = context.get("viewer");
|
|
898
1004
|
const { conversationId } = context.req.valid("param");
|
|
899
1005
|
const body = context.req.valid("json");
|
|
900
1006
|
return jsonResponse(conversationReadPositionSchema, await markConversationRead(viewer, conversationId, body));
|
|
901
1007
|
});
|
|
1008
|
+
app.post("/archive-done", requireViewer, async (context) => jsonResponse(archiveDoneConversationsResponseSchema, await archiveViewerDoneConversations(context.get("viewer"))));
|
|
1009
|
+
app.patch("/:conversationId/auto-archive", requireViewer, validateRequest("param", conversationParamsSchema, "Invalid route parameters."), validateRequest("json", conversationAutoArchiveSchema, "Invalid request body."), async (context) => jsonResponse(conversationAutoArchiveSchema, await setConversationAutoArchive(context.get("viewer"), context.req.valid("param").conversationId, context.req.valid("json").autoArchive)));
|
|
902
1010
|
app.get("/:conversationId/events", validateRequest("param", conversationParamsSchema, "Invalid route parameters."), validateRequest("query", conversationEventsQuerySchema, "Invalid query parameters."), async (context) => {
|
|
903
1011
|
const { conversationId } = context.req.valid("param");
|
|
904
1012
|
const { before, limit } = context.req.valid("query");
|
|
@@ -956,12 +1064,26 @@ function createConversationRoutes(options) {
|
|
|
956
1064
|
const { conversationId } = context.req.valid("param");
|
|
957
1065
|
const query = context.req.valid("query");
|
|
958
1066
|
const viewer = context.get("viewer");
|
|
1067
|
+
const etag = await readConversationDetailEtag(conversationId, {
|
|
1068
|
+
limit: query.limit,
|
|
1069
|
+
...viewer ? { viewer } : void 0
|
|
1070
|
+
});
|
|
1071
|
+
if (etag && etagMatches(context.req.header("if-none-match"), etag)) return new Response(null, {
|
|
1072
|
+
status: 304,
|
|
1073
|
+
headers: {
|
|
1074
|
+
"cache-control": "private, no-store",
|
|
1075
|
+
etag
|
|
1076
|
+
}
|
|
1077
|
+
});
|
|
959
1078
|
const report = await readConversationDetail(conversationId, {
|
|
960
1079
|
...query,
|
|
961
1080
|
...viewer ? { viewer } : void 0
|
|
962
1081
|
});
|
|
963
1082
|
if (!report) throwApiError(404, "Conversation not found.");
|
|
964
|
-
return jsonResponse(conversationDetailReportSchema, report
|
|
1083
|
+
return jsonResponse(conversationDetailReportSchema, report, etag ? { headers: {
|
|
1084
|
+
"cache-control": "private, no-store",
|
|
1085
|
+
etag
|
|
1086
|
+
} } : void 0);
|
|
965
1087
|
});
|
|
966
1088
|
return app;
|
|
967
1089
|
}
|
|
@@ -1443,29 +1565,25 @@ function createCodeRoutes() {
|
|
|
1443
1565
|
// src/api/connections/routes.ts
|
|
1444
1566
|
/**
|
|
1445
1567
|
* Create authenticated routes that list, connect, and disconnect the viewer's
|
|
1446
|
-
* plugin accounts. Connections belong to the viewer's
|
|
1447
|
-
* credential subject for the viewer's web Conversations.
|
|
1568
|
+
* plugin accounts. Connections belong to the viewer's User id, which is the
|
|
1569
|
+
* web Actor id and the credential subject for the viewer's web Conversations.
|
|
1448
1570
|
*/
|
|
1449
1571
|
function createConnectionRoutes() {
|
|
1450
1572
|
const app = new Hono();
|
|
1451
1573
|
app.get("/", requireViewer, async (context) => {
|
|
1452
|
-
|
|
1453
|
-
return jsonResponse(connectionListSchema, { connections: await listConnections(actor.userId, createUserTokenStore()) });
|
|
1574
|
+
return jsonResponse(connectionListSchema, { connections: await listConnections(context.get("viewer").id, createUserTokenStore()) });
|
|
1454
1575
|
});
|
|
1455
1576
|
app.post("/:provider", requireViewer, validateRequest("param", connectionParamsSchema, "Invalid provider."), async (context) => {
|
|
1456
1577
|
const { provider } = context.req.valid("param");
|
|
1457
1578
|
if (!isConnectableProvider(provider)) throwApiError(404, "Connection not found.");
|
|
1458
|
-
const
|
|
1459
|
-
const result = await startConnection(provider, webActorFromEmail(viewer.email, { ...viewer.displayName ? { fullName: viewer.displayName } : void 0 }));
|
|
1579
|
+
const result = await startConnection(provider, webActorFromUser(context.get("viewer")));
|
|
1460
1580
|
if (!result.ok) throwApiError(503, result.error);
|
|
1461
1581
|
return jsonResponse(startConnectionResponseSchema, { authorizationUrl: result.authorizationUrl });
|
|
1462
1582
|
});
|
|
1463
1583
|
app.delete("/:provider", requireViewer, validateRequest("param", connectionParamsSchema, "Invalid provider."), async (context) => {
|
|
1464
1584
|
const { provider } = context.req.valid("param");
|
|
1465
1585
|
if (!isConnectableProvider(provider)) throwApiError(404, "Connection not found.");
|
|
1466
|
-
|
|
1467
|
-
const actor = webActorFromEmail(viewer.email);
|
|
1468
|
-
await disconnectConnection(actor.userId, provider, createUserTokenStore(), viewer.id);
|
|
1586
|
+
await disconnectConnection(context.get("viewer").id, provider, createUserTokenStore());
|
|
1469
1587
|
logInfo("dashboard.credential.unlinked", { "app.credential.provider": provider });
|
|
1470
1588
|
return jsonResponse(disconnectConnectionResponseSchema, { disconnected: true });
|
|
1471
1589
|
});
|
|
@@ -2239,7 +2357,7 @@ async function readPeoplePluginReports(args) {
|
|
|
2239
2357
|
reports: [],
|
|
2240
2358
|
source: "plugins"
|
|
2241
2359
|
});
|
|
2242
|
-
const { getPluginProfileReports } = await import("./projection-
|
|
2360
|
+
const { getPluginProfileReports } = await import("./projection-7EFIqzuj.js").then((n) => n.Mn);
|
|
2243
2361
|
return pluginOperationalReportFeedSchema.parse({
|
|
2244
2362
|
generatedAt: new Date(nowMs).toISOString(),
|
|
2245
2363
|
reports: await getPluginProfileReports({
|
|
@@ -3267,7 +3385,7 @@ function readDescriptionText(home) {
|
|
|
3267
3385
|
}
|
|
3268
3386
|
/** Read discovered skill names for authenticated runtime diagnostics. */
|
|
3269
3387
|
async function readSkillReports() {
|
|
3270
|
-
const { discoverSkills } = await import("./skills-
|
|
3388
|
+
const { discoverSkills } = await import("./skills-CU5Is147.js").then((n) => n.o);
|
|
3271
3389
|
const skills = await discoverSkills();
|
|
3272
3390
|
return skillReportsSchema.parse(skills.map((skill) => ({
|
|
3273
3391
|
name: skill.name,
|
|
@@ -3276,7 +3394,7 @@ async function readSkillReports() {
|
|
|
3276
3394
|
}
|
|
3277
3395
|
/** Read safe configured plugin metadata for authenticated runtime diagnostics. */
|
|
3278
3396
|
async function readPlugins() {
|
|
3279
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
3397
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-DE-F4Awo.js").then((n) => n.t);
|
|
3280
3398
|
return pluginsSchema.parse(pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
3281
3399
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
3282
3400
|
description: plugin.manifest.description,
|
|
@@ -3288,7 +3406,7 @@ async function readPlugins() {
|
|
|
3288
3406
|
async function readRuntimeInfoReport() {
|
|
3289
3407
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
3290
3408
|
import("./package-discovery-DJBompdd.js").then((n) => n.r),
|
|
3291
|
-
import("./catalog-runtime-
|
|
3409
|
+
import("./catalog-runtime-DE-F4Awo.js").then((n) => n.t),
|
|
3292
3410
|
readPlugins(),
|
|
3293
3411
|
readSkillReports()
|
|
3294
3412
|
]);
|
|
@@ -3305,7 +3423,7 @@ async function readRuntimeInfoReport() {
|
|
|
3305
3423
|
/** Read sanitized operational summaries contributed by plugins. */
|
|
3306
3424
|
async function readPluginOperationalReportFeed() {
|
|
3307
3425
|
const nowMs = Date.now();
|
|
3308
|
-
const { getPluginOperationalReports } = await import("./projection-
|
|
3426
|
+
const { getPluginOperationalReports } = await import("./projection-7EFIqzuj.js").then((n) => n.Mn);
|
|
3309
3427
|
return pluginOperationalReportFeedSchema.parse({
|
|
3310
3428
|
source: "plugins",
|
|
3311
3429
|
generatedAt: new Date(nowMs).toISOString(),
|
|
@@ -3352,4 +3470,4 @@ function createJuniorApi(options = {}) {
|
|
|
3352
3470
|
});
|
|
3353
3471
|
return app;
|
|
3354
3472
|
}
|
|
3355
|
-
export { authenticatePersonalToken, createJuniorApi, isAllowedSignInEmail, jsonResponse, readViewerAvatarUrl, resolveViewerUser, updateViewerDisplayName };
|
|
3473
|
+
export { DEFAULT_AUTO_ARCHIVE_SETTINGS, authenticatePersonalToken, createJuniorApi, isAllowedSignInEmail, jsonResponse, readUserAutoArchiveSettings, readViewerAvatarUrl, resolveViewerUser, updateUserAutoArchiveSettings, updateViewerDisplayName };
|