@sentry/junior 0.309.0 → 0.311.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 (117) hide show
  1. package/dist/adapter-B1wujchl.js +259 -0
  2. package/dist/{adapter-context-1YUbMpD3.js → adapter-context-G2M0y6rP.js} +2 -2
  3. package/dist/{admin-u30A8TcD.js → admin-DCiBhUT1.js} +1 -2
  4. package/dist/{agent-runner-sJLhgPQV.js → agent-runner-BVHPUIc8.js} +695 -1817
  5. package/dist/api/schema.d.ts +2 -2
  6. package/dist/api/schema.js +8 -7
  7. package/dist/api.d.ts +21 -3
  8. package/dist/api.js +1479 -372
  9. package/dist/{app-B_7Wn0en.d.ts → app-Cw5Vy6H6.d.ts} +14 -3
  10. package/dist/app.d.ts +2 -2
  11. package/dist/app.js +233 -506
  12. package/dist/{background-compaction-queue-CUJXVKG3.js → background-compaction-queue-CJDnWVOJ.js} +4 -4
  13. package/dist/{briefs-BHi70IR5.js → briefs-BDjnug6Y.js} +3 -3
  14. package/dist/{catalog-runtime-Chc_IP2o.js → catalog-runtime-DMY3VV-D.js} +1 -1
  15. package/dist/cli/chat.js +16 -16
  16. package/dist/cli/check.js +23 -29
  17. package/dist/cli/init.js +1 -6
  18. package/dist/cli/main.js +3 -3
  19. package/dist/cli/plugins.js +8 -7
  20. package/dist/cli/snapshot-create.js +5 -5
  21. package/dist/cli/upgrade.d.ts +1 -1
  22. package/dist/cli/upgrade.js +3 -3
  23. package/dist/{config-BIyIdTtA.js → config-BrXDQefC.js} +239 -5
  24. package/dist/{continue-in-slack-BQJBfiQh.js → continue-in-slack-DNXSC9So.js} +6 -5
  25. package/dist/{conversation-CzrLhdHG.js → conversation-ca__NDQW.js} +48 -9
  26. package/dist/{conversation-feed-B9e3_gxz.js → conversation-feed-DkinDu5o.js} +15 -6
  27. package/dist/{conversation-privacy-CkTW29hd.js → conversation-privacy-DxttrKb9.js} +1 -1
  28. package/dist/{conversation-turn-CZaYQUum.js → conversation-turn-DWw7Xhdr.js} +42 -39
  29. package/dist/{credential-sync-58m_CyIJ.js → credential-sync-Bk8wGb8Y.js} +15 -16
  30. package/dist/{db-B4Hjxr-u.d.ts → db-7ETESH44.d.ts} +3 -1
  31. package/dist/{db-CFUpEZi9.js → db-DTxzH7u5.js} +1618 -1041
  32. package/dist/{executor-DXL0O0MV.js → executor-DqTiYj9S.js} +454 -96
  33. package/dist/{history-N7IVbUom.js → history-CYstOMKX.js} +6 -0
  34. package/dist/{html-CaBu2VbT.js → html-B9Sl4Axb.js} +6 -6
  35. package/dist/{install-DhTBUUov.js → install-Sg4ePfLl.js} +2 -2
  36. package/dist/instrumentation.js +3 -3
  37. package/dist/{lineage-CxtOI2_p.js → lineage-BHAMpNKr.js} +2 -2
  38. package/dist/{logging-BNUovdcX.js → logging-FjclQsXu.js} +47 -9
  39. package/dist/{message-DcUsS2vg.js → message-CJ7_RL50.js} +5 -8
  40. package/dist/{model-input-o3rEqgwM.js → model-input-CMLh4Cwq.js} +3 -3
  41. package/dist/nitro.d.ts +1 -1
  42. package/dist/nitro.js +3 -3
  43. package/dist/{oauth-callback-server-1Fizd1EM.js → oauth-callback-server-RVcbiDjL.js} +2 -2
  44. package/dist/{oauth-relay-DOwngqdM.js → oauth-relay-Bu9kkaQu.js} +1 -1
  45. package/dist/{projection-Ce4pmhKP.js → projection-Cns7XwWa.js} +9206 -5318
  46. package/dist/{prompt-DEqjDVMs.js → prompt-CDqcsDYC.js} +4 -4
  47. package/dist/{registry-CNE4ZBnG.js → registry-BPwuOP2O.js} +5 -8
  48. package/dist/{resolve-qbPg-aC-.js → resolve-BK29bBry.js} +3 -3
  49. package/dist/rule-DAxQY-1h.js +20 -0
  50. package/dist/{runner-eGIxpAMf.js → runner-BcAE-cJm.js} +10 -10
  51. package/dist/{sandbox-egress-signals-DMFB1kCp.js → sandbox-egress-signals-C-q0go5b.js} +1 -1
  52. package/dist/{schedule-Cire6NU7.js → schedule-BLJ476XQ.js} +209 -43
  53. package/dist/{schema-CfIey9Ao.js → schema-BLgSZXcL.js} +255 -49
  54. package/dist/{schema-DriSvB40.d.ts → schema-DYcJeV7d.d.ts} +701 -62
  55. package/dist/{service-account-Cw_LWZ4-.js → service-account-gN0zqf0S.js} +68 -68
  56. package/dist/{service-account-B1VXCTqg.js → service-account-iJoCtkHR.js} +3 -3
  57. package/dist/{skills-Zg8-vrje.js → skills-BoZ80epJ.js} +77 -31
  58. package/dist/{slack-conversation-unfurl-DA51qH0c.js → slack-conversation-unfurl-CogYrITA.js} +8 -10
  59. package/dist/{spawn-DBi4-zD8.js → spawn-Dk92r7mX.js} +5 -6
  60. package/dist/{state-C-Ftk23K.js → state-DH3Cmgp3.js} +4 -4
  61. package/dist/{stop-D9xideLM.js → stop-CYsfc0Ed.js} +1064 -314
  62. package/dist/{store-BjIXA0Al.js → store-DmmMIrQi.js} +5 -5
  63. package/dist/{task-queue-D0_qbnpo.js → task-queue-C_zldF5J.js} +3 -3
  64. package/dist/{task-runner-DQMq4XY0.js → task-runner-C7oCJQIx.js} +21 -14
  65. package/dist/{thread-context-D0i1e-5O.js → thread-context-BW2BsQbH.js} +13 -11
  66. package/dist/{turn-session-routing-C0l68I_O.js → turn-session-routing-Xh_2nSQe.js} +52 -54
  67. package/dist/{validation-CRbvRPvu.js → validation-DrJd0nnq.js} +1 -1
  68. package/dist/{version-BYdVs12p.js → version-CNKZ8owc.js} +1 -1
  69. package/dist/version.js +1 -1
  70. package/dist/{warmup-DN9OHN1-.js → warmup-BWdHew2H.js} +14289 -7197
  71. package/dist/{web-message-id-BT8Mg8LL.js → web-message-id-Ch5dPq-a.js} +32 -144
  72. package/dist/{worker-C9ZfJXmV.js → worker-t9qpu_Zx.js} +7 -8
  73. package/migrations/0124_artifact_visibility.sql +9 -0
  74. package/migrations/0125_artifact_public_sha_index.sql +1 -0
  75. package/migrations/0126_artifact_drop_public.sql +8 -0
  76. package/migrations/0127_artifact_path.sql +4 -0
  77. package/migrations/0128_artifact_path_index.sql +1 -0
  78. package/migrations/0129_review_item_answered_index.sql +1 -0
  79. package/migrations/0130_review_item_status_index.sql +1 -0
  80. package/migrations/0131_brief_outcome_status.sql +1 -0
  81. package/migrations/0132_brief_outcome_status_backfill.sql +7 -0
  82. package/migrations/0133_brief_created_at_index.sql +1 -0
  83. package/migrations/0134_slack_person_search_index.sql +1 -0
  84. package/migrations/0135_code_change_size.sql +3 -0
  85. package/migrations/0136_merge_conflict_notice_dismiss.sql +16 -0
  86. package/migrations/0137_inbox_snoozes.sql +27 -0
  87. package/migrations/0138_code_change_search_index.sql +2 -0
  88. package/migrations/0139_review_item_owner.sql +22 -0
  89. package/migrations/0140_review_item_owner_index.sql +1 -0
  90. package/migrations/0141_memory_core_adoption.sql +89 -0
  91. package/migrations/0142_memory_core_indexes.sql +17 -0
  92. package/migrations/meta/0124_snapshot.json +5516 -0
  93. package/migrations/meta/0125_snapshot.json +5516 -0
  94. package/migrations/meta/0126_snapshot.json +5488 -0
  95. package/migrations/meta/0127_snapshot.json +5519 -0
  96. package/migrations/meta/0128_snapshot.json +5519 -0
  97. package/migrations/meta/0129_snapshot.json +5547 -0
  98. package/migrations/meta/0130_snapshot.json +5563 -0
  99. package/migrations/meta/0131_snapshot.json +5569 -0
  100. package/migrations/meta/0132_snapshot.json +5569 -0
  101. package/migrations/meta/0133_snapshot.json +5590 -0
  102. package/migrations/meta/0134_snapshot.json +5606 -0
  103. package/migrations/meta/0135_snapshot.json +5624 -0
  104. package/migrations/meta/0136_snapshot.json +5624 -0
  105. package/migrations/meta/0137_snapshot.json +5864 -0
  106. package/migrations/meta/0138_snapshot.json +5894 -0
  107. package/migrations/meta/0139_snapshot.json +5898 -0
  108. package/migrations/meta/0140_snapshot.json +5919 -0
  109. package/migrations/meta/0141_snapshot.json +6429 -0
  110. package/migrations/meta/0142_snapshot.json +6457 -0
  111. package/migrations/meta/_journal.json +134 -1
  112. package/package.json +6 -7
  113. package/dist/result-ZGnDzcsb.js +0 -548
  114. package/dist/session-stop-P2XdTiwr.js +0 -4252
  115. package/dist/turn-user-message-nBVvOXjs.js +0 -364
  116. package/dist/users-DdjMjbmM.js +0 -181
  117. package/dist/viewer-DudYrQGj.js +0 -212
