@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.
Files changed (80) hide show
  1. package/dist/{adapter-dE2BiWP_.js → adapter-BtfBHVM5.js} +1 -1
  2. package/dist/{admin-CkPaAYuZ.js → admin-DzAKbZsm.js} +1 -1
  3. package/dist/{agent-invocations-C1RNOCs8.js → agent-invocations-Crs3XHhg.js} +6 -1
  4. package/dist/{agent-runner-bE7aH7ew.js → agent-runner-BsYAbniN.js} +394 -244
  5. package/dist/api/schema.d.ts +2 -2
  6. package/dist/api/schema.js +4 -4
  7. package/dist/api.d.ts +13 -2
  8. package/dist/api.js +186 -68
  9. package/dist/{app-CgkquhZ8.d.ts → app-BjEQwNVP.d.ts} +11 -3
  10. package/dist/app.d.ts +2 -2
  11. package/dist/app.js +227 -112
  12. package/dist/{assistant-reply-CjRU9Z59.js → assistant-reply-NebRGG4G.js} +1 -1
  13. package/dist/{automation-BGrd03QO.js → automation-Cql9h2vO.js} +42 -13
  14. package/dist/{background-compaction-queue-BYuOt3qK.js → background-compaction-queue-hh18yCeU.js} +2 -2
  15. package/dist/{briefs-6xUvmGos.js → briefs-BBo0Eimi.js} +4 -4
  16. package/dist/{catalog-runtime-DcJ5NHDW.js → catalog-runtime-DE-F4Awo.js} +1 -1
  17. package/dist/cli/chat.d.ts +1 -1
  18. package/dist/cli/chat.js +14 -14
  19. package/dist/cli/check.js +3 -3
  20. package/dist/cli/main.js +3 -3
  21. package/dist/cli/plugins.d.ts +1 -1
  22. package/dist/cli/plugins.js +4 -4
  23. package/dist/cli/snapshot-create.js +4 -4
  24. package/dist/cli/upgrade.d.ts +2 -2
  25. package/dist/cli/upgrade.js +3 -3
  26. package/dist/{client-gnKpkpqP.js → client-DZ8HTnYH.js} +2 -2
  27. package/dist/{config-D0GKc9sC.js → config-D5uUtrCP.js} +2 -2
  28. package/dist/{connections-DLqP5Bp1.js → connections-Do24CGP5.js} +14 -14
  29. package/dist/{conversation-BjTo9ZFL.js → conversation-SsASlWL7.js} +35 -12
  30. package/dist/{conversation-privacy-BCXFshP9.js → conversation-privacy-VuylvlKr.js} +1 -1
  31. package/dist/{credential-sync-BjihXFF2.js → credential-sync-BGQK3pOa.js} +13 -13
  32. package/dist/{db-BMZhoYKj.d.ts → db-DEiwO5Sh.d.ts} +1 -1
  33. package/dist/{executor-j8VMt-To.js → executor-hPfFTH0C.js} +13 -5
  34. package/dist/instrumentation.d.ts +14 -0
  35. package/dist/instrumentation.js +29 -6
  36. package/dist/{logging-CFHIO4Vs.js → logging-cI3T1dNc.js} +4 -2
  37. package/dist/{message-DH0cqFRS.js → message-DBwsAl7O.js} +9 -9
  38. package/dist/nitro.d.ts +2 -2
  39. package/dist/nitro.js +7 -3
  40. package/dist/{oauth-callback-server-BgU4EZsJ.js → oauth-callback-server-DXrnbplb.js} +2 -2
  41. package/dist/{plugins-B_0Cr0MO.d.ts → plugins-DtmjkTza.d.ts} +1 -0
  42. package/dist/{projection-CTvLSwcm.js → projection-7EFIqzuj.js} +4108 -3898
  43. package/dist/{prompt-JEWUUpLW.js → prompt-oRfGsxd3.js} +1 -1
  44. package/dist/{registry-OsyWR4GO.js → registry-Bzefs7kT.js} +24 -8
  45. package/dist/{resolve-DCrKjmVP.js → resolve-CuiEY_2u.js} +3 -3
  46. package/dist/{result-Btdt5bSl.js → result-DrcUtFaD.js} +9 -9
  47. package/dist/{runner-C1AwS93W.js → runner-CDE4CZ52.js} +12 -12
  48. package/dist/{sandbox-egress-signals-C-5i7Zxm.js → sandbox-egress-signals-0tcmGd13.js} +1 -1
  49. package/dist/{schema-DfdHlBnb.d.ts → schema-B6N2nc6v.d.ts} +108 -15
  50. package/dist/{schema-CX9XGKCm.js → schema-Dzi3lkdP.js} +25 -8
  51. package/dist/{service-account-DZX1KlQl.js → service-account-BOz9pqOE.js} +3 -3
  52. package/dist/{service-account-CQIW6At4.js → service-account-DIyz_9Uh.js} +3 -3
  53. package/dist/{session-stop-DjIyORJw.js → session-stop-0juF_BP0.js} +159 -55
  54. package/dist/{skills-BEfAAT6p.js → skills-CU5Is147.js} +2 -2
  55. package/dist/{spawn-Dgj4xxvO.js → spawn-6C9jHH4b.js} +2 -2
  56. package/dist/{stop-DomyNvuv.js → stop-6FVG1c-r.js} +487 -203
  57. package/dist/{store-Dp3RMEQd.js → store-DKs1WwdB.js} +3 -3
  58. package/dist/{store-B7Z6zIc7.js → store-DtHZviJ1.js} +11 -9
  59. package/dist/{task-queue-CVQ9cWnC.js → task-queue-CcvFQE_p.js} +3 -3
  60. package/dist/{task-runner-DHBG47gS.js → task-runner-DBkNejLl.js} +6 -6
  61. package/dist/{thread-state-BF8VwIxd.js → thread-state-4hjEIkIq.js} +4 -4
  62. package/dist/{turn-failure-response-Di7TbgsF.js → turn-failure-response-BZNLydC3.js} +7 -7
  63. package/dist/{turn-lifecycle-DzXwXmLg.js → turn-lifecycle-BhqYjaa4.js} +6 -1
  64. package/dist/{turn-session-routing-CIWhXKeT.js → turn-session-routing-jnLOfBHJ.js} +17 -16
  65. package/dist/{validation-BRmwRaXc.js → validation-BUFmsnKs.js} +1 -1
  66. package/dist/{version-DBVMsgvA.js → version-DJTk0ZCE.js} +1 -1
  67. package/dist/version.js +1 -1
  68. package/dist/{viewer-BFADRGP8.js → viewer-WY0RYE4E.js} +53 -15
  69. package/dist/{work-DDaoxZAw.js → work-C5AKvXJV.js} +30 -12
  70. package/dist/{worker-Bub0fDtW.js → worker-BcYVDVUy.js} +6 -6
  71. package/migrations/0073_conversation_quick_question.sql +1 -0
  72. package/migrations/0074_conversation_participant_pins.sql +1 -0
  73. package/migrations/0075_conversation_detail_version.sql +1 -0
  74. package/migrations/0076_conversation_auto_archive.sql +5 -0
  75. package/migrations/meta/0073_snapshot.json +4070 -0
  76. package/migrations/meta/0074_snapshot.json +4076 -0
  77. package/migrations/meta/0075_snapshot.json +4299 -0
  78. package/migrations/meta/0076_snapshot.json +4363 -0
  79. package/migrations/meta/_journal.json +29 -1
  80. package/package.json +5 -4
