@sentry/junior 0.277.0 → 0.279.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 (91) hide show
  1. package/dist/{adapter-BtfBHVM5.js → adapter-phTTgw7H.js} +1 -1
  2. package/dist/{admin-DzAKbZsm.js → admin-PcpJDugZ.js} +1 -1
  3. package/dist/{agent-invocations-Crs3XHhg.js → agent-invocations-CUg_SODU.js} +0 -1
  4. package/dist/{agent-runner-BsYAbniN.js → agent-runner-DwvT1BY0.js} +321 -847
  5. package/dist/api/schema.d.ts +2 -2
  6. package/dist/api/schema.js +6 -6
  7. package/dist/api.d.ts +1 -1
  8. package/dist/api.js +46 -414
  9. package/dist/{app-BjEQwNVP.d.ts → app-DVs6noo7.d.ts} +6 -27
  10. package/dist/app.d.ts +2 -2
  11. package/dist/app.js +460 -78
  12. package/dist/{assistant-reply-NebRGG4G.js → assistant-reply-BXfxczd7.js} +28 -6
  13. package/dist/{automation-Cql9h2vO.js → automation-BehArCcq.js} +1 -1
  14. package/dist/{background-compaction-queue-hh18yCeU.js → background-compaction-queue-CcbuLJrZ.js} +2 -2
  15. package/dist/{briefs-BBo0Eimi.js → briefs-Dd_ezwED.js} +10 -10
  16. package/dist/{catalog-runtime-DE-F4Awo.js → catalog-runtime-BWVMeZhW.js} +2 -2
  17. package/dist/cli/chat.js +16 -16
  18. package/dist/cli/check.js +3 -3
  19. package/dist/cli/init.js +0 -2
  20. package/dist/cli/main.js +4 -4
  21. package/dist/cli/plugins.js +5 -5
  22. package/dist/cli/snapshot-create.js +4 -4
  23. package/dist/cli/upgrade.d.ts +1 -1
  24. package/dist/cli/upgrade.js +4 -4
  25. package/dist/{client-DZ8HTnYH.js → client-Bpxe4vKa.js} +8 -4
  26. package/dist/{config-D5uUtrCP.js → config-C_bmRhrJ.js} +25 -100
  27. package/dist/{connections-Do24CGP5.js → connections-B2rHe5W5.js} +10 -10
  28. package/dist/{conversation-SsASlWL7.js → conversation-CIiJtx5q.js} +56 -104
  29. package/dist/conversation-pending-messages-CnBvE6-6.js +173 -0
  30. package/dist/{conversation-privacy-VuylvlKr.js → conversation-privacy-CzOfcz0U.js} +1 -1
  31. package/dist/{credential-sync-BGQK3pOa.js → credential-sync-Dal_unpv.js} +15 -15
  32. package/dist/{db-DEiwO5Sh.d.ts → db-CyLrV9C7.d.ts} +1 -1
  33. package/dist/{executor-hPfFTH0C.js → executor-BfYH-Wws.js} +6 -4
  34. package/dist/instrumentation.d.ts +12 -0
  35. package/dist/instrumentation.js +56 -23
  36. package/dist/{logging-cI3T1dNc.js → logging-CkT3_Xxp.js} +2 -2
  37. package/dist/{media-DstkkoNP.js → media-DTAA8Qs_.js} +21 -23
  38. package/dist/{message-DBwsAl7O.js → message-Q5dkgaJ5.js} +23 -29
  39. package/dist/nitro.d.ts +1 -1
  40. package/dist/nitro.js +18 -6
  41. package/dist/{oauth-callback-server-DXrnbplb.js → oauth-callback-server-BDRaqe8O.js} +2 -2
  42. package/dist/{oauth-relay-C6ZAyJgf.js → oauth-relay-D0G3T16m.js} +1 -1
  43. package/dist/{package-discovery-DJBompdd.js → package-discovery-DJhGdS4c.js} +1 -1
  44. package/dist/{plugins-DOm9Y6qI.js → plugins-HYh_JOdw.js} +1 -1
  45. package/dist/{projection-7EFIqzuj.js → projection-DWxX7pb1.js} +214 -138
  46. package/dist/{prompt-oRfGsxd3.js → prompt--dwus7Y-.js} +1 -1
  47. package/dist/proxy-path-BHYoKZdq.js +15 -0
  48. package/dist/{registry-Bzefs7kT.js → registry-DnrdeO4s.js} +2 -2
  49. package/dist/{resolve-CuiEY_2u.js → resolve-C_QXfqD_.js} +3 -3
  50. package/dist/{result-DrcUtFaD.js → result-DNmOxT-N.js} +10 -10
  51. package/dist/{runner-CDE4CZ52.js → runner-zd_noJ1l.js} +11 -11
  52. package/dist/{sandbox-egress-signals-0tcmGd13.js → sandbox-egress-signals-DQjv-nbG.js} +1 -1
  53. package/dist/{schema-Dzi3lkdP.js → schema-CNJNzvr8.js} +4 -4
  54. package/dist/{schema-B6N2nc6v.d.ts → schema-e90H5FIN.d.ts} +2176 -967
  55. package/dist/sentry-BRTJqumy.js +51 -0
  56. package/dist/sentry-DrKC2NeM.d.ts +1 -0
  57. package/dist/sentry-route-name-BhwWnfqj.js +51 -0
  58. package/dist/{service-account-BOz9pqOE.js → service-account-BK26XlHo.js} +3 -3
  59. package/dist/{service-account-DIyz_9Uh.js → service-account-CCH2Hv4h.js} +3 -3
  60. package/dist/{session-stop-0juF_BP0.js → session-stop-6Tf--T7G.js} +23 -16
  61. package/dist/{skills-CU5Is147.js → skills-BNrk8gi4.js} +4 -4
  62. package/dist/{spawn-6C9jHH4b.js → spawn-C75hAB9l.js} +3 -4
  63. package/dist/{stop-6FVG1c-r.js → stop-RYbf7PWi.js} +742 -207
  64. package/dist/{store-DtHZviJ1.js → store-CO5vGjwD.js} +9 -16
  65. package/dist/{store-DKs1WwdB.js → store-G3h2djJU.js} +3 -3
  66. package/dist/{task-queue-CcvFQE_p.js → task-queue-DlN58XeM.js} +3 -3
  67. package/dist/{task-runner-DBkNejLl.js → task-runner-B-Bdm23d.js} +22 -10
  68. package/dist/{thread-state-4hjEIkIq.js → thread-state-Cj_7Slru.js} +4 -4
  69. package/dist/{turn-failure-response-BZNLydC3.js → turn-failure-response-CE7gaoC7.js} +7 -7
  70. package/dist/{turn-lifecycle-BhqYjaa4.js → turn-lifecycle-7sXwXLJ6.js} +1 -1
  71. package/dist/{turn-session-routing-jnLOfBHJ.js → turn-session-routing-FBdaH1zf.js} +10 -10
  72. package/dist/{validation-BUFmsnKs.js → validation-DLWxEzWW.js} +2 -2
  73. package/dist/{version-DJTk0ZCE.js → version-DtQ8WFIZ.js} +1 -1
  74. package/dist/version.js +1 -1
  75. package/dist/{viewer-WY0RYE4E.js → viewer-vsM8_90o.js} +53 -22
  76. package/dist/{work-C5AKvXJV.js → work-DsoFRO_0.js} +12 -17
  77. package/dist/{worker-BcYVDVUy.js → worker-6kZEsCXs.js} +7 -7
  78. package/migrations/0077_drop_agent_invocation_model_profile.sql +1 -0
  79. package/migrations/0078_plugin_conversation_index.sql +20 -0
  80. package/migrations/0079_conversation_event_author_index.sql +20 -0
  81. package/migrations/meta/0075_snapshot.json +98 -314
  82. package/migrations/meta/0076_snapshot.json +98 -314
  83. package/migrations/meta/0077_snapshot.json +4141 -0
  84. package/migrations/meta/0078_snapshot.json +4175 -0
  85. package/migrations/meta/0079_snapshot.json +4203 -0
  86. package/migrations/meta/_journal.json +22 -1
  87. package/package.json +5 -5
  88. package/dist/common-Eu6sx09c.js +0 -107
  89. package/dist/model-profile-B998sjVd.js +0 -67
  90. package/dist/rolldown-runtime-nwUcYXjP.js +0 -27
  91. package/dist/sentry-MDkYAVPV.js +0 -23
