@sentry/junior 0.283.0 → 0.285.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-D8-lqOBF.js → adapter-DN5AB4VU.js} +37 -3
- package/dist/{admin-Dnw5SCXp.js → admin-DOITMKnn.js} +1 -1
- package/dist/{agent-runner-Bj7GhysW.js → agent-runner-BsWhHe4N.js} +583 -1655
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +8 -6
- package/dist/api.d.ts +1 -1
- package/dist/api.js +214 -43
- package/dist/{app-CMBP-N43.d.ts → app-DyMs9330.d.ts} +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +230 -187
- package/dist/{assistant-reply-CdYsLbXL.js → assistant-reply-9Jip5bsr.js} +1 -1
- package/dist/{automation-MLWOrghe.js → automation-Mk8aaHzy.js} +2 -2
- package/dist/{background-compaction-queue-Bbsqx8Vm.js → background-compaction-queue-DXkLsWoH.js} +2 -2
- package/dist/{briefs-C4qBY-jb.js → briefs-Cl8-nK9B.js} +5 -5
- package/dist/{catalog-runtime-B7NRB7eH.js → catalog-runtime-Bte6jRB2.js} +1 -1
- package/dist/cli/chat.js +19 -16
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +3 -0
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +25 -4
- package/dist/{client-a3Ib6wxr.js → client-DDbBucBw.js} +2 -2
- package/dist/{config-DFVlYCeY.js → config-DqFnykQT.js} +1 -1
- package/dist/{connections-BtnvpBEV.js → connections-DA4LT9LL.js} +10 -10
- package/dist/{conversation-DdT7SNar.js → conversation-D8kVoCrP.js} +58 -6
- package/dist/{conversation-pending-messages-Dct5pheX.js → conversation-pending-messages-BvROq1bq.js} +1 -1
- package/dist/{conversation-privacy-DLq-abjU.js → conversation-privacy-D0j_h70R.js} +1 -1
- package/dist/{credential-sync-B4XFVcjM.js → credential-sync-hcsYatw-.js} +13 -13
- package/dist/{db-A_WrTY-s.d.ts → db-BhHZSuFw.d.ts} +18 -2
- package/dist/{executor-HPgHGAWK.js → executor-BLEMIgIZ.js} +29 -4
- package/dist/instrumentation.js +37 -13
- package/dist/{logging-2BXvW7Mp.js → logging-BfORLKoq.js} +1 -1
- package/dist/{message-BG1v1lXX.js → message-DqjuKzUx.js} +13 -23
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-CXNZJymo.js → oauth-callback-server-CFSRzu1n.js} +2 -2
- package/dist/{projection-BfKkpOGQ.js → projection-DliWYrnT.js} +575 -74
- package/dist/{prompt-CCtaGgbI.js → prompt-BvIUzY4y.js} +8 -6
- package/dist/push-endpoint-CO-nomUd.js +36 -0
- package/dist/{registry-CLooHPAz.js → registry-rC7MCxu8.js} +1 -1
- package/dist/{reporting-window-B-QP9zX1.js → reporting-window-B4TwyuJo.js} +14 -14
- package/dist/{resolve-D3MK9oRJ.js → resolve-Biu8Qw3u.js} +3 -3
- package/dist/result-DxJMCX47.js +299 -0
- package/dist/result-event-type-DD6BAgT7.js +11 -0
- package/dist/{runner-Ds31u3rB.js → runner-BQJSFLKg.js} +11 -11
- package/dist/{sandbox-egress-signals-CLd5RPUw.js → sandbox-egress-signals-6aMxJSDn.js} +1 -1
- package/dist/{cadence-R7Em4RjE.js → schedule-BTp__wrw.js} +81 -1
- package/dist/{schema-jW3ccLjp.d.ts → schema-BUviRAs8.d.ts} +196 -220
- package/dist/{schema-CHNP0GfH.js → schema-BasXTvi2.js} +94 -5
- package/dist/{service-account-D6AMahy7.js → service-account-BI5Wgx22.js} +3 -3
- package/dist/{service-account-CWpTsoIM.js → service-account-CAE-_1dR.js} +3 -3
- package/dist/session-stop-CA-jOJ84.js +2924 -0
- package/dist/{skills-DuOKByQH.js → skills-B22duVJU.js} +2 -2
- package/dist/{spawn-CNIQGgAS.js → spawn-BB2_4VYn.js} +2 -2
- package/dist/{stop-DX2oOIgl.js → stop-DioIcEAu.js} +4830 -4200
- package/dist/{store-61mD4ZSh.js → store-B26LV6UP.js} +78 -311
- package/dist/{store-DAJntSEv.js → store-Dn4W7qgH.js} +30 -5
- package/dist/{task-queue-BE70Pb9p.js → task-queue-Bt0IoR2i.js} +3 -3
- package/dist/{task-runner-CmmfddSZ.js → task-runner-D8lddjzp.js} +17 -8
- package/dist/{thread-state-0UfRMWYd.js → thread-state-CrFk3K_7.js} +4 -4
- package/dist/{turn-failure-response-DKdzxJHE.js → turn-failure-response-DaJ04qVj.js} +7 -7
- package/dist/{turn-lifecycle-24sBZ4Ip.js → turn-lifecycle-C2mXS7AZ.js} +1 -1
- package/dist/{turn-session-routing-CzCnNAUO.js → turn-session-routing-CGMKrYOj.js} +10 -10
- package/dist/{validation-Cs_knhR8.js → validation-TzhfQABF.js} +1 -1
- package/dist/{version-ZMC4cXWN.js → version-DSk8CFvA.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CYB9T4rm.js → viewer-1Ea81s0b.js} +190 -53
- package/dist/{work-J1n6RQkY.js → work-ybG4_q5C.js} +238 -32
- package/dist/{worker-s1fCvj1z.js → worker-ccSyZRNz.js} +6 -6
- package/migrations/0082_push_notifications.sql +14 -0
- package/migrations/0083_conversation_kind.sql +11 -0
- package/migrations/0084_read_position_backfill.sql +25 -0
- package/migrations/0085_child_archived_at.sql +1 -0
- package/migrations/meta/0082_snapshot.json +4373 -0
- package/migrations/meta/0083_snapshot.json +4388 -0
- package/migrations/meta/0084_snapshot.json +4388 -0
- package/migrations/meta/0085_snapshot.json +4394 -0
- package/migrations/meta/_journal.json +28 -0
- package/package.json +7 -5
- package/dist/result-BPCjUefO.js +0 -483
- package/dist/session-stop-D8LGC3H6.js +0 -1438
package/dist/api.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { a as completeText, m as escapeXml } from "./client-
|
|
3
|
-
import { n as botConfig, y as getAttachmentStorage } from "./config-
|
|
4
|
-
import { m as logInfo, p as logException } from "./logging-
|
|
5
|
-
import { C as getSqlExecutor, S as getDb, c as readViewerAvatarUrl, d as updateViewerDisplayName, l as resolveViewerUser, m as readAvatarImage, t as findUserByEmail, x as getConversationStore } from "./viewer-
|
|
6
|
-
import {
|
|
1
|
+
import { $n as readWebPushConfig, Aa as SANDBOX_RUNTIME, Ei as hash, Mn as isExperimentalFeatureEnabled, Na as workspaceRepoCheckoutPath, Pn as createUserTokenStore, Qa as readConversationAccessFromSql, Ti as create, Ya as createPluginLogger, Za as createConversationAccessReader, _i as listWorkspaces, _r as searchReviewItems, ar as saveNotificationSchedule, bi as WorkspaceValidationError, co as readConversationBriefThrough, er as sendPushNotificationToUser, gr as reviewItemsNeedingUserVersionQuery, hi as getWorkspace, hr as listWaitingConversations, ir as readNotificationSchedule, jo as createPluginCache, kr as reviewItemReaderForUser, lr as countReviewItemsNeedingUser, mi as deleteWorkspace, nr as deletePushSubscription, or as savePushSubscription, pi as createWorkspace, qn as getPlugins, rr as listPushSubscriptions, si as getDashboardSettingsLink, tr as resolveNotificationTimezone, uo as readConversationEventPage, vi as listWorkspacesByRepository, wr as isOnlyAssignee, xr as canActOnReviewItem, yi as updateWorkspace } from "./projection-DliWYrnT.js";
|
|
2
|
+
import { a as completeText, m as escapeXml } from "./client-DDbBucBw.js";
|
|
3
|
+
import { n as botConfig, y as getAttachmentStorage } from "./config-DqFnykQT.js";
|
|
4
|
+
import { m as logInfo, p as logException } from "./logging-BfORLKoq.js";
|
|
5
|
+
import { C as getSqlExecutor, I as withConversationMutationLock, L as conversationKindFromRow, S as getDb, c as readViewerAvatarUrl, d as updateViewerDisplayName, l as resolveViewerUser, m as readAvatarImage, t as findUserByEmail, tt as nextDetailVersion, x as getConversationStore } from "./viewer-1Ea81s0b.js";
|
|
6
|
+
import { D as juniorCodeChanges, M as juniorIdentities, N as juniorUsers, O as juniorCodeRepositories, P as juniorDestinations, S as juniorConversationMetrics, T as juniorApiTokens, j as juniorConversations, w as juniorConversationEvents } from "./executor-BLEMIgIZ.js";
|
|
7
7
|
import { n as INPUT_IMAGE_TYPES, t as INLINE_VIDEO_TYPES } from "./media-Bu9C6lz0.js";
|
|
8
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
9
|
-
import { $ as
|
|
10
|
-
import { r as getStateAdapter } from "./adapter-
|
|
11
|
-
import {
|
|
12
|
-
import { n as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { s as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { c as
|
|
21
|
-
import {
|
|
22
|
-
import { a as
|
|
23
|
-
import {
|
|
8
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-Bte6jRB2.js";
|
|
9
|
+
import { $ as readViewerAutomationSummary, At as listChildAgents, G as changeViewerAutomationLifecycle, J as updateViewerAutomation, K as deleteViewerTask, Q as readViewerAutomationRuns, S as createSlackReviewItemShow, W as activateViewerAutomationVersion, Y as ViewerTaskNotFoundError, Z as readViewerAutomationExecutions, et as readViewerAutomationVersions, h as readStats, it as listOwnedWatches, mt as webActorFromUser, nt as AutomationEditError, q as readViewerAutomationEdit, tt as readViewerAutomations, vt as readLiveAttachment } from "./agent-runner-BsWhHe4N.js";
|
|
10
|
+
import { r as getStateAdapter } from "./adapter-DN5AB4VU.js";
|
|
11
|
+
import { r as notificationScheduleSchema } from "./schedule-BTp__wrw.js";
|
|
12
|
+
import { C as createConversationBodySchema, E as forkConversationResponseSchema, O as conversationReadPositionSchema, T as forkConversationBodySchema, c as conversationDetailQuerySchema, d as conversationEventPageSchema, f as conversationEventsQuerySchema, h as conversationParamsSchema, k as conversationReadReportSchema, l as conversationDetailReportSchema, m as conversationFeedSchema, n as CONVERSATION_VERSION_HEADER, o as conversationAttachmentParamsSchema, p as conversationFeedQuerySchema, r as acceptedConversationMessageSchema, t as CONVERSATION_DETAIL_VERSION_HEADER, w as createConversationMessageBodySchema } from "./conversation-D8kVoCrP.js";
|
|
13
|
+
import { n as briefEntriesFromReportEvents } from "./prompt-BvIUzY4y.js";
|
|
14
|
+
import { $ as saveUserCustomization, E as getEventCatalog, Q as readUserCustomization } from "./session-stop-CA-jOJ84.js";
|
|
15
|
+
import { T as userCustomizationSchema, a as fillUtcSixHours, 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-B4TwyuJo.js";
|
|
16
|
+
import { s as getSandboxResources, t as getCachedSnapshot } from "./resolve-Biu8Qw3u.js";
|
|
17
|
+
import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-DXkLsWoH.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-CGMKrYOj.js";
|
|
19
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-BI5Wgx22.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-Mk8aaHzy.js";
|
|
21
|
+
import { c as conversationUnchangedDetailWithMailboxSchema, d as apiErrorSchema, f as healthReportSchema, l as steerConversationPendingMessagesBodySchema, n as cancelConversationPendingMessagesResponseSchema, p as pluginOperationalReportFeedSchema, r as conversationDetailWithMailboxReportSchema, s as conversationPendingMessagesReportSchema, t as cancelConversationPendingMessagesBodySchema, u as steerConversationPendingMessagesResponseSchema, v as pluginsSchema, x as skillReportsSchema, y as runtimeInfoReportSchema } from "./conversation-pending-messages-BvROq1bq.js";
|
|
22
|
+
import { $ as actOnReviewItem, A as archiveConversation, C as createConversationForViewer, E as cancelConversationPendingMessagesForViewer, L as isAllowedSignInEmail, O as requireConversationPendingMessages, P as getProductionSlackAdapter, Q as ReviewItemActionError, S as appendConversationMessageForViewer, _ as keepQuickQuestionForViewer, a as pinConversation, at as readUserAutoArchiveSettings, c as continueConversationInSlackForViewer, ct as updateUserAutoArchiveSettings, d as readConversationTreeMetricsFromSql, dt as throwApiError, f as conversationVersionQuery, g as forkConversationForViewer, h as reportConversationRead, ht as readHealthReport, i as readConversationFeed, it as archiveViewerDoneConversations, k as resolveMentions, l as readConversationAuxiliaryCostsFromSql, lt as emptyResponse, m as markConversationUnread, n as steerConversationPendingMessagesForViewer, o as reorderPinnedConversations, p as readConversationDetailEtag, r as conversationFeedVersionQuery, rt as DEFAULT_AUTO_ARCHIVE_SETTINGS, s as readConversationDetail, st as setConversationAutoArchive, t as stopConversationTurnForViewer, tt as readReviewItemForUser, u as childAgentTotalsReport, ut as jsonResponse, v as readConversationEvents, x as readFirstHumanMessageTexts, y as conversationSummaryFromStoredConversation } from "./stop-DioIcEAu.js";
|
|
23
|
+
import { a as startConnection, n as isConnectableProvider, r as listConnections, t as disconnectConnection, u as htmlCallbackResponse } from "./connections-DA4LT9LL.js";
|
|
24
|
+
import { A as actorDirectoryReportSchema, B as activityHours$1, C as startServiceAccountSignInResponseSchema, Ct as pinConversationBodySchema, Dt as conversationCatchUpBodySchema, E as personalTokenListSchema, Et as reorderPinnedConversationsResponseSchema, G as pushSubscriptionDeleteBodySchema, I as locationDetailReportSchema, J as connectionParamsSchema, K as testNotificationResponseSchema, L as locationDirectoryReportSchema, M as avatarParamsSchema, N as personParamsSchema, O as personalTokenParamsSchema, Ot as conversationCatchUpSchema, P as personalSpendReportSchema, R as locationParamsSchema, St as markConversationUnreadBodySchema, T as createdPersonalTokenSchema, Tt as reorderPinnedConversationsBodySchema, U as notificationSettingsSchema, V as activitySixHours$1, W as pushSubscriptionBodySchema, X as disconnectConnectionResponseSchema, Z as startConnectionResponseSchema, _ as reviewItemSchema, _t as archiveConversationBodySchema, b as serviceAccountListSchema, bt as conversationAutoArchiveSchema, c as workspaceListSchema, d as workspaceSchema, dt as continueConversationInSlackResponseSchema, f as reviewItemActionSchema, ft as stopConversationTurnResponseSchema, g as reviewItemParamsSchema, gt as renameConversationResponseSchema, h as reviewItemListSchema, ht as renameConversationBodySchema, i as statsReportSchema, it as codeRepositoryReportSchema, j as actorProfileReportSchema, k as revokePersonalTokenResponseSchema, l as workspaceParamsSchema, lt as conversationChildAgentsReportSchema, m as reviewItemListQuerySchema, n as versionsSchema, nt as codePersonReportSchema, o as deleteWorkspaceResponseSchema, p as reviewItemCountSchema, pt as conversationStatsReportSchema, q as connectionListSchema, rt as codeRepositoryParamsSchema, s as workspaceBodySchema, st as conversationWatchesReportSchema, t as versionsQuerySchema, tt as codeOverviewReportSchema, ut as continueConversationInSlackBodySchema, v as reviewItemWaitingConversationsSchema, vt as archiveConversationResponseSchema, w as createPersonalTokenBodySchema, wt as pinConversationResponseSchema, x as serviceAccountParamsSchema, xt as conversationUnreadSchema, y as disconnectServiceAccountResponseSchema, yt as archiveDoneConversationsResponseSchema, z as activityDays$1 } from "./schema-BasXTvi2.js";
|
|
24
25
|
import { Hono } from "hono";
|
|
25
26
|
import path from "node:path";
|
|
26
27
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
27
28
|
import * as z from "zod";
|
|
28
|
-
import { and, asc, desc, eq, gt, gte, isNull, lte, notExists, or, sql } from "drizzle-orm";
|
|
29
|
+
import { and, asc, desc, eq, gt, gte, inArray, isNull, lte, notExists, or, sql } from "drizzle-orm";
|
|
29
30
|
import { pluginUserPageContentSchema, pluginUserPageCursorSchema, pluginUserPageFilterSchema, pluginUserPageLinksSchema, pluginUserPageQuerySchema } from "@sentry/junior-plugin-api";
|
|
30
31
|
import { alias } from "drizzle-orm/pg-core";
|
|
31
32
|
import { readFileSync } from "node:fs";
|
|
@@ -192,11 +193,56 @@ async function catchUpOnConversation(viewer, conversationId, range) {
|
|
|
192
193
|
...conversation.title ? { title: conversation.title } : void 0
|
|
193
194
|
});
|
|
194
195
|
}
|
|
196
|
+
// src/chat/conversations/sql/title.ts
|
|
197
|
+
/**
|
|
198
|
+
* Replace one Conversation's title. Returns the stored title, or undefined
|
|
199
|
+
* when the Conversation does not exist.
|
|
200
|
+
*
|
|
201
|
+
* recordActivity reads the title and writes it back under the mutation lock,
|
|
202
|
+
* so this write takes the same lock. A concurrent Turn cannot restore the old
|
|
203
|
+
* title.
|
|
204
|
+
*/
|
|
205
|
+
async function setConversationTitle(executor, conversationId, title) {
|
|
206
|
+
return await withConversationMutationLock(executor, conversationId, async () => {
|
|
207
|
+
const [row] = await executor.db().update(juniorConversations).set({
|
|
208
|
+
detailVersion: nextDetailVersion,
|
|
209
|
+
title
|
|
210
|
+
}).where(eq(juniorConversations.conversationId, conversationId)).returning({ title: juniorConversations.title });
|
|
211
|
+
return row?.title ?? void 0;
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
// src/api/conversations/rename.ts
|
|
215
|
+
/**
|
|
216
|
+
* Rename one conversation. The title is shared, so only a participant can
|
|
217
|
+
* change it, the same as pin and archive. Automatic titles are set once, so a
|
|
218
|
+
* later Turn keeps this title.
|
|
219
|
+
*/
|
|
220
|
+
async function renameConversation(viewer, conversationId, body) {
|
|
221
|
+
if (!(await readConversationAccessFromSql(getDb(), [conversationId], viewer)).get(conversationId)?.isParticipant) throwApiError(404, "Conversation not found.");
|
|
222
|
+
const title = await setConversationTitle(getSqlExecutor(), conversationId, body.title);
|
|
223
|
+
if (!title) throwApiError(404, "Conversation not found.");
|
|
224
|
+
return { title };
|
|
225
|
+
}
|
|
195
226
|
// src/api/conversations/child-agents.ts
|
|
227
|
+
/** Read the kind and archive of each child Conversation. */
|
|
228
|
+
async function readChildKinds(db, childIds) {
|
|
229
|
+
if (childIds.length === 0) return /* @__PURE__ */ new Map();
|
|
230
|
+
const rows = await db.select({
|
|
231
|
+
conversationId: juniorConversations.conversationId,
|
|
232
|
+
kind: juniorConversations.kind,
|
|
233
|
+
parentConversationId: juniorConversations.parentConversationId,
|
|
234
|
+
childArchivedAt: juniorConversations.childArchivedAt
|
|
235
|
+
}).from(juniorConversations).where(inArray(juniorConversations.conversationId, [...childIds]));
|
|
236
|
+
return new Map(rows.map((row) => [row.conversationId, {
|
|
237
|
+
kind: conversationKindFromRow(row) === "thread" ? "thread" : "task",
|
|
238
|
+
childArchivedAt: row.childArchivedAt?.toISOString() ?? null
|
|
239
|
+
}]));
|
|
240
|
+
}
|
|
196
241
|
/**
|
|
197
242
|
* Load the direct child agents of one Conversation, or throw a standard API
|
|
198
243
|
* not-found error. Viewers who cannot see private content get only the status,
|
|
199
|
-
* time, and usage of each child agent.
|
|
244
|
+
* time, and usage of each child agent. Archived children stay in the report,
|
|
245
|
+
* so the dashboard can show and restore them.
|
|
200
246
|
*/
|
|
201
247
|
async function requireConversationChildAgents(conversationId, options = {}) {
|
|
202
248
|
if (!await getConversationStore().get({ conversationId })) throwApiError(404, "Conversation not found.");
|
|
@@ -204,7 +250,11 @@ async function requireConversationChildAgents(conversationId, options = {}) {
|
|
|
204
250
|
const [accessByConversation, children] = await Promise.all([readConversationAccessFromSql(db, [conversationId], options.viewer), listChildAgents(conversationId)]);
|
|
205
251
|
const canExposePayload = accessByConversation.get(conversationId)?.canViewPrivateContent ?? false;
|
|
206
252
|
const childIds = children.map((agent) => agent.childConversationId);
|
|
207
|
-
const [metricsByChild, auxiliaryCostsByChild] = await Promise.all([
|
|
253
|
+
const [metricsByChild, auxiliaryCostsByChild, kindByChild] = await Promise.all([
|
|
254
|
+
readConversationTreeMetricsFromSql(db, childIds),
|
|
255
|
+
readConversationAuxiliaryCostsFromSql(db, childIds),
|
|
256
|
+
readChildKinds(db, childIds)
|
|
257
|
+
]);
|
|
208
258
|
const agents = children.map((agent) => {
|
|
209
259
|
const metrics = metricsByChild.get(agent.childConversationId);
|
|
210
260
|
const auxiliaryCosts = auxiliaryCostsByChild.get(agent.childConversationId);
|
|
@@ -215,6 +265,10 @@ async function requireConversationChildAgents(conversationId, options = {}) {
|
|
|
215
265
|
...metrics?.usage ? { cumulativeUsage: metrics.usage } : void 0,
|
|
216
266
|
...auxiliaryCosts ? { auxiliaryCosts: auxiliaryCosts.total } : void 0,
|
|
217
267
|
...childAgentTotals ? { childAgentTotals } : void 0,
|
|
268
|
+
...kindByChild.get(agent.childConversationId) ?? {
|
|
269
|
+
kind: "task",
|
|
270
|
+
childArchivedAt: null
|
|
271
|
+
},
|
|
218
272
|
status: agent.status,
|
|
219
273
|
updatedAt: new Date(agent.updatedAtMs).toISOString(),
|
|
220
274
|
...canExposePayload ? {
|
|
@@ -746,6 +800,7 @@ function createConversationRoutes(options) {
|
|
|
746
800
|
const { conversationId } = context.req.valid("param");
|
|
747
801
|
return jsonResponse(stopConversationTurnResponseSchema, await stopConversationTurnForViewer(viewer, conversationId, options));
|
|
748
802
|
});
|
|
803
|
+
app.post("/:conversationId/continue-in-slack", requireViewer, validateRequest("param", conversationParamsSchema, "Invalid route parameters."), validateRequest("json", continueConversationInSlackBodySchema, "Invalid request body."), async (context) => jsonResponse(continueConversationInSlackResponseSchema, await continueConversationInSlackForViewer(context.get("viewer"), context.req.valid("param").conversationId, context.req.valid("json"))));
|
|
749
804
|
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"))));
|
|
750
805
|
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)));
|
|
751
806
|
app.patch("/:conversationId/archive", requireViewer, validateRequest("param", conversationParamsSchema, "Invalid route parameters."), validateRequest("json", archiveConversationBodySchema, "Invalid request body."), async (context) => {
|
|
@@ -755,11 +810,13 @@ function createConversationRoutes(options) {
|
|
|
755
810
|
return jsonResponse(archiveConversationResponseSchema, await archiveConversation(viewer, conversationId, body));
|
|
756
811
|
});
|
|
757
812
|
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"))));
|
|
813
|
+
app.patch("/:conversationId/unread", requireViewer, validateRequest("param", conversationParamsSchema, "Invalid route parameters."), validateRequest("json", markConversationUnreadBodySchema, "Invalid request body."), async (context) => jsonResponse(conversationUnreadSchema, await markConversationUnread(context.get("viewer"), context.req.valid("param").conversationId, context.req.valid("json"))));
|
|
814
|
+
app.patch("/:conversationId/title", requireViewer, validateRequest("param", conversationParamsSchema, "Invalid route parameters."), validateRequest("json", renameConversationBodySchema, "Invalid request body."), async (context) => jsonResponse(renameConversationResponseSchema, await renameConversation(context.get("viewer"), context.req.valid("param").conversationId, context.req.valid("json"))));
|
|
758
815
|
app.put("/:conversationId/read-position", requireViewer, validateRequest("param", conversationParamsSchema, "Invalid route parameters."), validateRequest("json", conversationReadPositionSchema, "Invalid request body."), async (context) => {
|
|
759
816
|
const viewer = context.get("viewer");
|
|
760
817
|
const { conversationId } = context.req.valid("param");
|
|
761
818
|
const body = context.req.valid("json");
|
|
762
|
-
return jsonResponse(
|
|
819
|
+
return jsonResponse(conversationReadReportSchema, await reportConversationRead(viewer, conversationId, body));
|
|
763
820
|
});
|
|
764
821
|
app.put("/pin-order", requireViewer, validateRequest("json", reorderPinnedConversationsBodySchema, "Invalid request body."), async (context) => jsonResponse(reorderPinnedConversationsResponseSchema, await reorderPinnedConversations(context.get("viewer"), context.req.valid("json"))));
|
|
765
822
|
app.post("/archive-done", requireViewer, async (context) => jsonResponse(archiveDoneConversationsResponseSchema, await archiveViewerDoneConversations(context.get("viewer"))));
|
|
@@ -825,15 +882,21 @@ function createConversationRoutes(options) {
|
|
|
825
882
|
const viewer = context.get("viewer");
|
|
826
883
|
const viewerOptions = viewer ? { viewer } : void 0;
|
|
827
884
|
const sentVersion = context.req.header(CONVERSATION_DETAIL_VERSION_HEADER);
|
|
828
|
-
const
|
|
885
|
+
const readAccess = createConversationAccessReader(getDb(), viewer);
|
|
886
|
+
const readMailbox = () => requireConversationPendingMessages(conversationId, {
|
|
887
|
+
readAccess,
|
|
888
|
+
...viewerOptions
|
|
889
|
+
});
|
|
829
890
|
const readVersion = () => readConversationDetailEtag(conversationId, {
|
|
830
891
|
limit: query.limit,
|
|
892
|
+
readAccess,
|
|
831
893
|
...viewerOptions
|
|
832
894
|
});
|
|
833
895
|
const [mailbox, version] = withMailbox && sentVersion ? [await readMailbox(), await readVersion()] : await Promise.all([withMailbox ? readMailbox() : void 0, readVersion()]);
|
|
834
896
|
const headers = version ? {
|
|
835
897
|
"cache-control": "private, no-store",
|
|
836
|
-
[CONVERSATION_DETAIL_VERSION_HEADER]: version.etag
|
|
898
|
+
[CONVERSATION_DETAIL_VERSION_HEADER]: version.etag,
|
|
899
|
+
[CONVERSATION_VERSION_HEADER]: version.version
|
|
837
900
|
} : void 0;
|
|
838
901
|
if (version && sentVersion === version.etag) return mailbox ? jsonResponse(conversationUnchangedDetailWithMailboxSchema, {
|
|
839
902
|
mailbox,
|
|
@@ -1358,6 +1421,77 @@ function createConnectionRoutes() {
|
|
|
1358
1421
|
});
|
|
1359
1422
|
return app;
|
|
1360
1423
|
}
|
|
1424
|
+
// src/api/notifications/routes.ts
|
|
1425
|
+
async function readSettings(userId) {
|
|
1426
|
+
const db = getDb();
|
|
1427
|
+
const nowMs = Date.now();
|
|
1428
|
+
const schedule = await readNotificationSchedule(db, userId);
|
|
1429
|
+
const [{ source, timezone }, subscriptions] = await Promise.all([resolveNotificationTimezone({
|
|
1430
|
+
db,
|
|
1431
|
+
nowMs,
|
|
1432
|
+
schedule,
|
|
1433
|
+
userId
|
|
1434
|
+
}), listPushSubscriptions(db, userId)]);
|
|
1435
|
+
const config = readWebPushConfig();
|
|
1436
|
+
return notificationSettingsSchema.parse({
|
|
1437
|
+
...config ? { publicKey: config.publicKey } : void 0,
|
|
1438
|
+
deviceCount: subscriptions.length,
|
|
1439
|
+
schedule,
|
|
1440
|
+
timezone,
|
|
1441
|
+
timezoneSource: source
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1444
|
+
async function settingsResponse(userId) {
|
|
1445
|
+
return jsonResponse(notificationSettingsSchema, await readSettings(userId));
|
|
1446
|
+
}
|
|
1447
|
+
/**
|
|
1448
|
+
* Create authenticated routes for the viewer's phone notifications: browser
|
|
1449
|
+
* subscriptions, notification hours, and a test notification.
|
|
1450
|
+
*/
|
|
1451
|
+
function createNotificationRoutes() {
|
|
1452
|
+
const app = new Hono();
|
|
1453
|
+
app.get("/", requireViewer, async (context) => settingsResponse(context.get("viewer").id));
|
|
1454
|
+
app.put("/schedule", requireViewer, validateRequest("json", notificationScheduleSchema, "Invalid schedule."), async (context) => {
|
|
1455
|
+
const viewer = context.get("viewer");
|
|
1456
|
+
if (!await saveNotificationSchedule(getDb(), viewer.id, context.req.valid("json"), Date.now())) throwApiError(404, "User not found.");
|
|
1457
|
+
return await settingsResponse(viewer.id);
|
|
1458
|
+
});
|
|
1459
|
+
app.post("/subscriptions", requireViewer, validateRequest("json", pushSubscriptionBodySchema, "Invalid subscription."), async (context) => {
|
|
1460
|
+
if (!readWebPushConfig()) throwApiError(503, "Phone notifications are not configured.");
|
|
1461
|
+
const viewer = context.get("viewer");
|
|
1462
|
+
const { endpoint, keys } = context.req.valid("json");
|
|
1463
|
+
await savePushSubscription(getDb(), viewer.id, {
|
|
1464
|
+
endpoint,
|
|
1465
|
+
keys
|
|
1466
|
+
}, Date.now());
|
|
1467
|
+
logInfo("notification.subscription.saved");
|
|
1468
|
+
return await settingsResponse(viewer.id);
|
|
1469
|
+
});
|
|
1470
|
+
app.delete("/subscriptions", requireViewer, validateRequest("json", pushSubscriptionDeleteBodySchema, "Invalid subscription."), async (context) => {
|
|
1471
|
+
const viewer = context.get("viewer");
|
|
1472
|
+
await deletePushSubscription(getDb(), viewer.id, context.req.valid("json").endpoint);
|
|
1473
|
+
logInfo("notification.subscription.deleted");
|
|
1474
|
+
return await settingsResponse(viewer.id);
|
|
1475
|
+
});
|
|
1476
|
+
app.post("/test", requireViewer, async (context) => {
|
|
1477
|
+
const config = readWebPushConfig();
|
|
1478
|
+
if (!config) throwApiError(503, "Phone notifications are not configured.");
|
|
1479
|
+
const result = await sendPushNotificationToUser({
|
|
1480
|
+
config,
|
|
1481
|
+
db: getDb(),
|
|
1482
|
+
kind: "test",
|
|
1483
|
+
payload: {
|
|
1484
|
+
body: "Notifications work on this device.",
|
|
1485
|
+
tag: "junior-test",
|
|
1486
|
+
title: "Junior",
|
|
1487
|
+
url: getDashboardSettingsLink() ?? "/"
|
|
1488
|
+
},
|
|
1489
|
+
userId: context.get("viewer").id
|
|
1490
|
+
});
|
|
1491
|
+
return jsonResponse(testNotificationResponseSchema, { delivered: result.delivered });
|
|
1492
|
+
});
|
|
1493
|
+
return app;
|
|
1494
|
+
}
|
|
1361
1495
|
// src/api/conversations/reporting.ts
|
|
1362
1496
|
/** Return the dashboard label for a conversation surface. */
|
|
1363
1497
|
function surfaceLabel(surface) {
|
|
@@ -1395,6 +1529,7 @@ function summaryFromRow(row, options = {}) {
|
|
|
1395
1529
|
const conversation = {
|
|
1396
1530
|
conversationId: row.conversationId,
|
|
1397
1531
|
createdAtMs: row.createdAt.getTime(),
|
|
1532
|
+
kind: conversationKindFromRow(row),
|
|
1398
1533
|
lastActivityAtMs: row.lastActivityAt.getTime(),
|
|
1399
1534
|
updatedAtMs: row.updatedAt.getTime(),
|
|
1400
1535
|
execution: {
|
|
@@ -1403,7 +1538,10 @@ function summaryFromRow(row, options = {}) {
|
|
|
1403
1538
|
},
|
|
1404
1539
|
...actor ? { actor } : void 0,
|
|
1405
1540
|
...row.channelName ? { channelName: row.channelName } : void 0,
|
|
1541
|
+
...row.parentConversationId ? { parentConversationId: row.parentConversationId } : void 0,
|
|
1542
|
+
...row.childArchivedAt ? { childArchivedAtMs: row.childArchivedAt.getTime() } : void 0,
|
|
1406
1543
|
...row.source ? { source: row.source } : void 0,
|
|
1544
|
+
...row.stoppedAt ? { stoppedAtMs: row.stoppedAt.getTime() } : void 0,
|
|
1407
1545
|
...row.title ? { title: row.title } : void 0
|
|
1408
1546
|
};
|
|
1409
1547
|
return conversationSummaryFromStoredConversation({
|
|
@@ -1618,8 +1756,12 @@ async function recentLocationRows(db, locationId) {
|
|
|
1618
1756
|
${juniorIdentities.email}
|
|
1619
1757
|
)`,
|
|
1620
1758
|
executionStatus: juniorConversations.executionStatus,
|
|
1759
|
+
stoppedAt: juniorConversations.stoppedAt,
|
|
1621
1760
|
executionUpdatedAt: juniorConversations.executionUpdatedAt,
|
|
1622
1761
|
fullName: juniorUsers.displayName,
|
|
1762
|
+
kind: juniorConversations.kind,
|
|
1763
|
+
parentConversationId: juniorConversations.parentConversationId,
|
|
1764
|
+
childArchivedAt: juniorConversations.childArchivedAt,
|
|
1623
1765
|
handle: juniorIdentities.handle,
|
|
1624
1766
|
lastActivityAt: juniorConversations.lastActivityAt,
|
|
1625
1767
|
providerSubjectId: sql`CASE
|
|
@@ -1893,8 +2035,12 @@ async function recentActorRows(email) {
|
|
|
1893
2035
|
durationMs: juniorConversations.durationMs,
|
|
1894
2036
|
email: juniorUsers.primaryEmailNormalized,
|
|
1895
2037
|
executionStatus: juniorConversations.executionStatus,
|
|
2038
|
+
stoppedAt: juniorConversations.stoppedAt,
|
|
1896
2039
|
executionUpdatedAt: juniorConversations.executionUpdatedAt,
|
|
1897
2040
|
fullName: juniorUsers.displayName,
|
|
2041
|
+
kind: juniorConversations.kind,
|
|
2042
|
+
parentConversationId: juniorConversations.parentConversationId,
|
|
2043
|
+
childArchivedAt: juniorConversations.childArchivedAt,
|
|
1898
2044
|
handle: sql`CASE WHEN ${juniorIdentities.provider} = 'slack' THEN ${juniorIdentities.handle} END`,
|
|
1899
2045
|
lastActivityAt: juniorConversations.lastActivityAt,
|
|
1900
2046
|
providerSubjectId: sql`CASE WHEN ${juniorIdentities.provider} = 'slack' THEN ${juniorIdentities.providerSubjectId} END`,
|
|
@@ -2126,7 +2272,7 @@ async function readPeoplePluginReports(args) {
|
|
|
2126
2272
|
reports: [],
|
|
2127
2273
|
source: "plugins"
|
|
2128
2274
|
});
|
|
2129
|
-
const { getPluginProfileReports } = await import("./projection-
|
|
2275
|
+
const { getPluginProfileReports } = await import("./projection-DliWYrnT.js").then((n) => n.zn);
|
|
2130
2276
|
return pluginOperationalReportFeedSchema.parse({
|
|
2131
2277
|
generatedAt: new Date(nowMs).toISOString(),
|
|
2132
2278
|
reports: await getPluginProfileReports({
|
|
@@ -2336,21 +2482,21 @@ function spendWindow(nowMs) {
|
|
|
2336
2482
|
};
|
|
2337
2483
|
}
|
|
2338
2484
|
/**
|
|
2339
|
-
*
|
|
2485
|
+
* Return a query for a cheap change marker of one viewer's spend window.
|
|
2340
2486
|
*
|
|
2341
2487
|
* Writes that record Conversation metrics also move `updated_at` forward, so
|
|
2342
|
-
* the marker changes when spend can change. The
|
|
2343
|
-
*
|
|
2488
|
+
* the marker changes when spend can change. The window start is part of the
|
|
2489
|
+
* marker, so it also changes when the window moves at UTC midnight.
|
|
2344
2490
|
*/
|
|
2345
|
-
|
|
2491
|
+
function personalSpendVersionQuery(db, email, nowMs) {
|
|
2346
2492
|
const normalizedEmail = normalizeEmail$1(email);
|
|
2347
|
-
if (!normalizedEmail) return "";
|
|
2348
2493
|
const { end, thirtyDayStart } = spendWindow(nowMs);
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2494
|
+
return db.select({ version: sql`concat_ws(':', ${thirtyDayStart.toISOString().slice(0, 10)}::text, count(*), max(${juniorConversations.updatedAt}))` }).from(juniorConversations).innerJoin(juniorIdentities, eq(juniorIdentities.id, juniorConversations.actorIdentityId)).innerJoin(juniorUsers, eq(juniorUsers.id, juniorIdentities.userId)).where(normalizedEmail ? and(verifiedActorWhere(normalizedEmail), gte(juniorConversations.lastActivityAt, thirtyDayStart), lte(juniorConversations.lastActivityAt, end)) : sql`false`);
|
|
2495
|
+
}
|
|
2496
|
+
/** Read the change marker of one viewer's spend window. */
|
|
2497
|
+
async function readPersonalSpendVersion(email, nowMs = Date.now()) {
|
|
2498
|
+
const [row] = await personalSpendVersionQuery(getDb(), email, nowMs);
|
|
2499
|
+
return row?.version ?? "";
|
|
2354
2500
|
}
|
|
2355
2501
|
/** Read one viewer's rolling model spend with one bounded aggregate query. */
|
|
2356
2502
|
async function readPersonalSpendFromSql(email, nowMs = Date.now()) {
|
|
@@ -3144,6 +3290,29 @@ async function readStatsReport() {
|
|
|
3144
3290
|
windowStart: start
|
|
3145
3291
|
});
|
|
3146
3292
|
}
|
|
3293
|
+
// src/api/versions.ts
|
|
3294
|
+
/**
|
|
3295
|
+
* Read the change tokens of the dashboard reads in one statement, so one
|
|
3296
|
+
* cheap poll can tell which reads to refresh. The real endpoints still check
|
|
3297
|
+
* access. The Conversation token shows no more than its detail report does:
|
|
3298
|
+
* that report answers any viewer, with private content redacted.
|
|
3299
|
+
*/
|
|
3300
|
+
async function readVersions(viewer, options = {}) {
|
|
3301
|
+
const db = getDb();
|
|
3302
|
+
const [row] = await db.select({
|
|
3303
|
+
conversation: options.conversationId ? sql`(${conversationVersionQuery(db, options.conversationId, viewer.id)})` : sql`null`,
|
|
3304
|
+
conversations: sql`(${conversationFeedVersionQuery(db, viewer.id)})`,
|
|
3305
|
+
reviewItems: sql`(${reviewItemsNeedingUserVersionQuery(db, viewer.id)})`,
|
|
3306
|
+
spend: sql`(${personalSpendVersionQuery(db, viewer.email, Date.now())})`
|
|
3307
|
+
}).from(juniorUsers).where(eq(juniorUsers.id, viewer.id));
|
|
3308
|
+
if (!row) throw new Error("Viewer user row is missing");
|
|
3309
|
+
return {
|
|
3310
|
+
...row.conversation ? { conversation: row.conversation } : void 0,
|
|
3311
|
+
conversations: row.conversations,
|
|
3312
|
+
reviewItems: row.reviewItems,
|
|
3313
|
+
spend: row.spend
|
|
3314
|
+
};
|
|
3315
|
+
}
|
|
3147
3316
|
// src/reporting.ts
|
|
3148
3317
|
function readDescriptionText(home) {
|
|
3149
3318
|
try {
|
|
@@ -3154,7 +3323,7 @@ function readDescriptionText(home) {
|
|
|
3154
3323
|
}
|
|
3155
3324
|
/** Read discovered skill names for authenticated runtime diagnostics. */
|
|
3156
3325
|
async function readSkillReports() {
|
|
3157
|
-
const { discoverSkills } = await import("./skills-
|
|
3326
|
+
const { discoverSkills } = await import("./skills-B22duVJU.js").then((n) => n.o);
|
|
3158
3327
|
const skills = await discoverSkills();
|
|
3159
3328
|
return skillReportsSchema.parse(skills.map((skill) => ({
|
|
3160
3329
|
name: skill.name,
|
|
@@ -3163,7 +3332,7 @@ async function readSkillReports() {
|
|
|
3163
3332
|
}
|
|
3164
3333
|
/** Read safe configured plugin metadata for authenticated runtime diagnostics. */
|
|
3165
3334
|
async function readPlugins() {
|
|
3166
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
3335
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-Bte6jRB2.js").then((n) => n.t);
|
|
3167
3336
|
return pluginsSchema.parse(pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
3168
3337
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
3169
3338
|
description: plugin.manifest.description,
|
|
@@ -3175,7 +3344,7 @@ async function readPlugins() {
|
|
|
3175
3344
|
async function readRuntimeInfoReport() {
|
|
3176
3345
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
3177
3346
|
import("./package-discovery-DJhGdS4c.js").then((n) => n.r),
|
|
3178
|
-
import("./catalog-runtime-
|
|
3347
|
+
import("./catalog-runtime-Bte6jRB2.js").then((n) => n.t),
|
|
3179
3348
|
readPlugins(),
|
|
3180
3349
|
readSkillReports()
|
|
3181
3350
|
]);
|
|
@@ -3192,7 +3361,7 @@ async function readRuntimeInfoReport() {
|
|
|
3192
3361
|
/** Read sanitized operational summaries contributed by plugins. */
|
|
3193
3362
|
async function readPluginOperationalReportFeed() {
|
|
3194
3363
|
const nowMs = Date.now();
|
|
3195
|
-
const { getPluginOperationalReports } = await import("./projection-
|
|
3364
|
+
const { getPluginOperationalReports } = await import("./projection-DliWYrnT.js").then((n) => n.zn);
|
|
3196
3365
|
return pluginOperationalReportFeedSchema.parse({
|
|
3197
3366
|
source: "plugins",
|
|
3198
3367
|
generatedAt: new Date(nowMs).toISOString(),
|
|
@@ -3209,6 +3378,7 @@ function createJuniorApi(options = {}) {
|
|
|
3209
3378
|
app.get("/api/skills", async () => jsonResponse(skillReportsSchema, await readSkillReports()));
|
|
3210
3379
|
app.get("/api/plugin-reports", async () => jsonResponse(pluginOperationalReportFeedSchema, await readPluginOperationalReportFeed()));
|
|
3211
3380
|
app.get("/api/stats", async () => jsonResponse(statsReportSchema, await readStatsReport()));
|
|
3381
|
+
app.get("/api/versions", requireViewer, validateRequest("query", versionsQuerySchema, "Invalid query parameters."), async (context) => jsonResponse(versionsSchema, await readVersions(context.get("viewer"), context.req.valid("query")), { headers: { "cache-control": "private, no-store" } }));
|
|
3212
3382
|
const queue = options.conversationWorkQueue ?? getVercelConversationWorkQueue();
|
|
3213
3383
|
app.route("/api/conversations", createConversationRoutes({
|
|
3214
3384
|
attachmentStorage: getAttachmentStorage(),
|
|
@@ -3220,6 +3390,7 @@ function createJuniorApi(options = {}) {
|
|
|
3220
3390
|
} }));
|
|
3221
3391
|
app.route("/api/code", createCodeRoutes());
|
|
3222
3392
|
app.route("/api/connections", createConnectionRoutes());
|
|
3393
|
+
app.route("/api/notifications", createNotificationRoutes());
|
|
3223
3394
|
app.route("/api/personal-tokens", createPersonalTokenRoutes());
|
|
3224
3395
|
app.route("/api/service-accounts", createServiceAccountRoutes());
|
|
3225
3396
|
app.route("/api/people", createPeopleRoutes());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as ConversationWorkQueue, t as ConversationQueueMessage } from "./queue-CZyYgPF0.js";
|
|
2
|
-
import { t as ConversationStore } from "./db-
|
|
3
|
-
import "./schema-
|
|
2
|
+
import { t as ConversationStore } from "./db-BhHZSuFw.js";
|
|
3
|
+
import "./schema-BUviRAs8.js";
|
|
4
4
|
import { n as JuniorPluginSet } from "./plugins-DtmjkTza.js";
|
|
5
5
|
import "./sentry-DrKC2NeM.js";
|
|
6
6
|
import { Hono } from "hono";
|
package/dist/app.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as JuniorDashboardOptions, n as JuniorAppOptions, r as createApp, t as JuniorApp } from "./app-
|
|
1
|
+
import { i as JuniorDashboardOptions, n as JuniorAppOptions, r as createApp, t as JuniorApp } from "./app-DyMs9330.js";
|
|
2
2
|
import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-DtmjkTza.js";
|
|
3
3
|
import { t as JUNIOR_VERSION } from "./version-Cc2OFd9G.js";
|
|
4
4
|
export { JUNIOR_VERSION, JuniorApp, JuniorAppOptions, type JuniorDashboardOptions, type JuniorPluginInput, type JuniorPluginSet, type JuniorPluginSetOptions, createApp, defineJuniorPlugins };
|