@sentry/junior 0.278.0 → 0.280.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 (90) hide show
  1. package/dist/{actor-B4DYygOB.js → actor-6jsm_v96.js} +1 -1
  2. package/dist/{adapter-BXosqTMx.js → adapter-DVN3iwf9.js} +1 -1
  3. package/dist/{admin-Thn7NfOi.js → admin-Q_UI--9W.js} +1 -1
  4. package/dist/{agent-runner-DE-43MPb.js → agent-runner-_PYLv4Qo.js} +79 -39
  5. package/dist/api/schema.d.ts +2 -2
  6. package/dist/api/schema.js +7 -7
  7. package/dist/api.d.ts +3 -3
  8. package/dist/api.js +184 -418
  9. package/dist/{app-CHNS-AX2.d.ts → app-CL2zzzE0.d.ts} +5 -5
  10. package/dist/app.d.ts +1 -1
  11. package/dist/app.js +462 -80
  12. package/dist/{assistant-reply-pauL6qyn.js → assistant-reply-DbebsAxi.js} +1 -1
  13. package/dist/{automation-DphoTRYl.js → automation-CPqRFjIa.js} +2 -2
  14. package/dist/{background-compaction-queue-CAL4A2y7.js → background-compaction-queue-B9lmh8Ml.js} +3 -3
  15. package/dist/{briefs-4fyPJJEu.js → briefs-Dej7V0Bz.js} +11 -10
  16. package/dist/{catalog-runtime-BoOb5oUv.js → catalog-runtime-DpN0sWQ6.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-h2A2ZPzY.js} +7 -3
  25. package/dist/{config-o2jLRY5J.js → config-CusBFORe.js} +3 -3
  26. package/dist/{connections-RC4NXAx8.js → connections-C4h6mGha.js} +11 -11
  27. package/dist/{conversation-CZfyQvdm.js → conversation-DExTZw8B.js} +22 -7
  28. package/dist/conversation-pending-messages-Dgz6hrJs.js +173 -0
  29. package/dist/{conversation-privacy-C23M8KaD.js → conversation-privacy-2cm6OpNg.js} +1 -1
  30. package/dist/{credential-sync-Dd0WyNfF.js → credential-sync-DK06Jgt-.js} +17 -17
  31. package/dist/{db-BjLzDJCt.d.ts → db-Dsvk1Tp1.d.ts} +2 -2
  32. package/dist/{executor-CJfsD0VX.js → executor-Cmr0J8W3.js} +152 -7
  33. package/dist/instrumentation.d.ts +12 -0
  34. package/dist/instrumentation.js +56 -23
  35. package/dist/{logging-dFaXvBRK.js → logging-CGnh65_X.js} +2 -2
  36. package/dist/{media-DTAA8Qs_.js → media-Dq9_svfQ.js} +1 -1
  37. package/dist/{message-DSwxIZet.js → message-RpAnqHPY.js} +10 -10
  38. package/dist/nitro.d.ts +1 -1
  39. package/dist/nitro.js +18 -6
  40. package/dist/{oauth-callback-server-CDcuCp27.js → oauth-callback-server-BBnhVKuX.js} +2 -2
  41. package/dist/{oauth-relay-C6ZAyJgf.js → oauth-relay-D6xxVywK.js} +2 -2
  42. package/dist/{package-discovery-DJBompdd.js → package-discovery-DJhGdS4c.js} +1 -1
  43. package/dist/{plugins-DOm9Y6qI.js → plugins-HYh_JOdw.js} +1 -1
  44. package/dist/{projection-BTge9wrH.js → projection-C1MghKyI.js} +257 -137
  45. package/dist/{prompt-DDtCnlHP.js → prompt-BcHg-BMy.js} +2 -2
  46. package/dist/proxy-path-BHYoKZdq.js +15 -0
  47. package/dist/{queue-C37RbDVc.d.ts → queue-CZyYgPF0.d.ts} +1 -1
  48. package/dist/{registry-Cp6CNmtP.js → registry-DR7DjX9H.js} +4 -4
  49. package/dist/{reporting-window-DgHgwQB3.js → reporting-window-B-QP9zX1.js} +28 -2
  50. package/dist/{resolve-B_7h2cXx.js → resolve-0Ful4oDv.js} +4 -4
  51. package/dist/{result-5LBEfnLX.js → result-Dd9kCuQ-.js} +12 -12
  52. package/dist/{runner-C5-S4oq-.js → runner-yiY8gUUu.js} +11 -11
  53. package/dist/{sandbox-egress-signals-B4GehT1L.js → sandbox-egress-signals-BzQVHCMz.js} +1 -1
  54. package/dist/{schema-Tr484cCC.d.ts → schema-BkMmF552.d.ts} +1232 -222
  55. package/dist/{schema-B5fpczDw.js → schema-C5pEgfHc.js} +30 -70
  56. package/dist/sentry-BRTJqumy.js +51 -0
  57. package/dist/sentry-DrKC2NeM.d.ts +1 -0
  58. package/dist/sentry-route-name-BhwWnfqj.js +51 -0
  59. package/dist/{service-account-Cq_dLrZJ.js → service-account-Cu7HFLZQ.js} +3 -3
  60. package/dist/{service-account-BkEv20zf.js → service-account-PIMpWZHF.js} +3 -3
  61. package/dist/{session-stop-BsS4qFS2.js → session-stop-CDEMsNtv.js} +14 -15
  62. package/dist/{skills-M0BA0_s6.js → skills-B2xIoe0f.js} +5 -5
  63. package/dist/{spawn-BO3y7H4d.js → spawn-C0DySQRV.js} +3 -3
  64. package/dist/{stop-D5R82Wla.js → stop-Dj5-nrAo.js} +740 -285
  65. package/dist/{store-BGBzQWNf.js → store-Dlio-o6u.js} +6 -6
  66. package/dist/{store-CGJZTEVz.js → store-QzOfDwKA.js} +3 -3
  67. package/dist/{task-queue-UD27ei2U.js → task-queue-Cp1V_XW3.js} +4 -4
  68. package/dist/{task-runner-noxjOjkM.js → task-runner-CQkkUj3o.js} +23 -11
  69. package/dist/{thread-state-BSu6rM6p.js → thread-state-Bn87cfzE.js} +4 -4
  70. package/dist/{turn-failure-response-wahwyPrZ.js → turn-failure-response-CQebxByj.js} +8 -8
  71. package/dist/{turn-lifecycle-Bo4Trccw.js → turn-lifecycle-CJJsOhXB.js} +1 -1
  72. package/dist/{turn-session-routing-DnSaaEpn.js → turn-session-routing-bmG330Cf.js} +10 -11
  73. package/dist/{validation-B9-8iKyw.js → validation-D1wcf7hp.js} +2 -2
  74. package/dist/{version-C7HejFP2.js → version-BeHSXUK6.js} +1 -1
  75. package/dist/version.js +1 -1
  76. package/dist/{viewer-DLXajQZE.js → viewer-BZ0Hp5Nb.js} +6 -7
  77. package/dist/{work-DRGSlfia.js → work-BTcCIbWu.js} +12 -12
  78. package/dist/{worker-BGh5Dwc6.js → worker-D3fDK6zc.js} +7 -7
  79. package/migrations/0077_drop_agent_invocation_model_profile.sql +1 -0
  80. package/migrations/0078_plugin_conversation_index.sql +20 -0
  81. package/migrations/0079_conversation_event_author_index.sql +20 -0
  82. package/migrations/meta/0077_snapshot.json +4141 -0
  83. package/migrations/meta/0078_snapshot.json +4175 -0
  84. package/migrations/meta/0079_snapshot.json +4203 -0
  85. package/migrations/meta/_journal.json +21 -0
  86. package/package.json +4 -4
  87. package/dist/agent-invocations-D7c4BQGc.js +0 -182
  88. package/dist/common-Eu6sx09c.js +0 -107
  89. package/dist/rolldown-runtime-nwUcYXjP.js +0 -27
  90. package/dist/sentry-MDkYAVPV.js +0 -23