@@ -1,5 +1,5 @@
1
- import { _ as withScope, d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException } from "./sentry-MDkYAVPV.js";
2
- import { t as JUNIOR_VERSION } from "./version-DJTk0ZCE.js";
1
+ import { _ as withScope, d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException } from "./sentry-BRTJqumy.js";
2
+ import { t as JUNIOR_VERSION } from "./version-DtQ8WFIZ.js";
3
3
  import path from "node:path";
4
4
  import { styleText } from "node:util";
5
5
  import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
@@ -1,4 +1,3 @@
1
- import { c as modelProfileSchema, u as TURN_REASONING_LEVELS } from "./model-profile-B998sjVd.js";
2
1
  import { z } from "zod";
3
2
  import { actorSchema } from "@sentry/junior-plugin-api";
4
3
  // src/usage-schema.ts
@@ -124,8 +123,8 @@ function decodeHistoryPayload(type, payload) {
124
123
  * Durable conversation event history port.
125
124
  *
126
125
  * Events append under the conversation lease in stable sequence order.
127
- * Compaction and handoff replace the active model history without rewriting
128
- * prior events. Unsupported stored events remain readable as opaque facts,
126
+ * Compaction replaces the active model history without rewriting prior
127
+ * events. Unsupported stored events remain readable as opaque facts,
129
128
  * while malformed known events fail loudly. Provider-specific message fields
130
129
  * are validated by the Pi adapter when it restores model context.
131
130
  */
@@ -172,22 +171,24 @@ const compactionDetailsSchema = z.object({
172
171
  retainedMessageCount: z.number().int().nonnegative(),
173
172
  summaryChars: z.number().int().nonnegative()
174
173
  }).strict();
175
- const historyReplacementEventDataSchema = z.discriminatedUnion("type", [z.object({
176
- type: z.literal("handoff"),
177
- modelProfile: modelProfileSchema,
174
+ const legacyModelProfileSchema = z.string().min(1).optional();
175
+ const historyReplacementEventDataSchema = z.object({
176
+ type: z.literal("compaction"),
177
+ modelProfile: legacyModelProfileSchema,
178
178
  modelId: z.string().min(1),
179
- reasoningLevel: z.string().min(1).optional(),
180
- triggeringToolCallId: z.string().min(1).optional(),
179
+ details: compactionDetailsSchema.optional(),
181
180
  summary: z.string().min(1).optional(),
182
181
  replacementHistory: replacementHistorySchema
183
- }).strict(), z.object({
184
- type: z.literal("compaction"),
185
- modelProfile: modelProfileSchema,
182
+ }).strict();
183
+ const legacyHandoffEventDataSchema = z.object({
184
+ type: z.literal("handoff"),
185
+ modelProfile: legacyModelProfileSchema,
186
186
  modelId: z.string().min(1),
187
- details: compactionDetailsSchema.optional(),
187
+ reasoningLevel: z.string().min(1).optional(),
188
+ triggeringToolCallId: z.string().min(1).optional(),
188
189
  summary: z.string().min(1).optional(),
189
190
  replacementHistory: replacementHistorySchema
190
- }).strict()]);
191
+ }).strict();
191
192
  /** Validate an event that intentionally replaces active model history. */
192
193
  const historyReplacementSchema = z.object({
193
194
  data: historyReplacementEventDataSchema,
@@ -316,19 +317,15 @@ const turnStartedEventDataSchema = z.object({
316
317
  inputMessageIds: z.array(z.string().min(1)).min(1),
317
318
  surface: conversationTurnSurfaceSchema
318
319
  }).strict().refine((data) => new Set(data.inputMessageIds).size === data.inputMessageIds.length, "turn input message ids must be unique");
319
- const turnRoutedEventDataSchema = z.object({
320
+ const legacyTurnRoutedEventDataSchema = z.object({
320
321
  type: z.literal("turn_routed"),
321
322
  turnId: z.string().min(1),
322
- modelProfile: modelProfileSchema,
323
+ modelProfile: z.string().min(1),
323
324
  modelId: z.string().min(1),
324
325
  costUsd: z.number().finite().nonnegative().optional(),
325
- reasoningLevel: z.enum(TURN_REASONING_LEVELS),
326
+ reasoningLevel: z.string().min(1),
326
327
  confidence: z.number().min(0).max(1).optional(),
327
- source: z.enum([
328
- "configured",
329
- "inherited",
330
- "router"
331
- ])
328
+ source: z.string().min(1)
332
329
  }).strict();
333
330
  const turnContextEventDataSchema = z.object({
334
331
  type: z.literal("turn_context"),
@@ -404,7 +401,7 @@ const compactionRequestedEventDataSchema = z.object({
404
401
  type: z.literal("compaction_requested"),
405
402
  markSeq: z.number().int().nonnegative(),
406
403
  historyVersion: z.number().int().nonnegative(),
407
- modelProfile: modelProfileSchema,
404
+ modelProfile: legacyModelProfileSchema,
408
405
  modelId: z.string().min(1)
409
406
  }).strict();
410
407
  const compactionPreparedFields = compactionRequestedEventDataSchema.extend({ type: z.literal("compaction_prepared") });
@@ -431,7 +428,6 @@ const appendableConversationEventDataSchema = z.union([
431
428
  turnContextEventDataSchema,
432
429
  structuredConversationEventDataSchema,
433
430
  attachmentsDeliveredEventDataSchema,
434
- turnRoutedEventDataSchema,
435
431
  turnCompletedEventDataSchema,
436
432
  turnFailedEventDataSchema,
437
433
  subagentStartedEventDataSchema,
@@ -443,6 +439,8 @@ const appendableConversationEventDataSchema = z.union([
443
439
  const conversationEventDataSchema = z.union([
444
440
  appendableConversationEventDataSchema,
445
441
  historyReplacementEventDataSchema,
442
+ legacyHandoffEventDataSchema,
443
+ legacyTurnRoutedEventDataSchema,
446
444
  unownedMcpProviderConnectedEventDataSchema
447
445
  ]);
448
446
  /** Event type names recognized by current readers and observational queries. */
@@ -1,25 +1,23 @@
1
- import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { Na as readConversationAccessFromSql } from "./projection-7EFIqzuj.js";
3
- import { n as botConfig } from "./config-D5uUtrCP.js";
4
- import { M as SYSTEM_IDENTITY_ID, S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-WY0RYE4E.js";
5
- import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-BsYAbniN.js";
6
- import { F as findChildAgentConversationId, L as PARENT_AGENT_TARGET, N as AgentMessageTargetError, a as createAgentInvocationForMessage, j as AgentMessagePausedError, s as getActiveAgentInvocationForConversation } from "./store-DtHZviJ1.js";
7
- import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-0juF_BP0.js";
8
- import { r as appendAndEnqueueInboundMessage } from "./store-DKs1WwdB.js";
9
- import { r as enqueueAgentMessageToParent } from "./result-DrcUtFaD.js";
10
- import { i as enqueueAgentInvocation } from "./work-C5AKvXJV.js";
1
+ import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
+ import { Ma as readConversationAccessFromSql, ja as canAccessConversation } from "./projection-DWxX7pb1.js";
3
+ import { n as botConfig } from "./config-C_bmRhrJ.js";
4
+ import { F as SYSTEM_IDENTITY_ID, S as getDb, x as getConversationStore } from "./viewer-vsM8_90o.js";
5
+ import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-DwvT1BY0.js";
6
+ import { F as findChildAgentConversationId, L as PARENT_AGENT_TARGET, N as AgentMessageTargetError, a as createAgentInvocationForMessage, j as AgentMessagePausedError, s as getActiveAgentInvocationForConversation } from "./store-CO5vGjwD.js";
7
+ import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-6Tf--T7G.js";
8
+ import { r as appendAndEnqueueInboundMessage } from "./store-G3h2djJU.js";
9
+ import { r as enqueueAgentMessageToParent } from "./result-DNmOxT-N.js";
10
+ import { i as enqueueAgentInvocation } from "./work-DsoFRO_0.js";
11
11
  // src/chat/agent-invocations/top-level-message.ts
12
12
  const AGENT_MESSAGE_EVENT_NAMESPACE = "junior";
13
13
  /** Event type of a message from another top-level agent. */
14
14
  const TOP_LEVEL_AGENT_MESSAGE_EVENT_TYPE = "agent.top_level_message";
15
15
  /**
16
- * Check that a top-level agent can message another top-level agent. Both
17
- * must be in the same provider tenant and have the same scope: public or
18
- * private. To reach a private agent, the person behind the sender's Actor
19
- * must be a member of the target Conversation. A system Actor has no
20
- * person, so it reaches only public agents. Every target that the Actor
21
- * cannot see gets the same error, so the error does not show that a private
22
- * Conversation exists.
16
+ * Check that a top-level agent can message another top-level agent under
17
+ * `policies/conversation-access.md`. A private Conversation is isolated, so
18
+ * only public agents in the same provider tenant can message each other.
19
+ * Every target that the sender cannot reach gets the same error, so the
20
+ * error does not show that a private Conversation exists.
23
21
  */
24
22
  async function requireTopLevelAgentAccess(args) {
25
23
  const notReachable = new AgentMessageTargetError(`"${args.to}" is not "${PARENT_AGENT_TARGET}", a child agent of this conversation, or a top-level agent that you can message`);
@@ -28,16 +26,14 @@ async function requireTopLevelAgentAccess(args) {
28
26
  const [senderConversation, target] = await Promise.all([conversationStore.get({ conversationId: args.senderConversationId }), conversationStore.get({ conversationId: args.to })]);
29
27
  if (senderConversation?.parentConversationId) throw new AgentMessageTargetError(`"${args.to}" is not "${PARENT_AGENT_TARGET}" or a child agent of this conversation`);
30
28
  if (!target || target.parentConversationId) throw notReachable;
31
- const user = (await readActorIdentity(args.actor))?.user;
32
- const access = await readConversationAccessFromSql(getDb(), [args.senderConversationId, args.to], user);
29
+ const access = await readConversationAccessFromSql(getDb(), [args.senderConversationId, args.to]);
33
30
  const sender = access.get(args.senderConversationId);
34
31
  const receiver = access.get(args.to);
35
- if (!sender?.tenant || !receiver?.tenant || !sender.visibility || !receiver.visibility || sender.visibility === "unknown" || receiver.visibility === "unknown" || sender.tenant.provider !== receiver.tenant.provider || sender.tenant.providerTenantId !== receiver.tenant.providerTenantId) throw notReachable;
36
- const senderScope = sender.visibility === "public" ? "public" : "private";
37
- const targetScope = receiver.visibility === "public" ? "public" : "private";
38
- if (targetScope === "private" && !receiver.isParticipant) throw notReachable;
39
- if (senderScope !== targetScope) throw new AgentMessageTargetError(`"${args.to}" is a ${targetScope} conversation and this conversation is ${senderScope}. A top-level agent can message only top-level agents with the same visibility`);
40
- return targetScope;
32
+ if (!sender || !receiver || !canAccessConversation({
33
+ requester: sender,
34
+ target: receiver
35
+ })) throw notReachable;
36
+ if (sender.visibility !== "public") throw new AgentMessageTargetError(`"${args.to}" is a public conversation and this conversation is private. A private conversation cannot message another conversation`);
41
37
  }
42
38
  function renderTopLevelMessageInput(args) {
43
39
  return [
@@ -51,7 +47,7 @@ function renderTopLevelMessageInput(args) {
51
47
  "Message:",
52
48
  args.text.trim(),
53
49
  "",
54
- args.scope === "public" ? `To answer the sender, use messageAgent with to set to "${args.senderConversationId}".` : "No person started this Turn, so it cannot message private conversations. Answer in this conversation."
50
+ `To answer the sender, use messageAgent with to set to "${args.senderConversationId}".`
55
51
  ].join("\n");
56
52
  }
57
53
  /**
@@ -61,7 +57,7 @@ function renderTopLevelMessageInput(args) {
61
57
  * other running. Repeat calls with the same `messageKey` are safe.
62
58
  */
63
59
  async function enqueueTopLevelAgentMessage(args) {
64
- const scope = await requireTopLevelAgentAccess(args);
60
+ await requireTopLevelAgentAccess(args);
65
61
  const nowMs = args.nowMs ?? Date.now();
66
62
  const maxTurns = botConfig.maxConsecutiveAutomatedTurns;
67
63
  const decision = await admitAutomatedTurn({
@@ -101,7 +97,6 @@ async function enqueueTopLevelAgentMessage(args) {
101
97
  authorIdentityId: SYSTEM_IDENTITY_ID,
102
98
  metadata,
103
99
  text: renderTopLevelMessageInput({
104
- scope,
105
100
  senderConversationId: args.senderConversationId,
106
101
  summary,
107
102
  text: args.text
@@ -150,7 +145,6 @@ function bindMessageAgent(run, options) {
150
145
  });
151
146
  if (!childConversationId) {
152
147
  await enqueueTopLevelAgentMessage({
153
- actor,
154
148
  messageKey: `${run.turnId}:${call.toolCallId}`,
155
149
  queue,
156
150
  senderConversationId: run.conversationId,
package/dist/nitro.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as JuniorDashboardOptions } from "./app-BjEQwNVP.js";
1
+ import { i as JuniorDashboardOptions } from "./app-DVs6noo7.js";
2
2
  import { n as JuniorPluginSet } from "./plugins-DtmjkTza.js";
3
3
  import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
4
4
  type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
package/dist/nitro.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_ROUTE, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_RETENTION_CRON_SCHEDULE, R as getDeploymentServiceVersion, j as JUNIOR_HEARTBEAT_CRON_SCHEDULE, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE } from "./logging-cI3T1dNc.js";
2
- import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJBompdd.js";
3
- import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-hh18yCeU.js";
4
- import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-DOm9Y6qI.js";
5
- import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-CcvFQE_p.js";
1
+ import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_ROUTE, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_RETENTION_CRON_SCHEDULE, R as getDeploymentServiceVersion, j as JUNIOR_HEARTBEAT_CRON_SCHEDULE, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE } from "./logging-CkT3_Xxp.js";
2
+ import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJhGdS4c.js";
3
+ import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-CcbuLJrZ.js";
4
+ import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-HYh_JOdw.js";
5
+ import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-DlN58XeM.js";
6
6
  import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
7
7
  import path from "node:path";
8
8
  import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
@@ -39,7 +39,7 @@ function globToRegex(pattern) {
39
39
  // src/build/copy-build-content.ts
40
40
  const DASHBOARD_PACKAGE_NAME = "@sentry/junior-dashboard";
41
41
  const JUNIOR_PACKAGE_NAME = "@sentry/junior";
42
- const DASHBOARD_ASSET_NAMES = ["client.js", "tailwind.css"];
42
+ const DASHBOARD_ASSET_NAMES = ["tailwind.css"];
43
43
  /** Copy app, built-in skill, and declared plugin content into server output. */
44
44
  function copyRuntimeContent(cwd, serverRoot, packageNames) {
45
45
  copyIfExists(path.join(cwd, "app"), path.join(serverRoot, "app"));
@@ -64,6 +64,12 @@ function copyDashboardAssets(cwd, serverRoot) {
64
64
  if (!packageDir) throw new Error(`createApp({ dashboard }) requires installing "${DASHBOARD_PACKAGE_NAME}"`);
65
65
  for (const fileName of DASHBOARD_ASSET_NAMES) copyIfExists(dashboardAssetPath(packageDir, fileName), path.join(serverRoot, "node_modules", DASHBOARD_PACKAGE_NAME, "dist", fileName));
66
66
  }
67
+ /** Find the dashboard folder of content-hashed browser files that Nitro serves as static assets. */
68
+ function resolveDashboardPublicAssetsDir(cwd) {
69
+ const packageDir = resolvePackageDir(cwd, DASHBOARD_PACKAGE_NAME);
70
+ if (!packageDir) throw new Error(`createApp({ dashboard }) requires installing "${DASHBOARD_PACKAGE_NAME}"`);
71
+ return dashboardAssetPath(packageDir, "public");
72
+ }
67
73
  /** Copy extra file patterns into server output for files the bundler cannot trace. */
68
74
  function copyIncludedFiles(cwd, serverRoot, patterns) {
69
75
  if (patterns === void 0) return;
@@ -289,6 +295,12 @@ function juniorNitro(options = {}) {
289
295
  const cwd = path.resolve(options.cwd ?? nitro.options.rootDir ?? process.cwd());
290
296
  const functionMaxDurationSeconds = configureVercelDeployment(nitro, options);
291
297
  applyRolldownTreeshakeWorkaround(nitro);
298
+ if (dashboardEnabled(options.dashboard)) nitro.options.publicAssets.push({
299
+ baseURL: "/_junior/dashboard/assets",
300
+ dir: resolveDashboardPublicAssetsDir(cwd),
301
+ fallthrough: false,
302
+ maxAge: 31536e3
303
+ });
292
304
  nitro.options.traceDeps = [...nitro.options.traceDeps ?? [], ...CODEMODE_TRACE_DEPS];
293
305
  const pluginSource = options.plugins;
294
306
  const pluginModule = isPluginModuleReference(pluginSource) ? resolvePluginModule(cwd, pluginSource) : void 0;
@@ -1,5 +1,5 @@
1
- import { Dn as createUserTokenStore } from "./projection-7EFIqzuj.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-BGQK3pOa.js";
1
+ import { wn as createUserTokenStore } from "./projection-DWxX7pb1.js";
2
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Dal_unpv.js";
3
3
  import { createServer } from "node:http";
4
4
  // src/chat/local/oauth-callback-server.ts
5
5
  const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
@@ -1,4 +1,4 @@
1
- import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
1
+ import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
2
  import { randomBytes } from "node:crypto";
3
3
  import { z } from "zod";
4
4
  import { SignJWT, jwtVerify } from "jose";
@@ -1,4 +1,4 @@
1
- import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
1
+ import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
2
  import { createRequire } from "node:module";
3
3
  import path from "node:path";
4
4
  import fs, { statSync } from "node:fs";
@@ -1,4 +1,4 @@
1
- import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
1
+ import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
2
  // src/plugins.ts
3
3
  var plugins_exports = /* @__PURE__ */ __exportAll({
4
4
  defineJuniorPlugins: () => defineJuniorPlugins,