@@ -212,6 +212,10 @@ const mcpProviderConnectedEventDataSchema = z.object({
212
212
  provider: z.string().min(1),
213
213
  credentialSubjectId: z.string().min(1)
214
214
  }).strict();
215
+ const skillLoadedEventDataSchema = z.object({
216
+ type: z.literal("skill_loaded"),
217
+ skillName: z.string().min(1)
218
+ }).strict();
215
219
  const unownedMcpProviderConnectedEventDataSchema = z.object({
216
220
  type: z.literal("mcp_provider_connected_unowned"),
217
221
  provider: z.string().min(1)
@@ -444,6 +448,7 @@ const appendableConversationEventDataSchema = z.union([
444
448
  messageUpdatedEventDataSchema,
445
449
  agentHistoryItemSchema,
446
450
  mcpProviderConnectedEventDataSchema,
451
+ skillLoadedEventDataSchema,
447
452
  authorizationRequestedEventDataSchema,
448
453
  authorizationCompletedEventDataSchema,
449
454
  toolExecutionStartedEventDataSchema,
@@ -480,6 +485,7 @@ const KNOWN_CONVERSATION_EVENT_TYPES = [
480
485
  "system_message",
481
486
  "mcp_provider_connected",
482
487
  "mcp_provider_connected_unowned",
488
+ "skill_loaded",
483
489
  "authorization_requested",
484
490
  "authorization_completed",
485
491
  "tool_execution_started",
@@ -1,10 +1,10 @@
1
- import { aa as startOAuthFlow } from "./projection-Ce4pmhKP.js";
2
- import { n as botConfig } from "./config-BIyIdTtA.js";
1
+ import { Vi as startOAuthFlow } from "./projection-Cns7XwWa.js";
2
+ import { n as botConfig } from "./config-BrXDQefC.js";
3
3
  import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
4
- import { R as deleteProviderIdentityForSlackUser, s as getSqlExecutor, z as deleteProviderIdentityForUser } from "./db-CFUpEZi9.js";
5
- import { d as hasRequiredOAuthScope } from "./registry-CNE4ZBnG.js";
6
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Chc_IP2o.js";
7
- import { h as deleteMcpStoredOAuthCredentials, m as deleteMcpServerSessionId, p as deleteMcpAuthSessionsForUserProvider } from "./service-account-Cw_LWZ4-.js";
4
+ import { $t as deleteProviderIdentityForUser, Qt as deleteProviderIdentityForSlackUser, s as getSqlExecutor } from "./db-DTxzH7u5.js";
5
+ import { d as hasRequiredOAuthScope } from "./registry-BPwuOP2O.js";
6
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-DMY3VV-D.js";
7
+ import { h as deleteMcpStoredOAuthCredentials, m as deleteMcpServerSessionId, p as deleteMcpAuthSessionsForUserProvider } from "./service-account-gN0zqf0S.js";
8
8
  import { randomBytes } from "node:crypto";
9
9
  // src/handlers/oauth-html.ts
10
10
  /** Build pre-escaped callback HTML with the shared response security policy. */
@@ -1,5 +1,5 @@
1
- import { Ha as runNonInteractiveCommand, Ia as SANDBOX_WORKSPACE_ROOT, ja as SANDBOX_COMMAND_PATH } from "./projection-Ce4pmhKP.js";
2
- import { E as withSpan, b as setSpanAttributes } from "./logging-BNUovdcX.js";
1
+ import { Ta as runNonInteractiveCommand, ma as SANDBOX_COMMAND_PATH, ya as SANDBOX_WORKSPACE_ROOT } from "./projection-Cns7XwWa.js";
2
+ import { E as withSpan, b as setSpanAttributes } from "./logging-FjclQsXu.js";
3
3
  // src/chat/sandbox/resources.ts
4
4
  let configuredResources;
5
5
  function resourcesFromEnv() {
@@ -1,10 +1,10 @@
1
1
  import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData } from "./sentry-CPbZjomA.js";
2
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-CkTW29hd.js";
2
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-DxttrKb9.js";
3
3
  import { n as isPushServiceHost } from "./push-endpoint-CO-nomUd.js";
4
4
  import { n as redactSandboxEgressProxyPath } from "./proxy-path-BHYoKZdq.js";
5
5
  import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-C6EIzAGP.js";
6
6
  import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
7
- import { B as getDeploymentServiceVersion, V as getDeploymentTelemetryAttributes } from "./logging-BNUovdcX.js";
7
+ import { B as getDeploymentServiceVersion, V as getDeploymentTelemetryAttributes } from "./logging-FjclQsXu.js";
8
8
  import { performance } from "node:perf_hooks";
9
9
  import { subscribe, unsubscribe } from "node:diagnostics_channel";
10
10
  // src/chat/pi/gateway-request-timing.ts
@@ -359,7 +359,7 @@ function getBrowserSentryConfig() {
359
359
  function initSentry() {
360
360
  if (getClient()) return;
361
361
  const dsn = process.env["SENTRY_DSN"];
362
- const enableLogs = getBoolean(process.env["SENTRY_ENABLE_LOGS"], Boolean(dsn));
362
+ const enableLogs = getBoolean(process.env["SENTRY_ENABLE_LOGS"], Boolean(dsn || process.env["SENTRY_SPOTLIGHT"]?.trim()));
363
363
  const serviceVersion = getDeploymentServiceVersion();
364
364
  const deploymentSpanAttributes = getDeploymentTelemetryAttributes();
365
365
  init({
@@ -1,5 +1,5 @@
1
- import { A as conversationKindFromRow, o as getDb } from "./db-CFUpEZi9.js";
2
- import { R as juniorConversations } from "./executor-DXL0O0MV.js";
1
+ import { $ as conversationKindFromRow, o as getDb } from "./db-DTxzH7u5.js";
2
+ import { H as juniorConversations } from "./executor-DqTiYj9S.js";
3
3
  import { desc, eq, sql } from "drizzle-orm";
4
4
  // src/chat/conversations/lineage.ts
5
5
  /**
@@ -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-CPbZjomA.js";
2
- import { t as JUNIOR_VERSION } from "./version-BYdVs12p.js";
1
+ import { _ as withScope, a as getClient, 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-CPbZjomA.js";
2
+ import { t as JUNIOR_VERSION } from "./version-CNKZ8owc.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";
@@ -14,10 +14,6 @@ function toOptionalString(value) {
14
14
  function toOptionalNumber(value) {
15
15
  return typeof value === "number" && Number.isFinite(value) ? value : void 0;
16
16
  }
17
- /** Type-guard: true when value is a non-null object (usable as Record). */
18
- function isRecord(value) {
19
- return typeof value === "object" && value !== null;
20
- }
21
17
  // src/chat/identities/identity.ts
22
18
  /**
23
19
  * Provider of the native Google identity. Core links it through Google
@@ -52,6 +48,7 @@ function definedAttributes(attributes) {
52
48
  function logContextToAttributes(context) {
53
49
  return definedAttributes({
54
50
  "gen_ai.conversation.id": context.conversationId,
51
+ "app.conversation.root_id": context.rootConversationId,
55
52
  "app.platform": context.platform,
56
53
  "app.request.id": context.requestId,
57
54
  "messaging.system": context.platform === "slack" ? "slack" : context.platform,
@@ -107,6 +104,48 @@ function getBoundLogContext() {
107
104
  function getBoundLogAttributes() {
108
105
  return logContextStorage.getStore() ?? {};
109
106
  }
107
+ // src/chat/sentry-links.ts
108
+ function getSentryOrgSlug() {
109
+ return process.env["SENTRY_ORG_SLUG"]?.trim() || void 0;
110
+ }
111
+ function isSentrySaasDsnHost(host) {
112
+ return host === "sentry.io" || host.endsWith(".sentry.io");
113
+ }
114
+ function buildSentryWebBaseUrl(dsn) {
115
+ if (isSentrySaasDsnHost(dsn.host)) return "https://sentry.io";
116
+ const port = dsn.port ? `:${dsn.port}` : "";
117
+ const path = dsn.path ? `/${dsn.path}` : "";
118
+ return `${dsn.protocol}://${dsn.host}${port}${path}`;
119
+ }
120
+ function buildSentryOrgPath(args) {
121
+ const dsn = getClient()?.getDsn();
122
+ if (!dsn?.host || !dsn.projectId) return;
123
+ const orgSlug = getSentryOrgSlug();
124
+ if (!orgSlug) return;
125
+ const params = new URLSearchParams();
126
+ params.set("project", dsn.projectId);
127
+ if (args.query) for (const [key, value] of Object.entries(args.query)) params.set(key, value);
128
+ const path = `${args.path}?${params.toString()}`;
129
+ if (isSentrySaasDsnHost(dsn.host)) return `https://${orgSlug}.sentry.io/${path}`;
130
+ return `${buildSentryWebBaseUrl(dsn)}/organizations/${orgSlug}/${path}`;
131
+ }
132
+ /** Build a Sentry conversation URL only when the runtime has enough Sentry config. */
133
+ function buildSentryConversationUrl(conversationId) {
134
+ return buildSentryOrgPath({ path: `explore/conversations/${encodeURIComponent(conversationId)}/` });
135
+ }
136
+ /** Build a Sentry event URL only when the runtime has enough Sentry config. */
137
+ function buildSentryEventUrl(eventId) {
138
+ return buildSentryOrgPath({
139
+ path: "issues/",
140
+ query: { query: eventId }
141
+ });
142
+ }
143
+ /** Format a failure reference, linked to the Sentry event when the runtime can build the URL. */
144
+ function formatSentryEventReference(eventId) {
145
+ const reference = `event_id=${eventId}`;
146
+ const url = buildSentryEventUrl(eventId);
147
+ return url ? `[${reference}](${url})` : `\`${reference}\``;
148
+ }
110
149
  // src/deployment.ts
111
150
  const JUNIOR_HEARTBEAT_ROUTE = "/api/internal/heartbeat";
112
151
  const JUNIOR_HEARTBEAT_CRON_SCHEDULE = "* * * * *";
@@ -1103,10 +1142,9 @@ function getActiveTraceId() {
1103
1142
  return;
1104
1143
  }
1105
1144
  }
1106
- const TURN_FAILURE_RESPONSE_TEMPLATE = "I ran into an internal error while processing that. Reference: `event_id={eventId}`.";
1107
1145
  /** Build the static user-facing response for a failed turn. */
1108
1146
  function buildTurnFailureResponse(eventId) {
1109
- return TURN_FAILURE_RESPONSE_TEMPLATE.replace("{eventId}", eventId);
1147
+ return `I ran into an internal error while processing that. Reference: ${formatSentryEventReference(eventId)}.`;
1110
1148
  }
1111
1149
  const GEN_AI_DEFAULT_MAX_ATTRIBUTE_CHARS = 1e5;
1112
1150
  const GEN_AI_MAX_ARRAY_ITEMS = 50;
@@ -1253,4 +1291,4 @@ function extractGenAiUsageAttributes(...sources) {
1253
1291
  ...cost?.total !== void 0 ? { "app.cost.total_usd": cost.total } : void 0
1254
1292
  };
1255
1293
  }
1256
- export { JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE as A, getDeploymentServiceVersion as B, summarizeMessageText as C, JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE as D, withSpan as E, JUNIOR_RETENTION_CRON_SCHEDULE as F, normalizeIdentityEmail as G, runWithLogAttributes as H, JUNIOR_RETENTION_ROUTE as I, toOptionalString as J, isRecord as K, JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE as L, JUNIOR_HEARTBEAT_CRON_SCHEDULE as M, JUNIOR_HEARTBEAT_ROUTE as N, JUNIOR_AUTO_ARCHIVE_ROUTE as O, JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE as P, LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION as R, setTags as S, withLogContext as T, GOOGLE_IDENTITY_PROVIDER as U, getDeploymentTelemetryAttributes as V, isNativeIdentityProvider as W, runBestEffort as _, extractGenAiUsageSummary as a, setSpanAttributes as b, getLogContextAttributes as c, logAudit as d, logError as f, normalizeGenAiFinishReason as g, logWarn as h, extractGenAiUsageAttributes as i, JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE as j, JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE as k, getLogContextAttributesForSpan as l, logInfo as m, createChatSdkLogger as n, getActiveTraceContext as o, logException as p, toOptionalNumber as q, createRequestContext as r, getActiveTraceId as s, buildTurnFailureResponse as t, getTracePropagationHeaders as u, serializeGenAiAttribute as v, withContext as w, setSpanStatus as x, setSentryUser as y, getDeploymentId as z };
1294
+ export { JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE as A, getDeploymentServiceVersion as B, summarizeMessageText as C, JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE as D, withSpan as E, JUNIOR_RETENTION_CRON_SCHEDULE as F, runWithLogAttributes as G, buildSentryConversationUrl as H, JUNIOR_RETENTION_ROUTE as I, normalizeIdentityEmail as J, GOOGLE_IDENTITY_PROVIDER as K, JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE as L, JUNIOR_HEARTBEAT_CRON_SCHEDULE as M, JUNIOR_HEARTBEAT_ROUTE as N, JUNIOR_AUTO_ARCHIVE_ROUTE as O, JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE as P, LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION as R, setTags as S, withLogContext as T, buildSentryEventUrl as U, getDeploymentTelemetryAttributes as V, formatSentryEventReference as W, toOptionalString as Y, runBestEffort as _, extractGenAiUsageSummary as a, setSpanAttributes as b, getLogContextAttributes as c, logAudit as d, logError as f, normalizeGenAiFinishReason as g, logWarn as h, extractGenAiUsageAttributes as i, JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE as j, JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE as k, getLogContextAttributesForSpan as l, logInfo as m, createChatSdkLogger as n, getActiveTraceContext as o, logException as p, isNativeIdentityProvider as q, createRequestContext as r, getActiveTraceId as s, buildTurnFailureResponse as t, getTracePropagationHeaders as u, serializeGenAiAttribute as v, withContext as w, setSpanStatus as x, setSentryUser as y, getDeploymentId as z };
@@ -1,12 +1,9 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
- import { F as actorFromRun, I as toolInvocationDestination } from "./agent-runner-sJLhgPQV.js";
3
- import { Cn as AgentMessageTargetError, En as PARENT_AGENT_TARGET, Sn as AgentMessagePausedError, Vt as getActiveAgentInvocationForConversation, Wt as getLatestAgentInvocationForConversation, dn as enqueueAgentInvocation, en as readChildConversationSender, wn as findChildAgentConversationId, yn as createAgentInvocationForMessage } from "./warmup-DN9OHN1-.js";
4
- import { a as enqueueAgentMessageToParent } from "./result-ZGnDzcsb.js";
5
- import { Ga as canAccessConversation, Ja as readConversationAccessFromSql } from "./projection-Ce4pmhKP.js";
6
- import { J as renderUntrustedTag, n as botConfig } from "./config-BIyIdTtA.js";
7
- import { P as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb } from "./db-CFUpEZi9.js";
8
- import { $ as postAutomatedTurnLimitNoticeForConversation, F as EVENT_WAIT_MS, ot as admitAutomatedTurn } from "./session-stop-P2XdTiwr.js";
9
- import { r as appendAndEnqueueInboundMessage } from "./store-BjIXA0Al.js";
2
+ import { N as actorFromRun, P as toolInvocationDestination } from "./agent-runner-BVHPUIc8.js";
3
+ import { In as enqueueAgentInvocation, Jn as getActiveAgentInvocationForConversation, On as enqueueAgentMessageToParent, Zn as getLatestAgentInvocationForConversation, fi as admitAutomatedTurn, ir as findChildAgentConversationId, jn as readChildConversationSender, nn as EVENT_WAIT_MS, nr as AgentMessagePausedError, or as PARENT_AGENT_TARGET, qn as createAgentInvocationForMessage, rr as AgentMessageTargetError, vn as postAutomatedTurnLimitNoticeForConversation } from "./warmup-BWdHew2H.js";
4
+ import { Yt as SYSTEM_IDENTITY_ID, a as getConversationStore, dn as canAccessConversation, hn as readConversationAccessFromSql, o as getDb } from "./db-DTxzH7u5.js";
5
+ import { at as renderUntrustedTag, n as botConfig } from "./config-BrXDQefC.js";
6
+ import { r as appendAndEnqueueInboundMessage } from "./store-DmmMIrQi.js";
10
7
  // src/chat/agent-invocations/top-level-message.ts
11
8
  const AGENT_MESSAGE_EVENT_NAMESPACE = "junior";
12
9
  /** Event type of a message from another top-level agent. */
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
- import { s as getSqlExecutor } from "./db-CFUpEZi9.js";
3
- import { h as isVisionImageMediaType, m as detectImageMediaType } from "./web-message-id-BT8Mg8LL.js";
4
- import { xo as readLiveAttachment } from "./projection-Ce4pmhKP.js";
2
+ import { s as getSqlExecutor } from "./db-DTxzH7u5.js";
3
+ import { m as isVisionImageMediaType, p as detectImageMediaType } from "./web-message-id-Ch5dPq-a.js";
4
+ import { Ja as readLiveAttachment } from "./projection-Cns7XwWa.js";
5
5
  import { escapeTagText, renderTag } from "@sentry/junior-plugin-api";
6
6
  // src/chat/attachments/model-input.ts
7
7
  var model_input_exports = /* @__PURE__ */ __exportAll({ loadInputAttachments: () => loadInputAttachments });
package/dist/nitro.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as JuniorPluginSet } from "./plugins-fBrz8PCV.js";
2
- import { i as JuniorDashboardOptions } from "./app-B_7Wn0en.js";
2
+ import { i as JuniorDashboardOptions } from "./app-Cw5Vy6H6.js";
3
3
  import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
4
4
  type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
5
5
  type SentryNitroOptions = NonNullable<Parameters<typeof withSentryConfig$1>[1]>;
package/dist/nitro.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DD9vencX.js";
2
2
  import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-Bkk0XRo2.js";
3
- import { a as CACHE_WARMUP_QUEUE_TOPIC, h as resolveConversationWorkQueueTopic, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./background-compaction-queue-CUJXVKG3.js";
4
- import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-D0_qbnpo.js";
5
- import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, B as getDeploymentServiceVersion, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_CRON_SCHEDULE, I as JUNIOR_RETENTION_ROUTE, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_CRON_SCHEDULE, N as JUNIOR_HEARTBEAT_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, k as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE } from "./logging-BNUovdcX.js";
3
+ import { a as CACHE_WARMUP_QUEUE_TOPIC, h as resolveConversationWorkQueueTopic, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./background-compaction-queue-CJDnWVOJ.js";
4
+ import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-C_zldF5J.js";
5
+ import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, B as getDeploymentServiceVersion, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_CRON_SCHEDULE, I as JUNIOR_RETENTION_ROUTE, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_CRON_SCHEDULE, N as JUNIOR_HEARTBEAT_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, k as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE } from "./logging-FjclQsXu.js";
6
6
  import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cv2ETe8Y.js";
7
7
  import path from "node:path";
8
8
  import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
@@ -1,5 +1,5 @@
1
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-58m_CyIJ.js";
2
- import { bn as createUserTokenStore } from "./projection-Ce4pmhKP.js";
1
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Bk8wGb8Y.js";
2
+ import { Cn as createUserTokenStore } from "./projection-Cns7XwWa.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,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
- import { d as readJuniorSecret } from "./task-queue-D0_qbnpo.js";
2
+ import { d as readJuniorSecret } from "./task-queue-C_zldF5J.js";
3
3
  import * as z from "zod";
4
4
  import { randomBytes } from "node:crypto";
5
5
  import { SignJWT, jwtVerify } from "jose";