@@ -1,10 +1,24 @@
1
- import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-D7c4BQGc.js";
2
- import { E as conversationChildAgentTotalsSchema, L as messageAttachmentSchema, O as reviewItemChangeRecordSchema, o as conversationAuxiliaryCostsSchema, r as actorIdentitySchema, x as conversationUsageSchema, y as conversationSummaryReportSchema } from "./conversation-CZfyQvdm.js";
3
- import { i as fillUtcHours, r as fillUtcDays, s as sumUtcHoursIntoSixHours, y as userInputRequestSchema } from "./reporting-window-DgHgwQB3.js";
4
- import "./automation-DphoTRYl.js";
5
- import "./common-Eu6sx09c.js";
6
- import { z } from "zod";
1
+ import { E as conversationChildAgentTotalsSchema, o as conversationAuxiliaryCostsSchema, r as actorIdentitySchema, x as conversationUsageSchema, y as conversationSummaryReportSchema } from "./conversation-DExTZw8B.js";
2
+ import { C as AGENT_INVOCATION_STATUSES, i as fillUtcHours, r as fillUtcDays, s as sumUtcHoursIntoSixHours, y as userInputRequestSchema } from "./reporting-window-B-QP9zX1.js";
3
+ import "./automation-CPqRFjIa.js";
4
+ import "./conversation-pending-messages-Dgz6hrJs.js";
5
+ import * as z from "zod";
7
6
  import { codeChangeStateSchema, eventMatchSchema } from "@sentry/junior-plugin-api";
