@sentry/junior 0.278.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 (86) hide show
  1. package/dist/{adapter-BXosqTMx.js → adapter-phTTgw7H.js} +1 -1
  2. package/dist/{admin-Thn7NfOi.js → admin-PcpJDugZ.js} +1 -1
  3. package/dist/{agent-invocations-D7c4BQGc.js → agent-invocations-CUg_SODU.js} +0 -1
  4. package/dist/{agent-runner-DE-43MPb.js → agent-runner-DwvT1BY0.js} +76 -35
  5. package/dist/api/schema.d.ts +2 -2
  6. package/dist/api/schema.js +5 -5
  7. package/dist/api.d.ts +1 -1
  8. package/dist/api.js +37 -367
  9. package/dist/{app-CHNS-AX2.d.ts → app-DVs6noo7.d.ts} +3 -3
  10. package/dist/app.d.ts +1 -1
  11. package/dist/app.js +460 -77
  12. package/dist/{assistant-reply-pauL6qyn.js → assistant-reply-BXfxczd7.js} +1 -1
  13. package/dist/{automation-DphoTRYl.js → automation-BehArCcq.js} +1 -1
  14. package/dist/{background-compaction-queue-CAL4A2y7.js → background-compaction-queue-CcbuLJrZ.js} +2 -2
  15. package/dist/{briefs-4fyPJJEu.js → briefs-Dd_ezwED.js} +10 -9
  16. package/dist/{catalog-runtime-BoOb5oUv.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/main.js +4 -4
  20. package/dist/cli/plugins.js +5 -5
  21. package/dist/cli/snapshot-create.js +4 -4
  22. package/dist/cli/upgrade.d.ts +1 -1
  23. package/dist/cli/upgrade.js +4 -4
  24. package/dist/{client-v_OVYuHZ.js → client-Bpxe4vKa.js} +7 -3
  25. package/dist/{config-o2jLRY5J.js → config-C_bmRhrJ.js} +2 -2
  26. package/dist/{connections-RC4NXAx8.js → connections-B2rHe5W5.js} +10 -10
  27. package/dist/{conversation-CZfyQvdm.js → conversation-CIiJtx5q.js} +6 -1
  28. package/dist/conversation-pending-messages-CnBvE6-6.js +173 -0
  29. package/dist/{conversation-privacy-C23M8KaD.js → conversation-privacy-CzOfcz0U.js} +1 -1
  30. package/dist/{credential-sync-Dd0WyNfF.js → credential-sync-Dal_unpv.js} +15 -15
  31. package/dist/{db-BjLzDJCt.d.ts → db-CyLrV9C7.d.ts} +1 -1
  32. package/dist/{executor-CJfsD0VX.js → executor-BfYH-Wws.js} +6 -4
  33. package/dist/instrumentation.d.ts +12 -0
  34. package/dist/instrumentation.js +56 -23
  35. package/dist/{logging-dFaXvBRK.js → logging-CkT3_Xxp.js} +2 -2
  36. package/dist/{message-DSwxIZet.js → message-Q5dkgaJ5.js} +10 -10
  37. package/dist/nitro.d.ts +1 -1
  38. package/dist/nitro.js +18 -6
  39. package/dist/{oauth-callback-server-CDcuCp27.js → oauth-callback-server-BDRaqe8O.js} +2 -2
  40. package/dist/{oauth-relay-C6ZAyJgf.js → oauth-relay-D0G3T16m.js} +1 -1
  41. package/dist/{package-discovery-DJBompdd.js → package-discovery-DJhGdS4c.js} +1 -1
  42. package/dist/{plugins-DOm9Y6qI.js → plugins-HYh_JOdw.js} +1 -1
  43. package/dist/{projection-BTge9wrH.js → projection-DWxX7pb1.js} +122 -44
  44. package/dist/{prompt-DDtCnlHP.js → prompt--dwus7Y-.js} +1 -1
  45. package/dist/proxy-path-BHYoKZdq.js +15 -0
  46. package/dist/{registry-Cp6CNmtP.js → registry-DnrdeO4s.js} +2 -2
  47. package/dist/{resolve-B_7h2cXx.js → resolve-C_QXfqD_.js} +3 -3
  48. package/dist/{result-5LBEfnLX.js → result-DNmOxT-N.js} +10 -10
  49. package/dist/{runner-C5-S4oq-.js → runner-zd_noJ1l.js} +11 -11
  50. package/dist/{sandbox-egress-signals-B4GehT1L.js → sandbox-egress-signals-DQjv-nbG.js} +1 -1
  51. package/dist/{schema-B5fpczDw.js → schema-CNJNzvr8.js} +5 -68
  52. package/dist/{schema-Tr484cCC.d.ts → schema-e90H5FIN.d.ts} +988 -1
  53. package/dist/sentry-BRTJqumy.js +51 -0
  54. package/dist/sentry-DrKC2NeM.d.ts +1 -0
  55. package/dist/sentry-route-name-BhwWnfqj.js +51 -0
  56. package/dist/{service-account-Cq_dLrZJ.js → service-account-BK26XlHo.js} +3 -3
  57. package/dist/{service-account-BkEv20zf.js → service-account-CCH2Hv4h.js} +3 -3
  58. package/dist/{session-stop-BsS4qFS2.js → session-stop-6Tf--T7G.js} +14 -14
  59. package/dist/{skills-M0BA0_s6.js → skills-BNrk8gi4.js} +4 -4
  60. package/dist/{spawn-BO3y7H4d.js → spawn-C75hAB9l.js} +3 -3
  61. package/dist/{stop-D5R82Wla.js → stop-RYbf7PWi.js} +516 -172
  62. package/dist/{store-BGBzQWNf.js → store-CO5vGjwD.js} +5 -5
  63. package/dist/{store-CGJZTEVz.js → store-G3h2djJU.js} +3 -3
  64. package/dist/{task-queue-UD27ei2U.js → task-queue-DlN58XeM.js} +3 -3
  65. package/dist/{task-runner-noxjOjkM.js → task-runner-B-Bdm23d.js} +21 -9
  66. package/dist/{thread-state-BSu6rM6p.js → thread-state-Cj_7Slru.js} +4 -4
  67. package/dist/{turn-failure-response-wahwyPrZ.js → turn-failure-response-CE7gaoC7.js} +7 -7
  68. package/dist/{turn-lifecycle-Bo4Trccw.js → turn-lifecycle-7sXwXLJ6.js} +1 -1
  69. package/dist/{turn-session-routing-DnSaaEpn.js → turn-session-routing-FBdaH1zf.js} +10 -10
  70. package/dist/{validation-B9-8iKyw.js → validation-DLWxEzWW.js} +2 -2
  71. package/dist/{version-C7HejFP2.js → version-DtQ8WFIZ.js} +1 -1
  72. package/dist/version.js +1 -1
  73. package/dist/{viewer-DLXajQZE.js → viewer-vsM8_90o.js} +5 -5
  74. package/dist/{work-DRGSlfia.js → work-DsoFRO_0.js} +10 -10
  75. package/dist/{worker-BGh5Dwc6.js → worker-6kZEsCXs.js} +7 -7
  76. package/migrations/0077_drop_agent_invocation_model_profile.sql +1 -0
  77. package/migrations/0078_plugin_conversation_index.sql +20 -0
  78. package/migrations/0079_conversation_event_author_index.sql +20 -0
  79. package/migrations/meta/0077_snapshot.json +4141 -0
  80. package/migrations/meta/0078_snapshot.json +4175 -0
  81. package/migrations/meta/0079_snapshot.json +4203 -0
  82. package/migrations/meta/_journal.json +21 -0
  83. package/package.json +5 -5
  84. package/dist/common-Eu6sx09c.js +0 -107
  85. package/dist/rolldown-runtime-nwUcYXjP.js +0 -27
  86. package/dist/sentry-MDkYAVPV.js +0 -23
@@ -1,7 +1,9 @@
1
- import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-dFaXvBRK.js";
2
- import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData } from "./sentry-MDkYAVPV.js";
3
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-C23M8KaD.js";
1
+ import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData } from "./sentry-BRTJqumy.js";
2
+ import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-CkT3_Xxp.js";
3
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-CzOfcz0U.js";
4
+ import { n as redactSandboxEgressProxyPath } from "./proxy-path-BHYoKZdq.js";
4
5
  import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
