@sentry/junior 0.282.0 → 0.284.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-BAqo7eOH.js → adapter-CW5UW7vL.js} +1 -1
- package/dist/{admin-DbWpMHh6.js → admin-DUWN8zZX.js} +1 -1
- package/dist/{agent-runner-h4CDcnDV.js → agent-runner-Cqr21pOU.js} +53 -25
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +7 -6
- package/dist/api.d.ts +1 -1
- package/dist/api.js +167 -59
- package/dist/{app-B-0wwAxr.d.ts → app-CvGalMxi.d.ts} +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +34 -31
- package/dist/{assistant-reply-4Wvo95-N.js → assistant-reply-CFE-OZMS.js} +1 -1
- package/dist/{automation-sIsmIXH7.js → automation-Zvx_I9Z5.js} +2 -2
- package/dist/{background-compaction-queue-CoWqScCC.js → background-compaction-queue-CHFzrQbS.js} +2 -2
- package/dist/{briefs-CMiotFo9.js → briefs-Cx7mkfSk.js} +4 -4
- package/dist/{catalog-runtime-Cpje_Uic.js → catalog-runtime-dKOVbR7l.js} +1 -1
- package/dist/cli/chat.js +14 -14
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +30 -4
- package/dist/{client-BHgCXeaF.js → client-CMyH5rDz.js} +2 -2
- package/dist/{config-DBdBimZ9.js → config-Dt3CpG17.js} +97 -4
- package/dist/{connections-DjY72_uF.js → connections-CCHPybZP.js} +10 -10
- package/dist/{conversation-DNtcULyX.js → conversation-DdT7SNar.js} +3 -1
- package/dist/{conversation-pending-messages-LlFnr9-m.js → conversation-pending-messages-Dct5pheX.js} +1 -1
- package/dist/{conversation-privacy-DiDh9KE4.js → conversation-privacy-BpHHhEVp.js} +1 -1
- package/dist/{credential-sync-DUrQwccr.js → credential-sync-BBPw8dam.js} +13 -13
- package/dist/{db-hQsoB16L.d.ts → db-D7CCwAo8.d.ts} +1 -1
- package/dist/{executor-CGqJCxgR.js → executor-CyIwHz9r.js} +26 -3
- package/dist/instrumentation.js +37 -13
- package/dist/{logging-DapIaJAi.js → logging-Qo-7xGp1.js} +1 -1
- package/dist/{media-Dq9_svfQ.js → media-Bu9C6lz0.js} +3 -1
- package/dist/{message-BjN5sKad.js → message-DFbtOWqv.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-DVHKrjJP.js → oauth-callback-server-BB1gixWo.js} +2 -2
- package/dist/{projection-ii_OYu6z.js → projection-0UcUeuzn.js} +319 -18
- package/dist/{prompt-DI6KCtwb.js → prompt-CCtaGgbI.js} +1 -1
- package/dist/push-endpoint-CO-nomUd.js +36 -0
- package/dist/{registry-DpjG3yS-.js → registry-DOnPkI8g.js} +1 -1
- package/dist/{resolve-iMW9Dgo2.js → resolve-Di3omymY.js} +3 -3
- package/dist/{result-BrlvfyIj.js → result-NvndYzCb.js} +9 -9
- package/dist/{runner-Bg9mr2pB.js → runner-CnX_dTKw.js} +11 -11
- package/dist/{sandbox-egress-signals-Bd3lb_Wd.js → sandbox-egress-signals-CtxLJmmg.js} +1 -1
- package/dist/{cadence-R7Em4RjE.js → schedule-BTp__wrw.js} +81 -1
- package/dist/{schema-CsqJzkP5.d.ts → schema-B017enNE.d.ts} +61 -1
- package/dist/{schema-BN34Jy-U.js → schema-Bn3miEd_.js} +42 -4
- package/dist/{service-account-Dfl9Pitm.js → service-account-KhZIqXRi.js} +3 -3
- package/dist/{service-account-Bd1348kw.js → service-account-ewDAx4Mx.js} +3 -3
- package/dist/{session-stop-CVEEx_YD.js → session-stop-D_1SysjC.js} +12 -12
- package/dist/{skills-DqUUuf4L.js → skills-CKyotM4g.js} +2 -2
- package/dist/{spawn-e7rQs14T.js → spawn-D5D2MQdz.js} +2 -2
- package/dist/{stop-DtpBUUJq.js → stop-BSKRTaRS.js} +71 -122
- package/dist/{store-nETG4KVg.js → store-G3S0kWSD.js} +4 -4
- package/dist/{store-nu3Xx08K.js → store-ymkEUWe4.js} +3 -3
- package/dist/{task-queue-CYje8WKs.js → task-queue-BcOHzXxe.js} +3 -3
- package/dist/{task-runner-CwegN45x.js → task-runner-B65cDumh.js} +18 -9
- package/dist/{thread-state-BDaMl9yd.js → thread-state-D6rNGQu9.js} +4 -4
- package/dist/{turn-failure-response-CV06tN_R.js → turn-failure-response-BlO4nuDJ.js} +7 -7
- package/dist/{turn-lifecycle-CF2N7ud5.js → turn-lifecycle-BQ8ETk63.js} +1 -1
- package/dist/{turn-session-routing-BIJGJjVh.js → turn-session-routing-D_GXfcAG.js} +9 -9
- package/dist/{validation-DXvxEEjq.js → validation-DJG_wrg2.js} +1 -1
- package/dist/{version-CzEk1KBX.js → version-i1An1eTS.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-C2PztlYX.js → viewer-BlpnzZZa.js} +4 -4
- package/dist/{work-BM_L0Pv9.js → work-BgCW3FDC.js} +11 -11
- package/dist/{worker-2no53G60.js → worker-BJz1mwYt.js} +6 -6
- package/migrations/0081_conversation_pin_position.sql +1 -0
- package/migrations/0082_push_notifications.sql +14 -0
- package/migrations/meta/0081_snapshot.json +4271 -0
- package/migrations/meta/0082_snapshot.json +4373 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +6 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
1
2
|
// src/chat/scheduled-automations/cadence.ts
|
|
2
3
|
const FORMATTERS = /* @__PURE__ */ new Map();
|
|
3
4
|
function getFormatter(timezone) {
|
|
@@ -252,4 +253,83 @@ function getNextRunAtMs(task, scheduledForMs, afterMs = scheduledForMs) {
|
|
|
252
253
|
timezone
|
|
253
254
|
});
|
|
254
255
|
}
|
|
255
|
-
|
|
256
|
+
// src/chat/notifications/schedule.ts
|
|
257
|
+
/**
|
|
258
|
+
* Notification hours for one user.
|
|
259
|
+
*
|
|
260
|
+
* This module imports only zod and the browser-safe cadence helpers, so the
|
|
261
|
+
* dashboard client bundle can use it.
|
|
262
|
+
*/
|
|
263
|
+
const clockTimePattern = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
264
|
+
/** Saved notification hours. Weekdays use 0 for Sunday, like `Date#getDay`. */
|
|
265
|
+
const notificationScheduleSchema = z.object({
|
|
266
|
+
/** When false, Junior sends phone notifications at any time. */
|
|
267
|
+
workingHoursOnly: z.boolean(),
|
|
268
|
+
days: z.array(z.number().int().min(0).max(6)).max(7).refine((days) => new Set(days).size === days.length, { message: "Days must be unique." }),
|
|
269
|
+
/** Local start time, `HH:MM`. */
|
|
270
|
+
start: z.string().regex(clockTimePattern),
|
|
271
|
+
/** Local end time, `HH:MM`. An end before the start crosses midnight. */
|
|
272
|
+
end: z.string().regex(clockTimePattern),
|
|
273
|
+
/** IANA timezone set by the user. Absent means the profile timezone. */
|
|
274
|
+
timezone: z.string().min(1).max(64).refine(isValidTimeZone, { message: "Unknown timezone." }).optional()
|
|
275
|
+
}).strict().refine((schedule) => schedule.start !== schedule.end, {
|
|
276
|
+
message: "Start and end must differ.",
|
|
277
|
+
path: ["end"]
|
|
278
|
+
});
|
|
279
|
+
/** Default hours when a user has not saved a schedule: 09:00–18:00, Mon–Fri. */
|
|
280
|
+
const DEFAULT_NOTIFICATION_SCHEDULE = {
|
|
281
|
+
workingHoursOnly: true,
|
|
282
|
+
days: [
|
|
283
|
+
1,
|
|
284
|
+
2,
|
|
285
|
+
3,
|
|
286
|
+
4,
|
|
287
|
+
5
|
|
288
|
+
],
|
|
289
|
+
start: "09:00",
|
|
290
|
+
end: "18:00"
|
|
291
|
+
};
|
|
292
|
+
function clockMinutes(value) {
|
|
293
|
+
const [hours, minutes] = value.split(":").map(Number);
|
|
294
|
+
return hours * 60 + minutes;
|
|
295
|
+
}
|
|
296
|
+
const weekdayIndex = {
|
|
297
|
+
Sun: 0,
|
|
298
|
+
Mon: 1,
|
|
299
|
+
Tue: 2,
|
|
300
|
+
Wed: 3,
|
|
301
|
+
Thu: 4,
|
|
302
|
+
Fri: 5,
|
|
303
|
+
Sat: 6
|
|
304
|
+
};
|
|
305
|
+
function localWeekdayAndMinutes(nowMs, timezone) {
|
|
306
|
+
const parts = new Intl.DateTimeFormat("en-US", {
|
|
307
|
+
hour: "2-digit",
|
|
308
|
+
hourCycle: "h23",
|
|
309
|
+
minute: "2-digit",
|
|
310
|
+
timeZone: timezone,
|
|
311
|
+
weekday: "short"
|
|
312
|
+
}).formatToParts(new Date(nowMs));
|
|
313
|
+
const value = (type) => parts.find((part) => part.type === type)?.value ?? "";
|
|
314
|
+
const weekday = weekdayIndex[value("weekday")];
|
|
315
|
+
if (weekday === void 0) throw new Error(`Could not read the weekday for timezone ${timezone}`);
|
|
316
|
+
return {
|
|
317
|
+
minutes: Number(value("hour")) % 24 * 60 + Number(value("minute")),
|
|
318
|
+
weekday
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Return whether a notification may be sent now. A window that crosses
|
|
323
|
+
* midnight belongs to the day on which it starts.
|
|
324
|
+
*/
|
|
325
|
+
function isWithinNotificationSchedule(schedule, timezone, nowMs) {
|
|
326
|
+
if (!schedule.workingHoursOnly) return true;
|
|
327
|
+
const { minutes, weekday } = localWeekdayAndMinutes(nowMs, timezone);
|
|
328
|
+
const start = clockMinutes(schedule.start);
|
|
329
|
+
const end = clockMinutes(schedule.end);
|
|
330
|
+
if (start < end) return schedule.days.includes(weekday) && minutes >= start && minutes < end;
|
|
331
|
+
if (minutes >= start) return schedule.days.includes(weekday);
|
|
332
|
+
if (minutes < end) return schedule.days.includes((weekday + 6) % 7);
|
|
333
|
+
return false;
|
|
334
|
+
}
|
|
335
|
+
export { getNextRunAtMs as a, resolveLocalScheduleAtMs as c, getFirstRunAtMs as i, isWithinNotificationSchedule as n, getZonedDateTimeParts as o, notificationScheduleSchema as r, isValidTimeZone as s, DEFAULT_NOTIFICATION_SCHEDULE as t };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { ConversationAnnotation, OwnedObjectAnnotation, OwnedObjectAnnotation as OwnedObjectAnnotation$1 } from "@sentry/junior-plugin-api";
|
|
3
3
|
declare const INPUT_IMAGE_TYPES: readonly ["image/png", "image/jpeg", "image/gif", "image/webp"];
|
|
4
|
+
/** Video types that browsers play in a `<video>` element. */
|
|
5
|
+
declare const INLINE_VIDEO_TYPES: readonly ["video/mp4", "video/webm"];
|
|
4
6
|
/** Bound JSON image input below the hosting platform's request size limit. */
|
|
5
7
|
declare const MAX_INPUT_IMAGE_BYTES: number;
|
|
6
8
|
declare const MAX_INPUT_IMAGES = 3;
|
|
@@ -693,6 +695,7 @@ declare const conversationSummaryReportSchema: z.ZodObject<{
|
|
|
693
695
|
}, z.core.$strict>>>;
|
|
694
696
|
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
695
697
|
pinnedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
698
|
+
pinPosition: z.ZodOptional<z.ZodNumber>;
|
|
696
699
|
channel: z.ZodOptional<z.ZodString>;
|
|
697
700
|
channelName: z.ZodOptional<z.ZodString>;
|
|
698
701
|
channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1780,6 +1783,7 @@ declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
1780
1783
|
}, z.core.$strict>>>;
|
|
1781
1784
|
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1782
1785
|
pinnedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1786
|
+
pinPosition: z.ZodOptional<z.ZodNumber>;
|
|
1783
1787
|
channel: z.ZodOptional<z.ZodString>;
|
|
1784
1788
|
channelName: z.ZodOptional<z.ZodString>;
|
|
1785
1789
|
channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2709,6 +2713,7 @@ declare const conversationFeedSchema: z.ZodObject<{
|
|
|
2709
2713
|
}, z.core.$strict>>>;
|
|
2710
2714
|
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2711
2715
|
pinnedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2716
|
+
pinPosition: z.ZodOptional<z.ZodNumber>;
|
|
2712
2717
|
channel: z.ZodOptional<z.ZodString>;
|
|
2713
2718
|
channelName: z.ZodOptional<z.ZodString>;
|
|
2714
2719
|
channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3066,6 +3071,7 @@ declare const conversationDetailWithMailboxReportSchema: z.ZodObject<{
|
|
|
3066
3071
|
}, z.core.$strict>>>;
|
|
3067
3072
|
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3068
3073
|
pinnedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3074
|
+
pinPosition: z.ZodOptional<z.ZodNumber>;
|
|
3069
3075
|
channel: z.ZodOptional<z.ZodString>;
|
|
3070
3076
|
channelName: z.ZodOptional<z.ZodString>;
|
|
3071
3077
|
channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -4272,6 +4278,19 @@ declare const pinConversationResponseSchema: z.ZodObject<{
|
|
|
4272
4278
|
}, z.core.$strict>;
|
|
4273
4279
|
type PinConversationBody = z.infer<typeof pinConversationBodySchema>;
|
|
4274
4280
|
type PinConversationResponse = z.infer<typeof pinConversationResponseSchema>;
|
|
4281
|
+
/**
|
|
4282
|
+
* The viewer's full Pinned order, first to last. Each pin takes its index as
|
|
4283
|
+
* its new place.
|
|
4284
|
+
*/
|
|
4285
|
+
declare const reorderPinnedConversationsBodySchema: z.ZodObject<{
|
|
4286
|
+
conversationIds: z.ZodArray<z.ZodString>;
|
|
4287
|
+
}, z.core.$strict>;
|
|
4288
|
+
/** The pinned Conversations that got a new place, in order. */
|
|
4289
|
+
declare const reorderPinnedConversationsResponseSchema: z.ZodObject<{
|
|
4290
|
+
conversationIds: z.ZodArray<z.ZodString>;
|
|
4291
|
+
}, z.core.$strict>;
|
|
4292
|
+
type ReorderPinnedConversationsBody = z.infer<typeof reorderPinnedConversationsBodySchema>;
|
|
4293
|
+
type ReorderPinnedConversationsResponse = z.infer<typeof reorderPinnedConversationsResponseSchema>;
|
|
4275
4294
|
/**
|
|
4276
4295
|
* One direct child agent of a Conversation, from agent invocation records.
|
|
4277
4296
|
*
|
|
@@ -4761,6 +4780,7 @@ declare const actorProfileReportSchema: z.ZodObject<{
|
|
|
4761
4780
|
}, z.core.$strict>>>;
|
|
4762
4781
|
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4763
4782
|
pinnedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4783
|
+
pinPosition: z.ZodOptional<z.ZodNumber>;
|
|
4764
4784
|
channel: z.ZodOptional<z.ZodString>;
|
|
4765
4785
|
channelName: z.ZodOptional<z.ZodString>;
|
|
4766
4786
|
channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -5185,6 +5205,7 @@ declare const locationDetailReportSchema: z.ZodObject<{
|
|
|
5185
5205
|
}, z.core.$strict>>>;
|
|
5186
5206
|
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5187
5207
|
pinnedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5208
|
+
pinPosition: z.ZodOptional<z.ZodNumber>;
|
|
5188
5209
|
channel: z.ZodOptional<z.ZodString>;
|
|
5189
5210
|
channelName: z.ZodOptional<z.ZodString>;
|
|
5190
5211
|
channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -5349,6 +5370,45 @@ declare const startConnectionResponseSchema: z.ZodObject<{
|
|
|
5349
5370
|
declare const disconnectConnectionResponseSchema: z.ZodObject<{
|
|
5350
5371
|
disconnected: z.ZodLiteral<true>;
|
|
5351
5372
|
}, z.core.$strict>;
|
|
5373
|
+
/** Saved notification hours. Weekdays use 0 for Sunday, like `Date#getDay`. */
|
|
5374
|
+
declare const notificationScheduleSchema: z.ZodObject<{
|
|
5375
|
+
workingHoursOnly: z.ZodBoolean;
|
|
5376
|
+
days: z.ZodArray<z.ZodNumber>;
|
|
5377
|
+
start: z.ZodString;
|
|
5378
|
+
end: z.ZodString;
|
|
5379
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
5380
|
+
}, z.core.$strict>;
|
|
5381
|
+
type NotificationSchedule = z.output<typeof notificationScheduleSchema>;
|
|
5382
|
+
/** Default hours when a user has not saved a schedule: 09:00–18:00, Mon–Fri. */
|
|
5383
|
+
declare const DEFAULT_NOTIFICATION_SCHEDULE: NotificationSchedule;
|
|
5384
|
+
/**
|
|
5385
|
+
* Return whether a notification may be sent now. A window that crosses
|
|
5386
|
+
* midnight belongs to the day on which it starts.
|
|
5387
|
+
*/
|
|
5388
|
+
declare function isWithinNotificationSchedule(schedule: NotificationSchedule, timezone: string, nowMs: number): boolean;
|
|
5389
|
+
/** The viewer's phone notification settings. */
|
|
5390
|
+
declare const notificationSettingsSchema: z.ZodObject<{
|
|
5391
|
+
publicKey: z.ZodOptional<z.ZodString>;
|
|
5392
|
+
schedule: z.ZodObject<{
|
|
5393
|
+
workingHoursOnly: z.ZodBoolean;
|
|
5394
|
+
days: z.ZodArray<z.ZodNumber>;
|
|
5395
|
+
start: z.ZodString;
|
|
5396
|
+
end: z.ZodString;
|
|
5397
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
5398
|
+
}, z.core.$strict>;
|
|
5399
|
+
timezone: z.ZodString;
|
|
5400
|
+
timezoneSource: z.ZodEnum<{
|
|
5401
|
+
default: "default";
|
|
5402
|
+
manual: "manual";
|
|
5403
|
+
saved: "saved";
|
|
5404
|
+
slack: "slack";
|
|
5405
|
+
}>;
|
|
5406
|
+
deviceCount: z.ZodNumber;
|
|
5407
|
+
}, z.core.$strict>;
|
|
5408
|
+
type NotificationSettings = z.output<typeof notificationSettingsSchema>;
|
|
5409
|
+
declare const testNotificationResponseSchema: z.ZodObject<{
|
|
5410
|
+
delivered: z.ZodNumber;
|
|
5411
|
+
}, z.core.$strict>;
|
|
5352
5412
|
declare const serviceAccountSchema: z.ZodObject<{
|
|
5353
5413
|
provider: z.ZodString;
|
|
5354
5414
|
displayName: z.ZodString;
|
|
@@ -7374,4 +7434,4 @@ declare const reviewItemActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7374
7434
|
}, z.core.$strict>;
|
|
7375
7435
|
}, z.core.$strict>], "action">;
|
|
7376
7436
|
type ReviewItemActionBody = z.output<typeof reviewItemActionSchema>;
|
|
7377
|
-
export { automationExecutionSchema as $,
|
|
7437
|
+
export { automationExecutionSchema as $, GuardianMetricDay as $n, conversationAuxiliaryCostsSchema as $r, startConnectionResponseSchema as $t, StatReport as A, codeRepositorySummarySchema as Ai, ConversationChildAgent as An, ConversationAgentTreeNode as Ar, PersonalTokenMetadata as At, AutomationListQuery as B, UserInputAnswer as Bi, reorderPinnedConversationsBodySchema as Bn, ConversationReportEventData as Br, serviceAccountSchema as Bt, pluginPackageContentItemReportSchema as C, codeActivityDaySchema as Ci, actorProfileReportSchema as Cn, conversationUnchangedDetailWithMailboxSchema as Cr, workspaceBodySchema as Ct, runtimeInfoReportSchema as D, codePersonReportSchema as Di, ConversationWatchesReport as Dn, ActorIdentity as Dr, workspaceSchema as Dt, pluginsSchema as E, codeOverviewReportSchema as Ei, ConversationWatch as En, AcceptedConversationMessage as Er, workspaceRepoSchema as Et, AutomationExecution as F, MessageCard as Fi, PinConversationResponse as Fn, ConversationEventPage as Fr, personalTokenParamsSchema as Ft, AutomationSummary as G, normalizeUserInputAnswer as Gi, conversationCatchUpSchema as Gn, ConversationSurface as Gr, DEFAULT_NOTIFICATION_SCHEDULE as Gt, AutomationRunList as H, UserInputRequest as Hi, ConversationCatchUp as Hn, ConversationReportStatus as Hr, NotificationSettings as Ht, AutomationExecutionDay as I, messageCardText as Ii, ReorderPinnedConversationsBody as In, ConversationFeed as Ir, revokePersonalTokenResponseSchema as It, ListedAutomationVersion as J, MAX_INPUT_IMAGES as Ji, StopConversationTurnResponse as Jn, ConversationUsage as Jr, notificationScheduleSchema as Jt, AutomationUpdate as K, webMessageId as Ki, ConversationReadPosition as Kn, ConversationTurnFailureCode as Kr, NotificationSchedule as Kt, AutomationExecutionList as L, resolveMessageCards as Li, ReorderPinnedConversationsResponse as Ln, ConversationModelUsage as Lr, disconnectServiceAccountResponseSchema as Lt, statSchema as M, conversationChildAgentTotalsSchema as Mi, conversationChildAgentSchema as Mn, ConversationCost as Mr, createdPersonalTokenSchema as Mt, statsReportSchema as N, DailyConversationActivity as Ni, conversationChildAgentsReportSchema as Nn, ConversationDetailReport as Nr, personalTokenListSchema as Nt, skillReportSchema as O, codeRepositoryParamsSchema as Oi, conversationWatchSchema as On, CONVERSATION_DETAIL_VERSION_HEADER as Or, USER_CUSTOMIZATION_MAX_CHARS as Ot, AutomationEdit as P, dailyConversationActivitySchema as Pi, PinConversationBody as Pn, ConversationEventHistory as Pr, personalTokenMetadataSchema as Pt, automationExecutionListSchema as Q, INPUT_IMAGE_TYPES as Qi, ConversationStatsReport as Qn, conversationActivityPreviewSchema as Qr, disconnectConnectionResponseSchema as Qt, AutomationExecutionStatusDay as R, AutomationCard as Ri, pinConversationBodySchema as Rn, ConversationParams as Rr, serviceAccountListSchema as Rt, pluginOperationalReportSchema as S, CodeRepositorySummary as Si, actorDirectoryReportSchema as Sn, conversationPendingMessagesReportSchema as Sr, deleteWorkspaceResponseSchema as St, pluginSchema as T, codeChangeSummarySchema as Ti, personalSpendReportSchema as Tn, steerConversationPendingMessagesResponseSchema as Tr, workspaceParamsSchema as Tt, AutomationRunWindows as U, buttonUserInputField as Ui, ConversationCatchUpBody as Un, ConversationSourceTask as Ur, notificationSettingsSchema as Ut, AutomationRun as V, UserInputField as Vi, reorderPinnedConversationsResponseSchema as Vn, ConversationReportMessageEvent as Vr, startServiceAccountSignInResponseSchema as Vt, AutomationScheduleIntent as W, isEmptyUserInputAnswer as Wi, conversationCatchUpBodySchema as Wn, ConversationSummaryReport as Wr, testNotificationResponseSchema as Wt, automationEditSchema as X, MessageAttachment as Xi, ConversationMetricDay as Xn, CreateConversationMessageBody as Xr, connectionParamsSchema as Xt, automationEditErrorSchema as Y, MAX_INPUT_IMAGE_BYTES as Yi, stopConversationTurnResponseSchema as Yn, CreateConversationBody as Yr, connectionListSchema as Yt, automationEventCatalogSchema as Z, INLINE_VIDEO_TYPES as Zi, ConversationStatsItem as Zn, acceptedConversationMessageSchema as Zr, connectionSchema as Zt, RuntimeInfoReport as _, CodeActivityDay as _i, ActorTotalsReport as _n, cancelConversationPendingMessagesResponseSchema as _r, scheduledAutomationSummarySchema as _t, reviewItemCountSchema as a, conversationFeedQuerySchema as ai, LocationDirectoryReport as an, archiveConversationBodySchema as ar, automationRunListSchema as at, healthReportSchema as b, CodePersonReport as bi, PersonParams as bn, conversationPendingMessageDeliverySchema as br, WorkspaceReport as bt, reviewItemWaitingConversationsSchema as c, conversationReportEventDataSchema as ci, locationActivityDayReportSchema as cn, conversationAutoArchiveSchema as cr, automationScheduleIntentSchema as ct, Plugin as d, createConversationBodySchema as di, locationParamsSchema as dn, ConversationPendingMessage as dr, automationUpdateSchema as dt, conversationDetailQuerySchema as ei, ApiError as en, GuardianStats as er, automationExecutionStatusDaySchema as et, PluginOperationalReport as f, createConversationMessageBodySchema as fi, ActorActivityDayReport as fn, ConversationPendingMessageDelivery as fr, automationVersionActivateSchema as ft, Plugins as g, conversationTurnFailureReasonSchema as gi, ActorSummaryReport as gn, cancelConversationPendingMessagesBodySchema as gr, eventAutomationSummarySchema as gt, PluginPackageContentReport as h, conversationTurnFailureCodeSchema as hi, ActorProfileReport as hn, SteerConversationPendingMessagesResponse as hr, automationVersionSchema as ht, reviewItemActionSchema as i, conversationEventsQuerySchema as ii, LocationDetailReport as in, ConversationAutoArchive as ir, automationParamsSchema as it, StatsReport as j, ConversationChildAgentTotals as ji, ConversationChildAgentsReport as jn, ConversationAuxiliaryCosts as jr, createPersonalTokenBodySchema as jt, skillReportsSchema as k, codeRepositoryReportSchema as ki, conversationWatchesReportSchema as kn, ConversationActivityPreview as kr, userCustomizationSchema as kt, ReviewItemChangeRecord as l, conversationReportEventSchema as li, locationDetailReportSchema as ln, CancelConversationPendingMessagesBody as lr, automationSchedulePreviewSchema as lt, PluginPackageContentItemReport as m, forkConversationResponseSchema as mi, ActorDirectoryWindows as mn, SteerConversationPendingMessagesBody as mr, automationVersionParamsSchema as mt, ReviewItemActionBody as n, conversationEventHistorySchema as ni, LocationActivityDayReport as nn, ArchiveConversationBody as nr, automationListQuerySchema as nt, reviewItemListSchema as o, conversationFeedSchema as oi, LocationParams as on, archiveConversationResponseSchema as or, automationRunSchema as ot, PluginOperationalReportFeed as p, forkConversationBodySchema as pi, ActorDirectoryReport as pn, ConversationPendingMessagesReport as pr, automationVersionListSchema as pt, AutomationVersionList as q, InputImage as qi, conversationReadPositionSchema as qn, ConversationTurnFailureReason as qr, isWithinNotificationSchedule as qt, ReviewItemPayload as r, conversationEventPageSchema as ri, LocationActorSummaryReport as rn, ArchiveConversationResponse as rr, automationListSchema as rt, reviewItemSchema as s, conversationParamsSchema as si, LocationSummaryReport as sn, archiveDoneConversationsResponseSchema as sr, automationRunWindowsSchema as st, OwnedObjectAnnotation$1 as t, conversationDetailReportSchema as ti, apiErrorSchema as tn, conversationStatsReportSchema as tr, automationExecutionStatusSchema as tt, HealthReport as u, conversationSummaryReportSchema as ui, locationDirectoryReportSchema as un, CancelConversationPendingMessagesResponse as ur, automationSummarySchema as ut, SkillReport as v, CodeChangeSummaryReport as vi, ActorWindowMetrics as vn, conversationDetailWithMailboxReportSchema as vr, BaselineSnapshotReport as vt, pluginPackageContentReportSchema as w, codeChangeSummaryReportSchema as wi, personParamsSchema as wn, steerConversationPendingMessagesBodySchema as wr, workspaceListSchema as wt, pluginOperationalReportFeedSchema as x, CodeRepositoryReport as xi, PersonalSpendReport as xn, conversationPendingMessageSchema as xr, baselineSnapshotSchema as xt, SkillReports as y, CodeOverviewReport as yi, PeopleActivityDayReport as yn, conversationPendingAuthorizationSchema as yr, WorkspaceListReport as yt, AutomationList as z, USER_INPUT_NOTE as zi, pinConversationResponseSchema as zn, ConversationReportEvent as zr, serviceAccountParamsSchema as zt };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as notificationScheduleSchema } from "./schedule-BTp__wrw.js";
|
|
2
|
+
import { E as conversationChildAgentTotalsSchema, o as conversationAuxiliaryCostsSchema, r as actorIdentitySchema, x as conversationUsageSchema, y as conversationSummaryReportSchema } from "./conversation-DdT7SNar.js";
|
|
2
3
|
import { C as AGENT_INVOCATION_STATUSES, i as fillUtcHours, r as fillUtcDays, s as sumUtcHoursIntoSixHours, y as userInputRequestSchema } from "./reporting-window-B-QP9zX1.js";
|
|
3
|
-
import "./automation-
|
|
4
|
-
import "./conversation-pending-messages-
|
|
4
|
+
import "./automation-Zvx_I9Z5.js";
|
|
5
|
+
import "./conversation-pending-messages-Dct5pheX.js";
|
|
6
|
+
import { t as isPushServiceEndpoint } from "./push-endpoint-CO-nomUd.js";
|
|
5
7
|
import * as z from "zod";
|
|
6
8
|
import { codeChangeStateSchema, eventMatchSchema } from "@sentry/junior-plugin-api";
|
|
7
9
|
// src/api/schema/conversation-catch-up.ts
|
|
@@ -24,6 +26,13 @@ const conversationCatchUpSchema = z.object({
|
|
|
24
26
|
const pinConversationBodySchema = z.object({ pinned: z.boolean() }).strict();
|
|
25
27
|
/** The viewer's pin time after the change, or null when unpinned. */
|
|
26
28
|
const pinConversationResponseSchema = z.object({ pinnedAt: z.string().datetime().nullable() }).strict();
|
|
29
|
+
/**
|
|
30
|
+
* The viewer's full Pinned order, first to last. Each pin takes its index as
|
|
31
|
+
* its new place.
|
|
32
|
+
*/
|
|
33
|
+
const reorderPinnedConversationsBodySchema = z.object({ conversationIds: z.array(z.string().min(1)).min(1).max(500).refine((ids) => new Set(ids).size === ids.length, { message: "Each Conversation can appear once." }) }).strict();
|
|
34
|
+
/** The pinned Conversations that got a new place, in order. */
|
|
35
|
+
const reorderPinnedConversationsResponseSchema = z.object({ conversationIds: z.array(z.string()) }).strict();
|
|
27
36
|
// src/api/schema/conversation-archive.ts
|
|
28
37
|
const archiveConversationBodySchema = z.object({
|
|
29
38
|
archived: z.boolean(),
|
|
@@ -295,6 +304,35 @@ const connectionListSchema = z.object({ connections: z.array(connectionSchema) }
|
|
|
295
304
|
const connectionParamsSchema = z.object({ provider: z.string().regex(/^[a-z][a-z0-9-]*$/).max(64) }).strict();
|
|
296
305
|
const startConnectionResponseSchema = z.object({ authorizationUrl: z.string().url() }).strict();
|
|
297
306
|
const disconnectConnectionResponseSchema = z.object({ disconnected: z.literal(true) }).strict();
|
|
307
|
+
// src/api/schema/notification.ts
|
|
308
|
+
const notificationTimezoneSourceSchema = z.enum([
|
|
309
|
+
"manual",
|
|
310
|
+
"slack",
|
|
311
|
+
"saved",
|
|
312
|
+
"default"
|
|
313
|
+
]);
|
|
314
|
+
/** The viewer's phone notification settings. */
|
|
315
|
+
const notificationSettingsSchema = z.object({
|
|
316
|
+
/** Server VAPID public key. Absent when Web Push is not configured. */
|
|
317
|
+
publicKey: z.string().min(1).optional(),
|
|
318
|
+
schedule: notificationScheduleSchema,
|
|
319
|
+
/** Timezone that Junior uses for the schedule now. */
|
|
320
|
+
timezone: z.string().min(1),
|
|
321
|
+
timezoneSource: notificationTimezoneSourceSchema,
|
|
322
|
+
/** Number of browsers that receive the viewer's notifications. */
|
|
323
|
+
deviceCount: z.number().int().nonnegative()
|
|
324
|
+
}).strict();
|
|
325
|
+
/** `PushSubscription#toJSON()` from the browser. */
|
|
326
|
+
const pushSubscriptionBodySchema = z.object({
|
|
327
|
+
endpoint: z.string().max(2048).refine(isPushServiceEndpoint, "Unknown push service."),
|
|
328
|
+
expirationTime: z.number().nullable().optional(),
|
|
329
|
+
keys: z.object({
|
|
330
|
+
auth: z.string().min(1).max(256),
|
|
331
|
+
p256dh: z.string().min(1).max(256)
|
|
332
|
+
}).strict()
|
|
333
|
+
}).strict();
|
|
334
|
+
const pushSubscriptionDeleteBodySchema = z.object({ endpoint: z.string().url().max(2048) }).strict();
|
|
335
|
+
const testNotificationResponseSchema = z.object({ delivered: z.number().int().nonnegative() }).strict();
|
|
298
336
|
// src/api/activity.ts
|
|
299
337
|
const dailyConversationActivitySchema = z.object({
|
|
300
338
|
active: z.number(),
|
|
@@ -672,4 +710,4 @@ const statsReportSchema = z.object({
|
|
|
672
710
|
windowEnd: z.string(),
|
|
673
711
|
windowStart: z.string()
|
|
674
712
|
}).strict();
|
|
675
|
-
export {
|
|
713
|
+
export { codeOverviewReportSchema as $, avatarParamsSchema as A, dailyConversationActivitySchema as B, createdPersonalTokenSchema as C, revokePersonalTokenResponseSchema as D, personalTokenParamsSchema as E, locationDirectoryReportSchema as F, connectionListSchema as G, pushSubscriptionBodySchema as H, locationParamsSchema as I, disconnectConnectionResponseSchema as J, connectionParamsSchema as K, activityDays as L, personalSpendReportSchema as M, locationActivityDayReportSchema as N, actorDirectoryReportSchema as O, locationDetailReportSchema as P, codeChangeSummarySchema as Q, activityHours as R, createPersonalTokenBodySchema as S, personalTokenMetadataSchema as T, pushSubscriptionDeleteBodySchema as U, notificationSettingsSchema as V, testNotificationResponseSchema as W, codeActivityDaySchema as X, startConnectionResponseSchema as Y, codeChangeSummaryReportSchema as Z, disconnectServiceAccountResponseSchema as _, reorderPinnedConversationsResponseSchema as _t, workspaceBodySchema as a, conversationWatchesReportSchema as at, serviceAccountSchema as b, workspaceRepoSchema as c, stopConversationTurnResponseSchema as ct, reviewItemCountSchema as d, archiveConversationResponseSchema as dt, codePersonReportSchema as et, reviewItemListQuerySchema as f, archiveDoneConversationsResponseSchema as ft, reviewItemWaitingConversationsSchema as g, reorderPinnedConversationsBodySchema as gt, reviewItemSchema as h, pinConversationResponseSchema as ht, deleteWorkspaceResponseSchema as i, conversationWatchSchema as it, personParamsSchema as j, actorProfileReportSchema as k, workspaceSchema as l, conversationStatsReportSchema as lt, reviewItemParamsSchema as m, pinConversationBodySchema as mt, statsReportSchema as n, codeRepositoryReportSchema as nt, workspaceListSchema as o, conversationChildAgentSchema as ot, reviewItemListSchema as p, conversationAutoArchiveSchema as pt, connectionSchema as q, baselineSnapshotSchema as r, codeRepositorySummarySchema as rt, workspaceParamsSchema as s, conversationChildAgentsReportSchema as st, statSchema as t, codeRepositoryParamsSchema as tt, reviewItemActionSchema as u, archiveConversationBodySchema as ut, serviceAccountListSchema as v, conversationCatchUpBodySchema as vt, personalTokenListSchema as w, startServiceAccountSignInResponseSchema as x, serviceAccountParamsSchema as y, conversationCatchUpSchema as yt, activitySixHours as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { W as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-
|
|
2
|
-
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-
|
|
1
|
+
import { W as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-Qo-7xGp1.js";
|
|
2
|
+
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-DOnPkI8g.js";
|
|
3
3
|
import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS } from "./locks-D-0h111u.js";
|
|
4
|
-
import { r as getStateAdapter } from "./adapter-
|
|
4
|
+
import { r as getStateAdapter } from "./adapter-CW5UW7vL.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
import { UnauthorizedError, auth } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
-
import { t as disconnectStateAdapter } from "./adapter-
|
|
3
|
-
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-dKOVbR7l.js";
|
|
2
|
+
import { t as disconnectStateAdapter } from "./adapter-CW5UW7vL.js";
|
|
3
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-KhZIqXRi.js";
|
|
4
4
|
import { CLI_USAGE } from "./cli/run.js";
|
|
5
5
|
import { createServer } from "node:http";
|
|
6
6
|
// src/cli/service-account.ts
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { h as logWarn, m as logInfo, p as logException } from "./logging-
|
|
5
|
-
import { C as getSqlExecutor, F as SYSTEM_IDENTITY_ID, J as nextDetailVersion, x as getConversationStore } from "./viewer-
|
|
6
|
-
import {
|
|
7
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
8
|
-
import { r as getStateAdapter } from "./adapter-
|
|
9
|
-
import { R as readMessageAttachments } from "./conversation-
|
|
10
|
-
import { r as EVENT_AUTHOR_ID } from "./prompt-
|
|
11
|
-
import { a as QUIET_MARKER, r as sanitizeAssistantText } from "./assistant-reply-
|
|
12
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
13
|
-
import { dt as CORE_EVENT_NAMESPACE, ht as eventGuidance, mt as eventCatalogEntry } from "./turn-session-routing-
|
|
2
|
+
import { $r as ToolInputError, Di as formatSlackLink, Ei as escapeSlackMrkdwnText, Gr as verifyTimerWatchCredentialSubject, Jr as getDashboardObjectIconLink, Kr as JUNIOR_THREAD_STATE_TTL_MS, Ln as getPlugins, N as normalizeConversationText, Nn as getPluginSlackConversationLink, Oi as normalizeSlackReplyMarkdown, Ri as postSlackMessage, Zt as isAssistantMessage, en as isToolResultError, nn as normalizeToolNameFromResult, qr as getDashboardConversationLink, so as buildSentryConversationUrl, tn as isToolResultMessage } from "./projection-0UcUeuzn.js";
|
|
3
|
+
import { n as botConfig } from "./config-Dt3CpG17.js";
|
|
4
|
+
import { h as logWarn, m as logInfo, p as logException } from "./logging-Qo-7xGp1.js";
|
|
5
|
+
import { C as getSqlExecutor, F as SYSTEM_IDENTITY_ID, J as nextDetailVersion, x as getConversationStore } from "./viewer-BlpnzZZa.js";
|
|
6
|
+
import { j as juniorConversations } from "./executor-CyIwHz9r.js";
|
|
7
|
+
import { h as credentialSubjectSchema } from "./registry-DOnPkI8g.js";
|
|
8
|
+
import { r as getStateAdapter } from "./adapter-CW5UW7vL.js";
|
|
9
|
+
import { R as readMessageAttachments } from "./conversation-DdT7SNar.js";
|
|
10
|
+
import { r as EVENT_AUTHOR_ID } from "./prompt-CCtaGgbI.js";
|
|
11
|
+
import { a as QUIET_MARKER, r as sanitizeAssistantText } from "./assistant-reply-CFE-OZMS.js";
|
|
12
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-ymkEUWe4.js";
|
|
13
|
+
import { dt as CORE_EVENT_NAMESPACE, ht as eventGuidance, mt as eventCatalogEntry } from "./turn-session-routing-D_GXfcAG.js";
|
|
14
14
|
import * as z from "zod";
|
|
15
15
|
import { eq, inArray } from "drizzle-orm";
|
|
16
16
|
import { agentEventKeys, eventMatchFieldsSchema, objectFactFields, objectPresentation, objectTypeSchema } from "@sentry/junior-plugin-api";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { h as logWarn } from "./logging-
|
|
2
|
+
import { h as logWarn } from "./logging-Qo-7xGp1.js";
|
|
3
3
|
import { s as skillRoots } from "./package-discovery-DJhGdS4c.js";
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-dKOVbR7l.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-
|
|
3
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-Cqr21pOU.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-BgCW3FDC.js";
|
|
4
4
|
// src/chat/agent-invocations/spawn.ts
|
|
5
5
|
var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
|
|
6
6
|
/** Bind a Run's Actor and credentials to new Agent invocations. */
|