7
+ // src/api/schema/conversation-catch-up.ts
8
+ /**
9
+ * The unread rows to summarize: every event after `afterSeq`, through
10
+ * `throughSeq`. The dashboard sends the range from when the Conversation
11
+ * opened, so rows that arrive later do not change the summary.
12
+ */
13
+ const conversationCatchUpBodySchema = z.object({
14
+ afterSeq: z.number().int().nonnegative(),
15
+ throughSeq: z.number().int().nonnegative()
16
+ }).strict().refine((range) => range.throughSeq > range.afterSeq, { message: "throughSeq must be after afterSeq." });
17
+ /** A short summary of the unread rows, and what waits on the reader. */
18
+ const conversationCatchUpSchema = z.object({
19
+ needsYou: z.string().min(1).optional(),
20
+ summary: z.string().min(1)
21
+ }).strict();
8
22
  // src/api/schema/conversation-pin.ts
9
23
  /** Pin or unpin one Conversation for the signed-in viewer. */
10
24
  const pinConversationBodySchema = z.object({ pinned: z.boolean() }).strict();
@@ -20,69 +34,6 @@ const archiveConversationResponseSchema = z.object({ archivedAt: z.string().date
20
34
  const conversationAutoArchiveSchema = z.object({ autoArchive: z.boolean() }).strict();
21
35
  /** Result of archiving all of the viewer's done conversations once. */
22
36
  const archiveDoneConversationsResponseSchema = z.object({ archived: z.number().int().nonnegative() }).strict();
23
- // src/api/schema/conversation-pending-messages.ts
24
- /** Mailbox delivery mode for one accepted inbound message. */
25
- const conversationPendingMessageDeliverySchema = z.enum(["defer", "interrupt"]);
26
- /** One accepted mailbox message that has not reached durable history yet. */
27
- const conversationPendingMessageSchema = z.object({
28
- actorIdentity: actorIdentitySchema.optional(),
29
- /** Identity id of the author. Detail `authors` maps it to the person. */
30
- actorIdentityId: z.string().min(1).optional(),
31
- createdAt: z.string().datetime(),
32
- delivery: conversationPendingMessageDeliverySchema,
33
- inboundMessageId: z.string().min(1),
34
- messageId: z.string().min(1),
35
- receivedAt: z.string().datetime(),
36
- role: z.literal("user"),
37
- source: z.enum(["slack", "web"]),
38
- text: z.string().optional(),
39
- /** People mentioned in the text, resolved at read time. */
40
- mentions: z.array(actorIdentitySchema).optional(),
41
- attachments: z.array(messageAttachmentSchema).optional(),
42
- /** Review item change that this Message records. */
43
- reviewItemChange: reviewItemChangeRecordSchema.optional(),
44
- redacted: z.literal(true).optional()
45
- }).strict().superRefine((data, context) => {
46
- if (data.text === void 0 === (data.redacted !== true)) context.addIssue({
47
- code: "custom",
48
- message: "pending message content must be text or explicitly redacted"
49
- });
50
- if (data.redacted && (data.actorIdentity || data.attachments || data.mentions || data.reviewItemChange)) context.addIssue({
51
- code: "custom",
52
- message: "redacted pending messages must not expose actor identity, attachments, mentions, or a review item"
53
- });
54
- });
55
- /** Participant-only authorization prompt for a parked web turn. */
56
- const conversationPendingAuthorizationSchema = z.object({
57
- authorizationUrl: z.string().url(),
58
- completionText: z.string().min(1),
59
- label: z.string().min(1)
60
- }).strict();
61
- /** Bounded mailbox snapshot for one conversation transcript. */
62
- const conversationPendingMessagesReportSchema = z.object({
63
- authorization: conversationPendingAuthorizationSchema.optional(),
64
- conversationId: z.string().min(1),
65
- generatedAt: z.string().datetime(),
66
- messages: z.array(conversationPendingMessageSchema)
67
- }).strict();
68
- /** Optional filters for cancelling accepted mailbox rows. */
69
- const cancelConversationPendingMessagesBodySchema = z.object({
70
- inboundMessageIds: z.array(z.string().min(1)).min(1).optional(),
71
- receivedBefore: z.string().datetime().optional()
72
- }).strict();
73
- /** Result of cancelling accepted human-facing mailbox rows. */
74
- const cancelConversationPendingMessagesResponseSchema = z.object({
75
- cancelledCount: z.number().int().nonnegative(),
76
- cancelledInboundMessageIds: z.array(z.string().min(1)),
77
- conversationId: z.string().min(1)
78
- }).strict();
79
- /** Queued web messages that the viewer wants Junior to read now. */
80
- const steerConversationPendingMessagesBodySchema = z.object({ inboundMessageIds: z.array(z.string().min(1)).min(1) }).strict();
81
- /** Result of steering queued web messages into the conversation. */
82
- const steerConversationPendingMessagesResponseSchema = z.object({
83
- conversationId: z.string().min(1),
84
- steeredInboundMessageIds: z.array(z.string().min(1))
85
- }).strict();
86
37
  // src/api/schema/conversation-stats.ts
87
38
  const conversationStatsItemSchema = z.object({
88
39
  active: z.number(),
@@ -396,6 +347,15 @@ function activitySixHours(hours, nowMs) {
396
347
  nowMs
397
348
  });
398
349
  }
350
+ // src/db/schema/destination-kind.ts
351
+ const juniorDestinationKindSchema = z.enum([
352
+ "channel",
353
+ "dm",
354
+ "group",
355
+ "local_conversation",
356
+ "thread",
357
+ "web_session"
358
+ ]);
399
359
  // src/api/schema/location.ts
400
360
  const locationParamsSchema = z.object({ locationId: z.string().min(1) }).strict();
401
361
  const locationSummaryReportSchema = conversationStatsItemSchema.extend({
@@ -712,4 +672,4 @@ const statsReportSchema = z.object({
712
672
  windowEnd: z.string(),
713
673
  windowStart: z.string()
714
674
  }).strict();
715
- export { codeRepositorySummarySchema as $, avatarParamsSchema as A, dailyConversationActivitySchema as B, createdPersonalTokenSchema as C, revokePersonalTokenResponseSchema as D, personalTokenParamsSchema as E, locationDirectoryReportSchema as F, startConnectionResponseSchema as G, connectionParamsSchema as H, locationParamsSchema as I, codeChangeSummarySchema as J, codeActivityDaySchema as K, activityDays as L, personalSpendReportSchema as M, locationActivityDayReportSchema as N, actorDirectoryReportSchema as O, locationDetailReportSchema as P, codeRepositoryReportSchema as Q, activityHours as R, createPersonalTokenBodySchema as S, personalTokenMetadataSchema as T, connectionSchema as U, connectionListSchema as V, disconnectConnectionResponseSchema as W, codePersonReportSchema as X, codeOverviewReportSchema as Y, codeRepositoryParamsSchema as Z, disconnectServiceAccountResponseSchema as _, conversationAutoArchiveSchema as _t, workspaceBodySchema as a, conversationStatsReportSchema as at, serviceAccountSchema as b, workspaceRepoSchema as c, conversationPendingAuthorizationSchema as ct, reviewItemCountSchema as d, conversationPendingMessagesReportSchema as dt, conversationWatchSchema as et, reviewItemListQuerySchema as f, steerConversationPendingMessagesBodySchema as ft, reviewItemWaitingConversationsSchema as g, archiveDoneConversationsResponseSchema as gt, reviewItemSchema as h, archiveConversationResponseSchema as ht, deleteWorkspaceResponseSchema as i, stopConversationTurnResponseSchema as it, personParamsSchema as j, actorProfileReportSchema as k, workspaceSchema as l, conversationPendingMessageDeliverySchema as lt, reviewItemParamsSchema as m, archiveConversationBodySchema as mt, statsReportSchema as n, conversationChildAgentSchema as nt, workspaceListSchema as o, cancelConversationPendingMessagesBodySchema as ot, reviewItemListSchema as p, steerConversationPendingMessagesResponseSchema as pt, codeChangeSummaryReportSchema as q, baselineSnapshotSchema as r, conversationChildAgentsReportSchema as rt, workspaceParamsSchema as s, cancelConversationPendingMessagesResponseSchema as st, statSchema as t, conversationWatchesReportSchema as tt, reviewItemActionSchema as u, conversationPendingMessageSchema as ut, serviceAccountListSchema as v, pinConversationBodySchema as vt, personalTokenListSchema as w, startServiceAccountSignInResponseSchema as x, serviceAccountParamsSchema as y, pinConversationResponseSchema as yt, activitySixHours as z };
675
+ export { codeRepositorySummarySchema as $, avatarParamsSchema as A, dailyConversationActivitySchema as B, createdPersonalTokenSchema as C, revokePersonalTokenResponseSchema as D, personalTokenParamsSchema as E, locationDirectoryReportSchema as F, startConnectionResponseSchema as G, connectionParamsSchema as H, locationParamsSchema as I, codeChangeSummarySchema as J, codeActivityDaySchema as K, activityDays as L, personalSpendReportSchema as M, locationActivityDayReportSchema as N, actorDirectoryReportSchema as O, locationDetailReportSchema as P, codeRepositoryReportSchema as Q, activityHours as R, createPersonalTokenBodySchema as S, personalTokenMetadataSchema as T, connectionSchema as U, connectionListSchema as V, disconnectConnectionResponseSchema as W, codePersonReportSchema as X, codeOverviewReportSchema as Y, codeRepositoryParamsSchema as Z, disconnectServiceAccountResponseSchema as _, workspaceBodySchema as a, conversationStatsReportSchema as at, serviceAccountSchema as b, workspaceRepoSchema as c, archiveDoneConversationsResponseSchema as ct, reviewItemCountSchema as d, pinConversationResponseSchema as dt, conversationWatchSchema as et, reviewItemListQuerySchema as f, conversationCatchUpBodySchema as ft, reviewItemWaitingConversationsSchema as g, reviewItemSchema as h, deleteWorkspaceResponseSchema as i, stopConversationTurnResponseSchema as it, personParamsSchema as j, actorProfileReportSchema as k, workspaceSchema as l, conversationAutoArchiveSchema as lt, reviewItemParamsSchema as m, statsReportSchema as n, conversationChildAgentSchema as nt, workspaceListSchema as o, archiveConversationBodySchema as ot, reviewItemListSchema as p, conversationCatchUpSchema as pt, codeChangeSummaryReportSchema as q, baselineSnapshotSchema as r, conversationChildAgentsReportSchema as rt, workspaceParamsSchema as s, archiveConversationResponseSchema as st, statSchema as t, conversationWatchesReportSchema as tt, reviewItemActionSchema as u, pinConversationBodySchema as ut, serviceAccountListSchema as v, personalTokenListSchema as w, startServiceAccountSignInResponseSchema as x, serviceAccountParamsSchema as y, activitySixHours as z };
@@ -0,0 +1,51 @@
1
+ import "node:module";
2
+ import { captureException, captureMessage, continueTrace, flush, getActiveSpan, getClient, getGlobalScope, getTraceData, init, logger, setTag, setUser, spanToJSON, startInactiveSpan, startSpan, startSpanManual, withActiveSpan, withScope } from "@sentry/node";
3
+ // \0rolldown/runtime.js
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __exportAll = (all, no_symbols) => {
9
+ let target = {};
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
15
+ return target;
16
+ };
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
19
+ key = keys[i];
20
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
21
+ get: ((k) => from[k]).bind(null, key),
22
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
23
+ });
24
+ }
25
+ return to;
26
+ };
27
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
28
+ // src/chat/sentry.ts
29
+ var sentry_exports = /* @__PURE__ */ __exportAll({
30
+ captureException: () => captureException,
31
+ captureMessage: () => captureMessage,
32
+ continueTrace: () => continueTrace,
33
+ flush: () => flush,
34
+ getActiveSpan: () => getActiveSpan,
35
+ getClient: () => getClient,
36
+ getGlobalScope: () => getGlobalScope,
37
+ getTraceData: () => getTraceData,
38
+ init: () => init,
39
+ logger: () => logger,
40
+ setTag: () => setTag,
41
+ setUser: () => setUser,
42
+ spanToJSON: () => spanToJSON,
43
+ startInactiveSpan: () => startInactiveSpan,
44
+ startSpan: () => startSpan,
45
+ startSpanManual: () => startSpanManual,
46
+ withActiveSpan: () => withActiveSpan,
47
+ withScope: () => withScope
48
+ });
49
+ import * as import__sentry_node from "@sentry/node";
50
+ __reExport(sentry_exports, import__sentry_node);
51
+ export { withScope as _, getClient as a, init as c, setTag as d, setUser as f, withActiveSpan as g, startSpan as h, getActiveSpan as i, logger as l, startInactiveSpan as m, captureMessage as n, getGlobalScope as o, spanToJSON as p, continueTrace as r, getTraceData as s, captureException as t, sentry_exports as u, __exportAll as v };
@@ -0,0 +1 @@
1
+ import "@sentry/node";
@@ -0,0 +1,51 @@
1
+ import { i as getActiveSpan, u as sentry_exports } from "./sentry-BRTJqumy.js";
2
+ import { matchedRoutes } from "hono/route";
3
+ // src/chat/sentry-route-name.ts
4
+ const HTTP_ROUTE_ATTRIBUTE = "app.http.route";
5
+ const COMPOSED_HANDLER = "__COMPOSED_HANDLER";
6
+ /**
7
+ * Name the current request span after a route pattern. Spans that end during
8
+ * the request take this name as their segment name.
9
+ */
10
+ function nameRequestRoute(method, route) {
11
+ const activeSpan = getActiveSpan();
12
+ if (!activeSpan) return;
13
+ const rootSpan = sentry_exports.getRootSpan(activeSpan);
14
+ const name = `${method} ${route}`;
15
+ sentry_exports.updateSpanName(rootSpan, name);
16
+ rootSpan.setAttribute(HTTP_ROUTE_ATTRIBUTE, route);
17
+ sentry_exports.getIsolationScope().setTransactionName(name);
18
+ }
19
+ function isMiddleware(handler) {
20
+ if (typeof handler !== "function") return false;
21
+ const composed = COMPOSED_HANDLER in handler ? handler[COMPOSED_HANDLER] : void 0;
22
+ return (typeof composed === "function" ? composed : handler).length >= 2;
23
+ }
24
+ /**
25
+ * Name the request span after the first route handler that matches in this
26
+ * app. Register it first in an app that another app calls through `fetch()`.
27
+ */
28
+ function routeNameMiddleware() {
29
+ return async function routeName(c, next) {
30
+ const route = matchedRoutes(c).find(({ handler }) => !isMiddleware(handler));
31
+ if (route) nameRequestRoute(c.req.method, route.path);
32
+ await next();
33
+ };
34
+ }
35
+ /**
36
+ * Restore the inner route name on a sent `http.server` segment. The outer
37
+ * Hono app renames the span to its own pattern after the inner app returns.
38
+ */
39
+ function promoteHttpRouteName(span) {
40
+ const { attributes } = span;
41
+ const route = attributes[HTTP_ROUTE_ATTRIBUTE];
42
+ const method = attributes["http.request.method"];
43
+ if (!span.is_segment || attributes["sentry.op"] !== "http.server") return;
44
+ if (typeof route !== "string" || typeof method !== "string") return;
45
+ const name = `${method} ${route}`;
46
+ span.name = name;
47
+ attributes["http.route"] = route;
48
+ attributes["sentry.segment.name"] = name;
49
+ delete attributes[HTTP_ROUTE_ATTRIBUTE];
50
+ }
51
+ export { promoteHttpRouteName as n, routeNameMiddleware as r, nameRequestRoute as t };
@@ -1,6 +1,6 @@
1
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BoOb5oUv.js";
2
- import { t as disconnectStateAdapter } from "./adapter-BXosqTMx.js";
3
- import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-BkEv20zf.js";
1
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-DpN0sWQ6.js";
2
+ import { t as disconnectStateAdapter } from "./adapter-DVN3iwf9.js";
3
+ import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-PIMpWZHF.js";
4
4
  import { CLI_USAGE } from "./cli/run.js";