6
+ import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
5
7
  import { performance } from "node:perf_hooks";
6
8
  import { subscribe, unsubscribe } from "node:diagnostics_channel";
7
9
  // src/chat/pi/gateway-request-timing.ts
@@ -130,14 +132,30 @@ const URL_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
130
132
  "url.path"
131
133
  ]);
132
134
  const SLACK_FILE_HOST = "files.slack.com";
133
- const OAUTH_CALLBACK_PATH = "/api/oauth/callback/";
134
- const LOCAL_CREDENTIAL_PATH = "/api/internal/local-oauth-credentials";
135
- const SECRET_HEADER_NAMES = /* @__PURE__ */ new Set(["x-junior-local-credential-signature", "x-junior-sandbox-egress-token"]);
136
- function stripQuery(value) {
137
- const queryIndex = value.indexOf("?");
138
- return queryIndex >= 0 ? value.slice(0, queryIndex) : value;
135
+ const SECRET_HEADER_NAMES = /* @__PURE__ */ new Set([
136
+ "authorization",
137
+ "forwarded",
138
+ "referer",
139
+ "vercel-forwarded-path",
140
+ "x-hub-signature",
141
+ "x-hub-signature-256",
142
+ "x-junior-local-credential-signature",
143
+ "x-junior-sandbox-egress-token",
144
+ "x-slack-signature"
145
+ ]);
146
+ const SDK_REQUEST_HEADER_PREFIX = "http.request.header.";
147
+ const URL_SPAN_NAME = /^([A-Z]+ )((?:https?:\/\/|\/)\S*)$/;
148
+ /** Drop the query and fragment, and hide the sandbox egress credential token. */
149
+ function scrubUrl(value) {
150
+ return redactSandboxEgressProxyPath(value.split(/[?#]/, 1)[0] ?? value);
151
+ }
152
+ function scrubSpanName(name) {
153
+ const match = URL_SPAN_NAME.exec(name);
154
+ return match ? `${match[1]}${scrubUrl(match[2] ?? "")}` : name;
139
155
  }
140
156
  function isSecretHeaderAttribute(key) {
157
+ const lowerKey = key.toLowerCase();
158
+ if (lowerKey.startsWith(SDK_REQUEST_HEADER_PREFIX) && SECRET_HEADER_NAMES.has(lowerKey.slice(20).replaceAll("_", "-"))) return true;
141
159
  const normalized = key.toLowerCase().replace(/[^a-z0-9]/g, "");
142
160
  return normalized.endsWith("xjuniorlocalcredentialsignature") || normalized.endsWith("xjuniorsandboxegresstoken");
143
161
  }
@@ -160,29 +178,23 @@ function scrubSensitiveUrlAttributes(attributes) {
160
178
  if (!attributes) return;
161
179
  delete attributes["url.query"];
162
180
  delete attributes["url.fragment"];
163
- const hasLocalCredentialUrl = [...URL_ATTRIBUTE_KEYS].some((key) => {
164
- const value = attributes[key];
165
- return typeof value === "string" && value.includes(LOCAL_CREDENTIAL_PATH);
166
- });
167
- for (const key of Object.keys(attributes)) if (isSecretHeaderAttribute(key) || hasLocalCredentialUrl && key === "http.request.body.data") delete attributes[key];
181
+ delete attributes["http.request.body.data"];
182
+ for (const key of Object.keys(attributes)) if (isSecretHeaderAttribute(key)) delete attributes[key];
168
183
  if (isSlackFileRequest(attributes)) {
169
184
  scrubSlackFileUrls(attributes);
170
185
  return;
171
186
  }
172
187
  for (const key of URL_ATTRIBUTE_KEYS) {
173
188
  const value = attributes[key];
174
- if (typeof value !== "string" || !value.includes(OAUTH_CALLBACK_PATH)) continue;
175
- attributes[key] = stripQuery(value);
189
+ if (typeof value === "string") attributes[key] = scrubUrl(value);
176
190
  }
177
191
  }
178
192
  function scrubSensitiveRequest(request) {
179
193
  if (!request) return;
180
194
  const url = request.url;
181
- if (url?.includes(OAUTH_CALLBACK_PATH)) {
182
- request.url = stripQuery(url);
183
- delete request.query_string;
184
- }
185
- if (url?.includes(LOCAL_CREDENTIAL_PATH)) delete request.data;
195
+ if (url !== void 0) request.url = scrubUrl(url);
196
+ delete request.query_string;
197
+ delete request.data;
186
198
  if (!request.headers) return;
187
199
  for (const key of Object.keys(request.headers)) if (SECRET_HEADER_NAMES.has(key.toLowerCase())) delete request.headers[key];
188
200
  }
@@ -216,6 +228,7 @@ function scrubContainer(container) {
216
228
  function scrubPrivateSentryEvent(event) {
217
229
  scrubContainer(event);
218
230
  scrubSensitiveRequest(event.request);
231
+ if (event.transaction) event.transaction = scrubSpanName(event.transaction);
219
232
  scrubContainer(event.contexts?.trace);
220
233
  for (const breadcrumb of event.breadcrumbs ?? []) scrubContainer(breadcrumb);
221
234
  return event;
@@ -223,6 +236,10 @@ function scrubPrivateSentryEvent(event) {
223
236
  /** Remove private conversation payloads and boundary secrets from streamed spans. */
224
237
  function scrubPrivateSentrySpan(span) {
225
238
  scrubContainer(span);
239
+ span.name = scrubSpanName(span.name);
240
+ const segmentName = span.attributes?.["sentry.segment.name"];
241
+ if (span.attributes && typeof segmentName === "string") span.attributes["sentry.segment.name"] = scrubSpanName(segmentName);
242
+ promoteHttpRouteName(span);
226
243
  return span;
227
244
  }
228
245
  /** Remove private conversation payloads and boundary secrets from structured logs. */
@@ -302,7 +319,23 @@ function initSentry() {
302
319
  attributes: { "url.path": "/_vercel/ping" }
303
320
  }],
304
321
  dataCollection: {
305
- httpBodies: ["incomingRequest"],
322
+ httpBodies: [],
323
+ httpHeaders: { request: { allow: [
324
+ "accept",
325
+ "baggage",
326
+ "content-encoding",
327
+ "content-length",
328
+ "content-type",
329
+ "host",
330
+ "sentry-trace",
331
+ "user-agent",
332
+ "x-github-delivery",
333
+ "x-github-event",
334
+ "x-slack-request-timestamp",
335
+ "x-slack-retry",
336
+ "x-vercel-id"
337
+ ] } },
338
+ urlQueryParams: false,
306
339
  databaseQueryData: false
307
340
  },
308
341
  beforeSend: scrubPrivateSentryEvent,
@@ -313,4 +346,4 @@ function initSentry() {
313
346
  getGlobalScope().setAttributes(deploymentSpanAttributes);
314
347
  subscribeGatewayRequestTiming();
315
348
  }
316
- export { getBrowserSentryConfig, initSentry };
349
+ export { getBrowserSentryConfig, initSentry, nameRequestRoute, routeNameMiddleware };
@@ -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-C7HejFP2.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,13 +1,13 @@
1
- import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { Aa as canAccessConversation, ja as readConversationAccessFromSql } from "./projection-BTge9wrH.js";
3
- import { n as botConfig } from "./config-o2jLRY5J.js";
4
- import { F as SYSTEM_IDENTITY_ID, S as getDb, x as getConversationStore } from "./viewer-DLXajQZE.js";
5
- import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-DE-43MPb.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-BGBzQWNf.js";
7
- import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-BsS4qFS2.js";
8
- import { r as appendAndEnqueueInboundMessage } from "./store-CGJZTEVz.js";
9
- import { r as enqueueAgentMessageToParent } from "./result-5LBEfnLX.js";
10
- import { i as enqueueAgentInvocation } from "./work-DRGSlfia.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. */
package/dist/nitro.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as JuniorDashboardOptions } from "./app-CHNS-AX2.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-dFaXvBRK.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-CAL4A2y7.js";
4
- import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-DOm9Y6qI.js";
5
- import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-UD27ei2U.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 { wn as createUserTokenStore } from "./projection-BTge9wrH.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Dd0WyNfF.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,