@@ -1,5 +1,5 @@
1
1
  import { a as resolveLocalScheduleAtMs, i as isValidTimeZone, r as getZonedDateTimeParts, t as getFirstRunAtMs } from "./cadence-R7Em4RjE.js";
2
- import { n as actorIdentitySchema } from "./conversation-BjTo9ZFL.js";
2
+ import { n as actorIdentitySchema } from "./conversation-SsASlWL7.js";
3
3
  import { z } from "zod";
4
4
  import { actorUserIdSchema, destinationVisibilitySchema, eventMatchFieldsSchema, eventMatchSchema, eventReachSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
5
5
  // src/chat/scheduled-automations/schedule-intent.ts
@@ -39,7 +39,7 @@ const oneOffScheduleIntentSchema = z.object({
39
39
  time: localTimeSchema.describe("Requested local wall-clock time in HH:MM format.")
40
40
  }).strict()]).describe("Relative delay or explicit local time for the one-off run.")
41
41
  }).strict();
42
- const recurringScheduleIntentSchema = z.object({
42
+ const recurringScheduleFields = {
43
43
  kind: z.literal("recurring").describe("A repeating calendar schedule."),
44
44
  frequency: z.enum([
45
45
  "daily",
@@ -50,20 +50,21 @@ const recurringScheduleIntentSchema = z.object({
50
50
  interval: z.number().int().positive().max(365).describe("Repeat every N frequency units. Defaults to 1.").nullable().optional(),
51
51
  time: localTimeSchema.describe("Local wall-clock time for each occurrence in HH:MM format."),
52
52
  weekdays: z.array(weekdaySchema).min(1).max(7).describe("Required for weekly schedules.").nullable().optional(),
53
- dayOfMonth: z.number().int().min(1).max(31).describe("Required for monthly and yearly schedules.").nullable().optional(),
54
53
  month: z.number().int().min(1).max(12).describe("Required for yearly schedules, where January is 1.").nullable().optional(),
55
- startDate: localDateSchema.describe("Optional local calendar date that anchors the recurrence. Omit to start with the next matching occurrence.").nullable().optional(),
56
54
  timezone: timezoneSchema
57
- }).strict().superRefine((schedule, context) => {
55
+ };
56
+ const dayOfMonthSchema = z.number().int().min(1).max(31).describe("Required for monthly and yearly schedules.").nullable().optional();
57
+ const startDateSchema = localDateSchema.describe("Optional local calendar date that anchors the recurrence. Omit to start with the next matching occurrence.").nullable().optional();
58
+ function checkRecurringSchedule(schedule, dayOfMonth, context) {
58
59
  if (schedule.frequency === "weekly" && schedule.weekdays == null) context.addIssue({
59
60
  code: "custom",
60
61
  message: "Weekly schedules require weekdays.",
61
62
  path: ["weekdays"]
62
63
  });
63
- if ((schedule.frequency === "monthly" || schedule.frequency === "yearly") && schedule.dayOfMonth == null) context.addIssue({
64
+ if ((schedule.frequency === "monthly" || schedule.frequency === "yearly") && dayOfMonth.value == null) context.addIssue({
64
65
  code: "custom",
65
- message: `${schedule.frequency} schedules require dayOfMonth.`,
66
- path: ["dayOfMonth"]
66
+ message: `${schedule.frequency} schedules require ${dayOfMonth.key}.`,
67
+ path: [dayOfMonth.key]
67
68
  });
68
69
  if (schedule.frequency === "yearly" && schedule.month == null) context.addIssue({
69
70
  code: "custom",
@@ -75,18 +76,46 @@ const recurringScheduleIntentSchema = z.object({
75
76
  message: "weekdays applies only to weekly schedules.",
76
77
  path: ["weekdays"]
77
78
  });
78
- if (schedule.frequency !== "monthly" && schedule.frequency !== "yearly" && schedule.dayOfMonth != null) context.addIssue({
79
+ if (schedule.frequency !== "monthly" && schedule.frequency !== "yearly" && dayOfMonth.value != null) context.addIssue({
79
80
  code: "custom",
80
- message: "dayOfMonth applies only to monthly or yearly schedules.",
81
- path: ["dayOfMonth"]
81
+ message: `${dayOfMonth.key} applies only to monthly or yearly schedules.`,
82
+ path: [dayOfMonth.key]
82
83
  });
83
84
  if (schedule.frequency !== "yearly" && schedule.month != null) context.addIssue({
84
85
  code: "custom",
85
86
  message: "month applies only to yearly schedules.",
86
87
  path: ["month"]
87
88
  });
88
- });
89
+ }
90
+ const recurringScheduleIntentSchema = z.object({
91
+ ...recurringScheduleFields,
92
+ dayOfMonth: dayOfMonthSchema,
93
+ startDate: startDateSchema
94
+ }).strict().superRefine((schedule, context) => checkRecurringSchedule(schedule, {
95
+ key: "dayOfMonth",
96
+ value: schedule.dayOfMonth
97
+ }, context));
98
+ const recurringToolScheduleIntentSchema = z.object({
99
+ ...recurringScheduleFields,
100
+ day_of_month: dayOfMonthSchema,
101
+ start_date: startDateSchema
102
+ }).strict().superRefine((schedule, context) => checkRecurringSchedule(schedule, {
103
+ key: "day_of_month",
104
+ value: schedule.day_of_month
105
+ }, context));
89
106
  const scheduleIntentSchema = z.union([oneOffScheduleIntentSchema, recurringScheduleIntentSchema]);
107
+ /** Model-facing schedule intent of the Automation tools. */
108
+ const toolScheduleIntentSchema = z.union([oneOffScheduleIntentSchema, recurringToolScheduleIntentSchema]);
109
+ /** Map a tool schedule intent to the shape that core compiles and saves. */
110
+ function scheduleIntentFromTool(intent) {
111
+ if (intent.kind === "one_off") return intent;
112
+ const { day_of_month, start_date, ...rest } = intent;
113
+ return {
114
+ ...rest,
115
+ dayOfMonth: day_of_month,
116
+ startDate: start_date
117
+ };
118
+ }
90
119
  const WEEKDAY_INDEX = {
91
120
  sunday: 0,
92
121
  monday: 1,
@@ -694,4 +723,4 @@ const automationEventCatalogSchema = z.array(z.object({
694
723
  }).strict());
695
724
  const automationScheduleIntentSchema = scheduleIntentSchema;
696
725
  const automationSchedulePreviewSchema = scheduledAutomationSchema.pick({ schedule: true }).extend({ nextRunAtMs: z.number() }).strict();
697
- export { SCHEDULED_AUTOMATION_SYSTEM_ACTOR as A, eventAutomationSummarySchema as C, taskOutcomeInputSchema as D, automationTitleSchema as E, scheduleIntentSchema as F, weekdaySchema as I, scheduledRunSchema as M, ScheduleIntentError as N, eventAutomationSchema as O, compileScheduleIntent as P, automationVersionSchema as S, automationInstructionToolSchema as T, automationSummarySchema as _, automationExecutionSchema as a, automationVersionListSchema as b, automationLifecycleSchema as c, automationParamsSchema as d, automationRunListSchema as f, automationSchedulePreviewSchema as g, automationScheduleIntentSchema as h, automationExecutionListSchema as i, scheduledAutomationSchema as j, eventAutomationTriggerSchema as k, automationListQuerySchema as l, automationRunWindowsSchema as m, automationEditSchema as n, automationExecutionStatusDaySchema as o, automationRunSchema as p, automationEventCatalogSchema as r, automationExecutionStatusSchema as s, automationEditErrorSchema as t, automationListSchema as u, automationUpdateSchema as v, scheduledAutomationSummarySchema as w, automationVersionParamsSchema as x, automationVersionActivateSchema as y };
726
+ export { SCHEDULED_AUTOMATION_SYSTEM_ACTOR as A, eventAutomationSummarySchema as C, taskOutcomeInputSchema as D, automationTitleSchema as E, scheduleIntentFromTool as F, toolScheduleIntentSchema as I, weekdaySchema as L, scheduledRunSchema as M, ScheduleIntentError as N, eventAutomationSchema as O, compileScheduleIntent as P, automationVersionSchema as S, automationInstructionToolSchema as T, automationSummarySchema as _, automationExecutionSchema as a, automationVersionListSchema as b, automationLifecycleSchema as c, automationParamsSchema as d, automationRunListSchema as f, automationSchedulePreviewSchema as g, automationScheduleIntentSchema as h, automationExecutionListSchema as i, scheduledAutomationSchema as j, eventAutomationTriggerSchema as k, automationListQuerySchema as l, automationRunWindowsSchema as m, automationEditSchema as n, automationExecutionStatusDaySchema as o, automationRunSchema as p, automationEventCatalogSchema as r, automationExecutionStatusSchema as s, automationEditErrorSchema as t, automationListSchema as u, automationUpdateSchema as v, scheduledAutomationSummarySchema as w, automationVersionParamsSchema as x, automationVersionActivateSchema as y };
@@ -1,5 +1,5 @@
1
- import { i as getChatConfig } from "./config-D0GKc9sC.js";
2
- import { E as withSpan, m as logInfo, p as logException } from "./logging-CFHIO4Vs.js";
1
+ import { i as getChatConfig } from "./config-D5uUtrCP.js";
2
+ import { E as withSpan, m as logInfo, p as logException } from "./logging-cI3T1dNc.js";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  import { createHash, createHmac, timingSafeEqual } from "node:crypto";
5
5
  import { z } from "zod";
@@ -1,7 +1,7 @@
1
- import { i as completeObject } from "./client-gnKpkpqP.js";
1
+ import { i as completeObject } from "./client-DZ8HTnYH.js";
2
2
  import { i as defaultModelId } from "./model-profile-B998sjVd.js";
3
- import { K as briefCodeChangeSchema, X as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-BjTo9ZFL.js";
4
- import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-JEWUUpLW.js";
3
+ import { G as briefCodeChangeSchema, Y as parseBriefInput, d as conversationEventPageSchema, l as conversationDetailReportSchema } from "./conversation-SsASlWL7.js";
4
+ import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-oRfGsxd3.js";
5
5
  import { CLI_USAGE } from "./cli/run.js";
6
6
  import path from "node:path";
7
7
  import { z } from "zod";
@@ -267,7 +267,7 @@ async function parseRunOptions(argv) {
267
267
  * `DATABASE_URL` at import, and `briefs pull` must work with only a token.
268
268
  */
269
269
  async function configuredDefaultModelId() {
270
- const { botConfig } = await import("./config-D0GKc9sC.js").then((n) => n.r);
270
+ const { botConfig } = await import("./config-D5uUtrCP.js").then((n) => n.r);
271
271
  return defaultModelId(botConfig);
272
272
  }
273
273
  function apiUrl(baseUrl, pathname) {
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { t as createPluginCatalogRuntime } from "./registry-OsyWR4GO.js";
2
+ import { t as createPluginCatalogRuntime } from "./registry-Bzefs7kT.js";
3
3
  // src/chat/plugins/catalog-runtime.ts
4
4
  var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
5
5
  const pluginCatalogRuntime = createPluginCatalogRuntime();
@@ -1,4 +1,4 @@
1
- import { n as JuniorPluginSet } from "../plugins-B_0Cr0MO.js";
1
+ import { n as JuniorPluginSet } from "../plugins-DtmjkTza.js";
2
2
  export declare const CHAT_USAGE = "usage: junior chat\n junior chat -p <message>";
3
3
  export type ChatCommandOptions = {
4
4
  mode: "interactive";
package/dist/cli/chat.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-bE7aH7ew.js";
1
+ import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-BsYAbniN.js";
2
2
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
3
3
  import path from "node:path";
4
4
  import { createHash, randomUUID } from "node:crypto";
@@ -99,10 +99,10 @@ async function loadLocalPluginSet() {
99
99
  async function configureLocalChatPlugins(pluginSet) {
100
100
  const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
101
101
  import("../plugins-DOm9Y6qI.js").then((n) => n.o),
102
- import("../projection-CTvLSwcm.js").then((n) => n.kn),
103
- import("../catalog-runtime-DcJ5NHDW.js").then((n) => n.t),
104
- import("../validation-BRmwRaXc.js").then((n) => n.r),
105
- import("../viewer-BFADRGP8.js").then((n) => n.v)
102
+ import("../projection-7EFIqzuj.js").then((n) => n.Mn),
103
+ import("../catalog-runtime-DE-F4Awo.js").then((n) => n.t),
104
+ import("../validation-BUFmsnKs.js").then((n) => n.r),
105
+ import("../viewer-WY0RYE4E.js").then((n) => n.v)
106
106
  ]);
107
107
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
108
108
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -152,18 +152,18 @@ function localDevServerUrl() {
152
152
  async function prepareLocalChatRun(io, pluginSet) {
153
153
  defaultStateAdapterForLocalChat();
154
154
  await configureLocalChatPlugins(pluginSet);
155
- const { setBriefsConfig } = await import("../projection-CTvLSwcm.js").then((n) => n.Vn);
155
+ const { setBriefsConfig } = await import("../projection-7EFIqzuj.js").then((n) => n.Wn);
156
156
  setBriefsConfig({ enabled: true });
157
- const { runLocalAgentTurn } = await import("../runner-C1AwS93W.js");
158
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BgU4EZsJ.js");
157
+ const { runLocalAgentTurn } = await import("../runner-CDE4CZ52.js");
158
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-DXrnbplb.js");
159
159
  const { createLocalOAuthState } = await import("../oauth-relay-C6ZAyJgf.js").then((n) => n.t);
160
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-C-5i7Zxm.js");
161
- const { bindSpawnAgent } = await import("../spawn-Dgj4xxvO.js").then((n) => n.n);
162
- const { bindMessageAgent } = await import("../message-DH0cqFRS.js").then((n) => n.n);
163
- const { createChildConversationWorker } = await import("../result-Btdt5bSl.js").then((n) => n.i);
164
- const { skipInputBeforeConversationStop } = await import("../session-stop-DjIyORJw.js").then((n) => n.r);
160
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-0tcmGd13.js");
161
+ const { bindSpawnAgent } = await import("../spawn-6C9jHH4b.js").then((n) => n.n);
162
+ const { bindMessageAgent } = await import("../message-DBwsAl7O.js").then((n) => n.n);
163
+ const { createChildConversationWorker } = await import("../result-DrcUtFaD.js").then((n) => n.i);
164
+ const { skipInputBeforeConversationStop } = await import("../session-stop-0juF_BP0.js").then((n) => n.r);
165
165
  const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
166
- const { processConversationWork } = await import("../worker-Bub0fDtW.js").then((n) => n.n);
166
+ const { processConversationWork } = await import("../worker-BcYVDVUy.js").then((n) => n.n);
167
167
  let agentRunner;
168
168
  const localConversationWork = createLocalConversationWork(async (message) => {
169
169
  if (!agentRunner) throw new Error("Local agent runner is not ready");
package/dist/cli/check.js CHANGED
@@ -1,6 +1,6 @@
1
- import { A as JUNIOR_HEARTBEAT_ROUTE, F as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, O as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-CFHIO4Vs.js";
2
- import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-OsyWR4GO.js";
3
- import { i as parseSkillFile } from "../skills-BEfAAT6p.js";
1
+ import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-cI3T1dNc.js";
2
+ import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-Bzefs7kT.js";
3
+ import { i as parseSkillFile } from "../skills-CU5Is147.js";
4
4
  import path from "node:path";
5
5
  import fs from "node:fs/promises";
6
6
  import { pathToFileURL } from "node:url";
package/dist/cli/main.js CHANGED
@@ -25,13 +25,13 @@ async function runChat(argv, pluginSet) {
25
25
  return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
26
26
  }
27
27
  async function runAdmin(argv) {
28
- return await (await import("../admin-CkPaAYuZ.js")).runAdmin(argv);
28
+ return await (await import("../admin-DzAKbZsm.js")).runAdmin(argv);
29
29
  }
30
30
  async function runServiceAccount(argv) {
31
- return await (await import("../service-account-DZX1KlQl.js")).runServiceAccount(argv);
31
+ return await (await import("../service-account-BOz9pqOE.js")).runServiceAccount(argv);
32
32
  }
33
33
  async function runBriefs(argv) {
34
- return await (await import("../briefs-6xUvmGos.js")).runBriefs(argv);
34
+ return await (await import("../briefs-BBo0Eimi.js")).runBriefs(argv);
35
35
  }
36
36
  function topLevelCommand(argv) {
37
37
  return (argv[0] === "--" ? argv.slice(1) : argv)[0];
@@ -1,4 +1,4 @@
1
- import { n as JuniorPluginSet } from "../plugins-B_0Cr0MO.js";
1
+ import { n as JuniorPluginSet } from "../plugins-DtmjkTza.js";
2
2
  import { PluginCliIo } from "@sentry/junior-plugin-api";
3
3
  export type PluginCommandIo = PluginCliIo;
4
4
  export interface CliPluginCommandDispatcher {
@@ -1,7 +1,7 @@
1
- import { Da as createPluginLogger, Rn as setPlugins, zn as validatePlugins } from "../projection-CTvLSwcm.js";
2
- import { S as getDb } from "../viewer-BFADRGP8.js";
3
- import { n as pluginCatalogRuntime } from "../catalog-runtime-DcJ5NHDW.js";
4
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-BRmwRaXc.js";
1
+ import { Hn as validatePlugins, Ma as createPluginLogger, Vn as setPlugins } from "../projection-7EFIqzuj.js";
2
+ import { S as getDb } from "../viewer-WY0RYE4E.js";
3
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-DE-F4Awo.js";
4
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-BUFmsnKs.js";
5
5
  import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-DOm9Y6qI.js";
6
6
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
7
7
  import { stderr, stdout } from "node:process";
@@ -1,7 +1,7 @@
1
- import { Er as create } from "../projection-CTvLSwcm.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-DcJ5NHDW.js";
3
- import { t as disconnectStateAdapter } from "../adapter-dE2BiWP_.js";
4
- import { n as resolve } from "../resolve-DCrKjmVP.js";
1
+ import { ci as create } from "../projection-7EFIqzuj.js";
2
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-DE-F4Awo.js";
3
+ import { t as disconnectStateAdapter } from "../adapter-BtfBHVM5.js";
4
+ import { n as resolve } from "../resolve-CuiEY_2u.js";
5
5
  // src/cli/snapshot-create.ts
6
6
  const DEFAULT_RUNTIME = "node22";
7
7
  const DEFAULT_TIMEOUT_MS = 6e5;
@@ -1,5 +1,5 @@
1
- import "../db-BMZhoYKj.js";
2
- import { n as JuniorPluginSet } from "../plugins-B_0Cr0MO.js";
1
+ import "../db-DEiwO5Sh.js";
2
+ import { n as JuniorPluginSet } from "../plugins-DtmjkTza.js";
3
3
  interface UpgradeIo {
4
4
  info: (line: string) => void;
5
5
  }
@@ -1,6 +1,6 @@
1
- import { i as getChatConfig } from "../config-D0GKc9sC.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-j8VMt-To.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-OsyWR4GO.js";
1
+ import { i as getChatConfig } from "../config-D5uUtrCP.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-hPfFTH0C.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-Bzefs7kT.js";
4
4
  import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-DOm9Y6qI.js";
5
5
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
6
6
  import { basename, dirname, join, resolve } from "node:path";
@@ -1,5 +1,5 @@
1
- import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-CFHIO4Vs.js";
2
- import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-BCXFshP9.js";
1
+ import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-cI3T1dNc.js";
2
+ import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-VuylvlKr.js";
3
3
  import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
4
4
  import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
5
5
  import { createGatewayProvider } from "@ai-sdk/gateway";
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { C as toOptionalTrimmed, c as resolveGatewayModel } from "./client-gnKpkpqP.js";
3
- import { h as logWarn } from "./logging-CFHIO4Vs.js";
2
+ import { C as toOptionalTrimmed, c as resolveGatewayModel } from "./client-DZ8HTnYH.js";
3
+ import { h as logWarn } from "./logging-cI3T1dNc.js";
4
4
  import { c as modelProfileSchema, d as parseTurnReasoningLevel, t as DEFAULT_MODEL_PROFILES, u as TURN_REASONING_LEVELS } from "./model-profile-B998sjVd.js";
5
5
  import { AwsClient } from "aws4fetch";
6
6
  // src/chat/attachments/s3.ts
@@ -1,13 +1,13 @@
1
- import { $ as loadTurnCheckpoint, Lr as startOAuthFlow, it as getTurnRecord, rt as failTurnRecord } from "./projection-CTvLSwcm.js";
2
- import { n as botConfig } from "./config-D0GKc9sC.js";
3
- import { C as getSqlExecutor, F as deleteProviderIdentityForSlackUser, I as deleteProviderIdentityForUser, y as getConversationEventStore } from "./viewer-BFADRGP8.js";
4
- import { u as hasRequiredOAuthScope } from "./registry-OsyWR4GO.js";
5
- import { n as pluginCatalogRuntime } from "./catalog-runtime-DcJ5NHDW.js";
6
- import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-bE7aH7ew.js";
7
- import { r as getStateAdapter } from "./adapter-dE2BiWP_.js";
8
- import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-BYuOt3qK.js";
9
- import { m as ensureConversationWake, w as requestConversationWork } from "./store-Dp3RMEQd.js";
10
- import { n as resolveTurnSessionRouting } from "./turn-session-routing-CIWhXKeT.js";
1
+ import { $ as loadTurnCheckpoint, it as getTurnRecord, rt as failTurnRecord, yi as startOAuthFlow } from "./projection-7EFIqzuj.js";
2
+ import { n as botConfig } from "./config-D5uUtrCP.js";
3
+ import { C as getSqlExecutor, F as deleteProviderIdentityForSlackUser, I as deleteProviderIdentityForUser, y as getConversationEventStore } from "./viewer-WY0RYE4E.js";
4
+ import { u as hasRequiredOAuthScope } from "./registry-Bzefs7kT.js";
5
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-DE-F4Awo.js";
6
+ import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-BsYAbniN.js";
7
+ import { r as getStateAdapter } from "./adapter-BtfBHVM5.js";
8
+ import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-hh18yCeU.js";
9
+ import { m as ensureConversationWake, w as requestConversationWork } from "./store-DKs1WwdB.js";
10
+ import { n as resolveTurnSessionRouting } from "./turn-session-routing-jnLOfBHJ.js";
11
11
  import { randomBytes, randomUUID } from "node:crypto";
12
12
  import { z } from "zod";
13
13
  // src/chat/task-execution/authorized-turn.ts
@@ -393,12 +393,12 @@ async function startConnection(provider, actor) {
393
393
  };
394
394
  }
395
395
  /**
396
- * Remove the user's stored connection for one provider and the provider
397
- * identity that the connection linked to the viewer's user.
396
+ * Remove the viewer's stored connection for one provider and the provider
397
+ * identity that the connection linked to the viewer's User.
398
398
  */
399
- async function disconnectConnection(userId, provider, userTokenStore, viewerUserId) {
399
+ async function disconnectConnection(userId, provider, userTokenStore) {
400
400
  const tokens = await userTokenStore.get(userId, provider);
401
- if (tokens?.account) await deleteProviderIdentityForUser(getSqlExecutor(), viewerUserId, provider, tokens.account.id);
401
+ if (tokens?.account) await deleteProviderIdentityForUser(getSqlExecutor(), userId, provider, tokens.account.id);
402
402
  await unlinkProvider(userId, provider, userTokenStore);
403
403
  }
404
404
  export { startConnection as a, deleteWebAuthorization as c, createPausedTurns as d, getPausedTurnRequest as f, getTurnAuthorization as h, readConnectedOAuthTokens as i, getWebAuthorization as l, wakePausedTurn as m, isConnectableProvider as n, unlinkProvider as o, wakeAuthorizedTurn as p, listConnections as r, createWebAuthorization as s, disconnectConnection as t, htmlCallbackResponse as u };
@@ -230,6 +230,21 @@ function annotationCard(annotation) {
230
230
  title: value.label
231
231
  };
232
232
  }
233
+ // src/chat/review-items/change-record.ts
234
+ /**
235
+ * The person change to a Review item that one message records. Each inbound
236
+ * message and saved Message that reports a take, answer, or dismiss carries
237
+ * its own record, so the dashboard shows what that message did, not what the
238
+ * item looks like now.
239
+ */
240
+ const reviewItemChangeRecordSchema = z.object({
241
+ kind: z.enum([
242
+ "submitted",
243
+ "dismissed",
244
+ "taken"
245
+ ]),
246
+ reviewItemId: z.string().min(1)
247
+ }).strict();
233
248
  // src/api/schema/conversation-read-position.ts
234
249
  /**
235
250
  * How far the signed-in viewer has read a Conversation transcript.
@@ -280,11 +295,6 @@ const conversationFeedQuerySchema = z.object({
280
295
  q: z.string().trim().max(200).optional(),
281
296
  status: z.enum(["active", "archived"]).default("active")
282
297
  }).strict();
283
- const archiveConversationBodySchema = z.object({
284
- archived: z.boolean(),
285
- lastSeenAt: z.string().datetime()
286
- }).strict();
287
- const archiveConversationResponseSchema = z.object({ archivedAt: z.string().datetime().nullable() }).strict();
288
298
  const createConversationMessageBodySchema = z.object({
289
299
  idempotencyKey: z.string().trim().min(1).max(200),
290
300
  message: z.string().trim().max(32e3),
@@ -327,15 +337,17 @@ const conversationPendingMessageSchema = z.object({
327
337
  /** People mentioned in the text, resolved at read time. */
328
338
  mentions: z.array(actorIdentitySchema).optional(),
329
339
  attachments: z.array(messageAttachmentSchema).optional(),
340
+ /** Review item change that this Message records. */
341
+ reviewItemChange: reviewItemChangeRecordSchema.optional(),
330
342
  redacted: z.literal(true).optional()
331
343
  }).strict().superRefine((data, context) => {
332
344
  if (data.text === void 0 === (data.redacted !== true)) context.addIssue({
333
345
  code: "custom",
334
346
  message: "pending message content must be text or explicitly redacted"
335
347
  });
336
- if (data.redacted && (data.actorIdentity || data.attachments || data.mentions)) context.addIssue({
348
+ if (data.redacted && (data.actorIdentity || data.attachments || data.mentions || data.reviewItemChange)) context.addIssue({
337
349
  code: "custom",
338
- message: "redacted pending messages must not expose actor identity, attachments, or mentions"
350
+ message: "redacted pending messages must not expose actor identity, attachments, mentions, or a review item"
339
351
  });
340
352
  });
341
353
  /** Participant-only authorization prompt for a parked web turn. */
@@ -427,6 +439,7 @@ const conversationSummaryReportSchema = z.object({
427
439
  actorIdentity: actorIdentitySchema.optional(),
428
440
  participants: z.array(actorIdentitySchema).optional(),
429
441
  archivedAt: z.string().datetime().nullable().optional(),
442
+ pinnedAt: z.string().datetime().nullable().optional(),
430
443
  channel: z.string().optional(),
431
444
  channelName: z.string().optional(),
432
445
  channelNameRedacted: z.boolean().optional(),
@@ -481,9 +494,15 @@ const conversationReportMessageEventDataSchema = z.object({
481
494
  eventObjectType: objectTypeSchema.optional(),
482
495
  explicitMention: z.boolean().optional(),
483
496
  trustedSummary: z.string().min(1).optional(),
484
- /** Every Event when several arrived together in one message. */
497
+ /**
498
+ * The Watch Events when several arrived together. A message that also
499
+ * records Review item changes lists its own Event here even when it has
500
+ * one.
501
+ */
485
502
  events: z.array(conversationReportMessageEventSchema).optional(),
486
503
  cards: z.array(messageCardRefSchema).optional(),
504
+ /** Person changes to Review items that this message records. */
505
+ reviewItemChanges: z.array(reviewItemChangeRecordSchema).min(1).optional(),
487
506
  text: z.string().optional(),
488
507
  attachments: z.array(messageAttachmentSchema).optional(),
489
508
  redacted: z.literal(true).optional()
@@ -492,9 +511,9 @@ const conversationReportMessageEventDataSchema = z.object({
492
511
  code: "custom",
493
512
  message: "message content must be text or explicitly redacted"
494
513
  });
495
- if (data.redacted && (data.actorIdentity || data.cards || data.attachments || data.events)) context.addIssue({
514
+ if (data.redacted && (data.actorIdentity || data.cards || data.attachments || data.events || data.reviewItemChanges)) context.addIssue({
496
515
  code: "custom",
497
- message: "redacted messages must not expose actor identity, cards, attachments, or events"
516
+ message: "redacted messages must not expose actor identity, cards, attachments, events, or review item changes"
498
517
  });
499
518
  });
500
519
  const conversationReportMessageHandledEventDataSchema = z.object({
@@ -812,7 +831,9 @@ function validateConversationEvents(report, context) {
812
831
  const forkConversationBodySchema = z.object({
813
832
  /** Assistant reply that ends the copied history. */
814
833
  messageId: z.string().min(1).max(500),
815
- idempotencyKey: z.string().trim().min(1).max(200)
834
+ idempotencyKey: z.string().trim().min(1).max(200),
835
+ /** Start a hidden, read-only Quick question about this reply text. */
836
+ quickQuestion: z.object({ quote: z.string().trim().min(1).max(4e3) }).strict().optional()
816
837
  }).strict();
817
838
  const forkConversationResponseSchema = z.object({ conversationId: z.string() }).strict();
818
839
  /** One Conversation in the agent tree of a child Conversation. */
@@ -826,6 +847,8 @@ const conversationDetailReportSchema = conversationSummaryReportSchema.extend({
826
847
  * Conversation last. Root Conversations omit it.
827
848
  */
828
849
  agentTree: z.array(conversationAgentTreeNodeSchema).min(2).optional(),
850
+ /** The viewer's effective auto-archive choice. Participants only. */
851
+ autoArchive: z.boolean().optional(),
829
852
  /** The viewer can fork this conversation from an assistant reply. */
830
853
  canFork: z.boolean().optional(),
831
854
  /** How far the signed-in viewer has read. Absent until they read. */
@@ -866,4 +889,4 @@ const conversationFeedSchema = z.object({
866
889
  source: z.literal("conversation_index"),
867
890
  generatedAt: z.string()
868
891
  }).strict();
869
- export { createConversationMessageBodySchema as A, readMessageCardRefs as B, conversationReportEventSchema as C, conversationSurfaceSchema as D, conversationSummaryReportSchema as E, conversationChildAgentTotalsSchema as F, readMessageAttachments as G, resolveMessageCards as H, conversationReadPositionSchema as I, briefOutcomeStatusSchema as J, briefCodeChangeSchema as K, annotationCard as L, forkConversationResponseSchema as M, steerConversationPendingMessagesBodySchema as N, conversationUsageSchema as O, steerConversationPendingMessagesResponseSchema as P, messageCardRef as R, conversationReportEventDataSchema as S, conversationReportStatusSchema as T, MAX_INPUT_IMAGES as U, removedCardSchema as V, MAX_INPUT_IMAGE_BYTES as W, parseBriefInput as X, conversationBriefSchema as Y, conversationParamsSchema as _, cancelConversationPendingMessagesBodySchema as a, conversationPendingMessageSchema as b, conversationAttachmentParamsSchema as c, conversationDetailReportSchema as d, conversationEventHistorySchema as f, conversationFeedSchema as g, conversationFeedQuerySchema as h, archiveConversationResponseSchema as i, forkConversationBodySchema as j, createConversationBodySchema as k, conversationAuxiliaryCostsSchema as l, conversationEventsQuerySchema as m, actorIdentitySchema as n, cancelConversationPendingMessagesResponseSchema as o, conversationEventPageSchema as p, briefLinkSchema as q, archiveConversationBodySchema as r, conversationActivityPreviewSchema as s, acceptedConversationMessageSchema as t, conversationDetailQuerySchema as u, conversationPendingAuthorizationSchema as v, conversationReportMessageEventSchema as w, conversationPendingMessagesReportSchema as x, conversationPendingMessageDeliverySchema as y, messageCardText as z };
892
+ export { forkConversationResponseSchema as A, removedCardSchema as B, conversationReportStatusSchema as C, createConversationBodySchema as D, conversationUsageSchema as E, reviewItemChangeRecordSchema as F, briefCodeChangeSchema as G, MAX_INPUT_IMAGES as H, annotationCard as I, conversationBriefSchema as J, briefLinkSchema as K, messageCardRef as L, steerConversationPendingMessagesResponseSchema as M, conversationChildAgentTotalsSchema as N, createConversationMessageBodySchema as O, conversationReadPositionSchema as P, messageCardText as R, conversationReportMessageEventSchema as S, conversationSurfaceSchema as T, MAX_INPUT_IMAGE_BYTES as U, resolveMessageCards as V, readMessageAttachments as W, parseBriefInput as Y, conversationPendingMessageDeliverySchema as _, conversationActivityPreviewSchema as a, conversationReportEventDataSchema as b, conversationDetailQuerySchema as c, conversationEventPageSchema as d, conversationEventsQuerySchema as f, conversationPendingAuthorizationSchema as g, conversationParamsSchema as h, cancelConversationPendingMessagesResponseSchema as i, steerConversationPendingMessagesBodySchema as j, forkConversationBodySchema as k, conversationDetailReportSchema as l, conversationFeedSchema as m, actorIdentitySchema as n, conversationAttachmentParamsSchema as o, conversationFeedQuerySchema as p, briefOutcomeStatusSchema as q, cancelConversationPendingMessagesBodySchema as r, conversationAuxiliaryCostsSchema as s, acceptedConversationMessageSchema as t, conversationEventHistorySchema as u, conversationPendingMessageSchema as v, conversationSummaryReportSchema as w, conversationReportEventSchema as x, conversationPendingMessagesReportSchema as y, readMessageCardRefs as z };
@@ -1,4 +1,4 @@
1
- import { h as logWarn } from "./logging-CFHIO4Vs.js";
1
+ import { h as logWarn } from "./logging-cI3T1dNc.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  // src/chat/conversation-privacy.ts
4
4
  const SAFE_METADATA_KEY_LIMIT = 20;
@@ -1,19 +1,19 @@
1
- import { En as createUserTokenStore, Fr as parseOAuthStatePayload, Ir as resolveBaseUrl, On as resolvePluginOAuthAccount, Pr as formatProviderLabel, X as getConversationPendingAuth, Xr as postSlackMessage, Yi as getSlackClient, f as recordAuthenticationLinked, it as getTurnRecord, p as recordAuthorizationCompleted } from "./projection-CTvLSwcm.js";
2
- import { m as escapeXml } from "./client-gnKpkpqP.js";
3
- import { a as getRuntimeMetadata, n as botConfig } from "./config-D0GKc9sC.js";
4
- import { B as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-CFHIO4Vs.js";
1
+ import { Dn as createUserTokenStore, Hi as getSlackClient, Mi as postSlackMessage, X as getConversationPendingAuth, _i as parseOAuthStatePayload, f as recordAuthenticationLinked, gi as formatProviderLabel, it as getTurnRecord, jn as resolvePluginOAuthAccount, p as recordAuthorizationCompleted, vi as resolveBaseUrl } from "./projection-7EFIqzuj.js";
2
+ import { m as escapeXml } from "./client-DZ8HTnYH.js";
3
+ import { a as getRuntimeMetadata, n as botConfig } from "./config-D5uUtrCP.js";
4
+ import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-cI3T1dNc.js";
5
5
  import { p as parseSlackUserId } from "./actor-B4DYygOB.js";
6
- import { C as getSqlExecutor, L as findUserByVerifiedEmails, N as resolveActorIdentityId, V as upsertLinkedIdentity, o as readIdentityById } from "./viewer-BFADRGP8.js";
6
+ import { C as getSqlExecutor, L as findUserByVerifiedEmails, N as resolveActorIdentityId, V as upsertLinkedIdentity, o as readIdentityById } from "./viewer-WY0RYE4E.js";
7
7
  import { i as homeDir } from "./package-discovery-DJBompdd.js";
8
- import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-OsyWR4GO.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-DcJ5NHDW.js";
10
- import { t as discoverSkills } from "./skills-BEfAAT6p.js";
11
- import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-bE7aH7ew.js";
8
+ import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-Bzefs7kT.js";
9
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-DE-F4Awo.js";
10
+ import { t as discoverSkills } from "./skills-CU5Is147.js";
11
+ import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-BsYAbniN.js";
12
12
  import { r as acquireActiveLock } from "./locks-D-0h111u.js";
13
- import { r as getStateAdapter } from "./adapter-dE2BiWP_.js";
14
- import { _ as getMcpProviderErrorAttributes } from "./service-account-CQIW6At4.js";
15
- import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BF8VwIxd.js";
16
- import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-DLqP5Bp1.js";
13
+ import { r as getStateAdapter } from "./adapter-BtfBHVM5.js";
14
+ import { _ as getMcpProviderErrorAttributes } from "./service-account-DIyz_9Uh.js";
15
+ import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-4hjEIkIq.js";
16
+ import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-Do24CGP5.js";
17
17
  import { n as relayLocalOAuthCallback } from "./oauth-relay-C6ZAyJgf.js";
18
18
  import path from "node:path";
19
19
  import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
@@ -1,4 +1,4 @@
1
- import "./schema-DfdHlBnb.js";
1
+ import "./schema-B6N2nc6v.js";
2
2
  import { z } from "zod";
3
3
  import { Destination, Source, locationSchema } from "@sentry/junior-plugin-api";
4
4
  import "drizzle-orm/pg-core";
@@ -1,6 +1,6 @@
1
- import "./config-D0GKc9sC.js";
2
- import { p as logException } from "./logging-CFHIO4Vs.js";
3
- import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-C1RNOCs8.js";
1
+ import "./config-D5uUtrCP.js";
2
+ import { p as logException } from "./logging-cI3T1dNc.js";
3
+ import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-Crs3XHhg.js";
4
4
  import { AsyncLocalStorage } from "node:async_hooks";
5
5
  import { sql } from "drizzle-orm";
6
6
  import { bigint, boolean, check, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, uniqueIndex, uuid } from "drizzle-orm/pg-core";
@@ -246,14 +246,22 @@ const juniorConversationParticipants = pgTable("junior_conversation_participants
246
246
  userId: text("user_id").notNull().references(() => juniorUsers.id),
247
247
  rootConversationId: text("root_conversation_id").notNull().references(() => juniorConversations.conversationId),
248
248
  lastMessageAt: timestamptz("last_message_at").notNull(),
249
- archivedAt: timestamptz("archived_at")
249
+ archivedAt: timestamptz("archived_at"),
250
+ pinnedAt: timestamptz("pinned_at"),
251
+ /**
252
+ * Per-conversation auto-archive choice for this user. Null uses the
253
+ * user's `autoArchiveDefault`.
254
+ */
255
+ autoArchive: boolean("auto_archive")
250
256
  }, (table) => [
251
257
  primaryKey({
252
258
  name: "junior_conversation_participants_user_root_pk",
253
259
  columns: [table.userId, table.rootConversationId]
254
260
  }),
255
261
  index("junior_conversation_participants_user_activity_idx").on(table.userId, table.lastMessageAt.desc()),
256
- index("junior_conversation_participants_root_idx").on(table.rootConversationId)
262
+ index("junior_conversation_participants_root_idx").on(table.rootConversationId),
263
+ index("junior_conversation_participants_auto_archive_idx").on(table.userId).where(sql`${table.autoArchive} and ${table.archivedAt} is null`),
264
+ index("junior_conversation_participants_unarchived_activity_idx").on(table.userId, table.lastMessageAt, table.rootConversationId).where(sql`${table.archivedAt} is null`)
257
265
  ]);
258
266
  // src/db/schema/conversation-read-positions.ts
259
267
  /**
@@ -1,2 +1,16 @@
1
+ /** Browser SDK settings and the current request's trace, for an HTML page. */
2
+ export interface BrowserSentryConfig {
3
+ baggage?: string;
4
+ dsn: string;
5
+ environment?: string;
6
+ release?: string;
7
+ sentryTrace?: string;
8
+ tracesSampleRate: number;
9
+ }
10
+ /**
11
+ * Read the settings a served page needs to send browser spans to the same
12
+ * project, continuing the trace of the request that rendered it.
13
+ */
14
+ export declare function getBrowserSentryConfig(): BrowserSentryConfig | undefined;
1
15
  /** Initialize Sentry for the Junior runtime. Call at the top of your entry point. */
2
16
  export declare function initSentry(): void;