5
5
  import { createServer } from "node:http";
6
6
  // src/cli/service-account.ts
@@ -1,7 +1,7 @@
1
- import { W as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-dFaXvBRK.js";
2
- import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-Cp6CNmtP.js";
1
+ import { W as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-CGnh65_X.js";
2
+ import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-DR7DjX9H.js";
3
3
  import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS } from "./locks-D-0h111u.js";
4
- import { r as getStateAdapter } from "./adapter-BXosqTMx.js";
4
+ import { r as getStateAdapter } from "./adapter-DVN3iwf9.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { randomUUID } from "node:crypto";
7
7
  import { UnauthorizedError, auth } from "@modelcontextprotocol/sdk/client/auth.js";
@@ -1,18 +1,17 @@
1
- import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { Br as getDashboardObjectIconLink, Ln as getPlugins, Lr as verifyTimerWatchCredentialSubject, N as normalizeConversationText, Nn as getPluginSlackConversationLink, Rr as JUNIOR_THREAD_STATE_TTL_MS, Wr as ToolInputError, Zt as isAssistantMessage, _i as escapeSlackMrkdwnText, en as isToolResultError, ki as postSlackMessage, nn as normalizeToolNameFromResult, qa as buildSentryConversationUrl, tn as isToolResultMessage, vi as formatSlackLink, yi as normalizeSlackReplyMarkdown, zr as getDashboardConversationLink } from "./projection-BTge9wrH.js";
3
- import { n as botConfig } from "./config-o2jLRY5J.js";
4
- import { h as logWarn, m as logInfo, p as logException } from "./logging-dFaXvBRK.js";
5
- import { C as getSqlExecutor, F as SYSTEM_IDENTITY_ID, J as nextDetailVersion, x as getConversationStore } from "./viewer-DLXajQZE.js";
6
- import { s as juniorConversations } from "./agent-invocations-D7c4BQGc.js";
7
- import "./executor-CJfsD0VX.js";
8
- import { h as credentialSubjectSchema } from "./registry-Cp6CNmtP.js";
9
- import { r as getStateAdapter } from "./adapter-BXosqTMx.js";
10
- import { R as readMessageAttachments } from "./conversation-CZfyQvdm.js";
11
- import { r as EVENT_AUTHOR_ID } from "./prompt-DDtCnlHP.js";
12
- import { a as QUIET_MARKER, r as sanitizeAssistantText } from "./assistant-reply-pauL6qyn.js";
13
- import { r as appendAndEnqueueInboundMessage } from "./store-CGJZTEVz.js";
14
- import { dt as CORE_EVENT_NAMESPACE, ht as eventGuidance, mt as eventCatalogEntry } from "./turn-session-routing-DnSaaEpn.js";
15
- import { z } from "zod";
1
+ import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
+ import { Br as getDashboardObjectIconLink, Ln as getPlugins, Lr as verifyTimerWatchCredentialSubject, N as normalizeConversationText, Nn as getPluginSlackConversationLink, Rr as JUNIOR_THREAD_STATE_TTL_MS, Wr as ToolInputError, Za as buildSentryConversationUrl, Zt as isAssistantMessage, _i as escapeSlackMrkdwnText, en as isToolResultError, ki as postSlackMessage, nn as normalizeToolNameFromResult, tn as isToolResultMessage, vi as formatSlackLink, yi as normalizeSlackReplyMarkdown, zr as getDashboardConversationLink } from "./projection-C1MghKyI.js";
3
+ import { n as botConfig } from "./config-CusBFORe.js";
4
+ import { h as logWarn, m as logInfo, p as logException } from "./logging-CGnh65_X.js";
5
+ import { C as getSqlExecutor, F as SYSTEM_IDENTITY_ID, J as nextDetailVersion, x as getConversationStore } from "./viewer-BZ0Hp5Nb.js";
6
+ import { k as juniorConversations } from "./executor-Cmr0J8W3.js";
7
+ import { h as credentialSubjectSchema } from "./registry-DR7DjX9H.js";
8
+ import { r as getStateAdapter } from "./adapter-DVN3iwf9.js";
9
+ import { R as readMessageAttachments } from "./conversation-DExTZw8B.js";
10
+ import { r as EVENT_AUTHOR_ID } from "./prompt-BcHg-BMy.js";
11
+ import { a as QUIET_MARKER, r as sanitizeAssistantText } from "./assistant-reply-DbebsAxi.js";
12
+ import { r as appendAndEnqueueInboundMessage } from "./store-QzOfDwKA.js";
13
+ import { dt as CORE_EVENT_NAMESPACE, ht as eventGuidance, mt as eventCatalogEntry } from "./turn-session-routing-bmG330Cf.js";
14
+ import * as z from "zod";
16
15
  import { eq, inArray } from "drizzle-orm";
17
16
  import { agentEventKeys, eventMatchFieldsSchema, objectFactFields, objectPresentation, objectTypeSchema } from "@sentry/junior-plugin-api";
18
17
  // src/chat/automation-result.ts
@@ -1,9 +1,9 @@
1
- import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { h as logWarn } from "./logging-dFaXvBRK.js";
3
- import { s as skillRoots } from "./package-discovery-DJBompdd.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BoOb5oUv.js";
1
+ import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
+ import { h as logWarn } from "./logging-CGnh65_X.js";
3
+ import { s as skillRoots } from "./package-discovery-DJhGdS4c.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-DpN0sWQ6.js";
5
5
  import path from "node:path";
6
- import { z } from "zod";
6
+ import * as z from "zod";
7
7
  import fs from "node:fs/promises";
8
8
  import { parse } from "yaml";
9
9
  // src/chat/skills.ts
@@ -1,6 +1,6 @@
1
- import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-DE-43MPb.js";
3
- import { n as createAndEnqueueAgentInvocation } from "./work-DRGSlfia.js";
1
+ import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
+ import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-_PYLv4Qo.js";
3
+ import { n as createAndEnqueueAgentInvocation } from "./work-BTcCIbWu.js";
4
4
  // src/chat/agent-invocations/spawn.ts
5
5
  var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
6
6
  /** Bind a Run's Actor and credentials to new Agent invocations. */