@sentry/junior 0.318.0 → 0.320.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 (94) hide show
  1. package/dist/{context-BKF_5zzI.js → adapter-DlLLoJKj.js} +537 -537
  2. package/dist/{admin-UOHix_5P.js → admin-BzRXDVfh.js} +1 -1
  3. package/dist/{agent-runner-DeYymwh2.js → agent-DxZ7nHfD.js} +19866 -6720
  4. package/dist/{agent-status-BA5x3Xtp.js → agent-status-Bq_AIpyp.js} +105 -1
  5. package/dist/{agent-update-delivery-DH8bx7jU.js → agent-update-delivery-CO4FU5Gg.js} +4 -5
  6. package/dist/api/schema.d.ts +45 -23
  7. package/dist/api/schema.js +4 -4
  8. package/dist/api.js +79 -84
  9. package/dist/{app-DKAOuaoC.d.ts → app-CHCFIIDu.d.ts} +5 -4
  10. package/dist/app.d.ts +2 -2
  11. package/dist/app.js +119 -194
  12. package/dist/{change-record-BzJgLsv7.d.ts → change-record-K-KsqNhT.d.ts} +9 -5
  13. package/dist/{channel-access-A0de5lRv.js → channel-access-BghWqlXx.js} +1 -1
  14. package/dist/{chat-core-engine-D3Wd7f5n.js → chat-core-engine-BgfSLrDu.js} +31 -14
  15. package/dist/cli/chat.d.ts +1 -1
  16. package/dist/cli/chat.js +23 -23
  17. package/dist/cli/check.js +5 -5
  18. package/dist/cli/main.js +2 -2
  19. package/dist/cli/plugins.d.ts +1 -1
  20. package/dist/cli/plugins.js +8 -8
  21. package/dist/cli/snapshot-create.js +5 -5
  22. package/dist/cli/upgrade.d.ts +1 -1
  23. package/dist/cli/upgrade.js +3 -4
  24. package/dist/{continue-in-slack-YxwMQVeR.js → continue-in-slack-DBlQP4PC.js} +3 -3
  25. package/dist/{conversation-feed-Cj7IuBtM.js → conversation-feed-DEUdD7mb.js} +2 -106
  26. package/dist/{conversation-privacy-Cr_dNW1p.js → conversation-privacy-qoh95v90.js} +1 -1
  27. package/dist/{create-Btl1y1rq.js → create-jZSaDrCR.js} +115 -5
  28. package/dist/{credential-sync-DTarZ63K.js → credential-sync-Bj9-UlNE.js} +15 -18
  29. package/dist/{db-of6e3sGt.js → db-BacvswT0.js} +4602 -727
  30. package/dist/{deployment-C0qXa0FD.js → deployment-BoJkRPDt.js} +3 -3
  31. package/dist/{engine-context-C_QL_bMQ.js → engine-context-Bi3Ync5t.js} +521 -150
  32. package/dist/{html-9_pS9SjY.js → html-DW0pw5Pr.js} +6 -8
  33. package/dist/instrumentation.js +7 -23
  34. package/dist/list-Dz3CdP3g.js +5016 -0
  35. package/dist/{logging-BnOG0qz2.js → logging-DsTnMqyi.js} +8 -33
  36. package/dist/{mailbox-turn-Byrry9o1.js → markers-C33gNYNE.js} +1705 -1284
  37. package/dist/nitro.d.ts +2 -2
  38. package/dist/nitro.js +6 -7
  39. package/dist/{oauth-callback-server-CjnnUr4o.js → oauth-callback-server-C-pEhAQK.js} +2 -2
  40. package/dist/{oauth-relay-BvHFH0fV.js → oauth-relay-DIXdH-io.js} +1 -1
  41. package/dist/{plugins-fBrz8PCV.d.ts → plugins-DhGXZjlu.d.ts} +1 -0
  42. package/dist/{profile-iHw1uu32.js → profile-v9vA3RvH.js} +16 -18
  43. package/dist/{prompt-DEkStuxG.js → prompt-C5CW2wKO.js} +1 -1
  44. package/dist/{reports-C1d9azyV.js → reports-eBgrhPXS.js} +2 -2
  45. package/dist/{resolve-DC6zBuDV.js → resolve-HVXmbeCr.js} +5 -5
  46. package/dist/{result-DxewDuXb.js → result-BPNzgeTl.js} +20 -9
  47. package/dist/{runner-99YxVN_r.js → runner-aNSDTST6.js} +7 -8
  48. package/dist/{sandbox-egress-signals-CgoX5CTI.js → sandbox-egress-signals-nzp9Ykf7.js} +1 -1
  49. package/dist/{schema-BTojNBr5.js → schema-BlTO5M1d.js} +16 -8
  50. package/dist/{service-account-YDCPSByj.js → service-account-DWIf1t6p.js} +4 -5
  51. package/dist/{skills-CleC0Hze.js → skills-50izzzdK.js} +9 -9
  52. package/dist/{slack-conversation-unfurl-BNQLC12R.js → slack-conversation-unfurl-C6jXhVYg.js} +7 -7
  53. package/dist/storage-BtCxXiNt.js +273 -0
  54. package/dist/{system-prompt-table-Ci6Ck4gk.js → system-prompt-table-CIR1B44Z.js} +27 -85
  55. package/dist/topic-B2EWKKBT.js +6 -0
  56. package/dist/{package-discovery-DD9vencX.js → topics-DxuKurCX.js} +21 -1
  57. package/dist/{types-DCzTAA63.js → types-BNHkJrOP.js} +25 -11
  58. package/dist/{users-Cb9c1k9q.js → users-DOVo9sdU.js} +1 -1
  59. package/dist/{validation-BiUmWPhy.js → validation-CK0vuEHB.js} +4 -4
  60. package/dist/{version-VEXiEcZu.js → version-BuLVNlxB.js} +1 -1
  61. package/dist/version.js +1 -1
  62. package/dist/{worker-ChWYQdhm.js → worker-C82kHU1R.js} +4 -4
  63. package/migrations/20261127052408_space_name_nullable/migration.sql +5 -0
  64. package/migrations/20261127052408_space_name_nullable/snapshot.json +29 -0
  65. package/migrations/20261127060000_annotation_object_id_index/migration.sql +1 -0
  66. package/migrations/20261127060000_annotation_object_id_index/snapshot.json +69 -0
  67. package/migrations/20261127060001_annotation_subjects/migration.sql +78 -0
  68. package/migrations/20261127060001_annotation_subjects/snapshot.json +104 -0
  69. package/migrations/20261127060002_annotation_subject_index/migration.sql +1 -0
  70. package/migrations/20261127060002_annotation_subject_index/snapshot.json +70 -0
  71. package/migrations/20261127060003_annotation_title_url/migration.sql +84 -0
  72. package/migrations/20261127060003_annotation_title_url/snapshot.json +73 -0
  73. package/migrations/20261127150242_drop_space_members/migration.sql +9 -0
  74. package/migrations/20261127150242_drop_space_members/snapshot.json +53 -0
  75. package/package.json +9 -7
  76. package/dist/auth-pause-state-f9hJM_zO.js +0 -113
  77. package/dist/catalog-runtime-BfdAnztW.js +0 -6
  78. package/dist/child-message-peFWLcCZ.js +0 -15
  79. package/dist/conversation-turn-Bru4w_FD.js +0 -1250
  80. package/dist/job-runner-B2XEvpif.js +0 -1505
  81. package/dist/lineage-nh4z9iQN.js +0 -36
  82. package/dist/list-HRP3TIRl.js +0 -12631
  83. package/dist/markers-CTTtJqYn.js +0 -342
  84. package/dist/message-BRUuLgrY.js +0 -153
  85. package/dist/model-input-CFC62mf-.js +0 -82
  86. package/dist/registry-Cl7Labpe.js +0 -3279
  87. package/dist/run-conversation-Cz2ubZK-.js +0 -337
  88. package/dist/sender-actors-77zTQbSG.js +0 -84
  89. package/dist/spawn-DuZfodPa.js +0 -45
  90. package/dist/task-runner-BJ9Up3bG.js +0 -1529
  91. package/dist/topic-CRYYBYp-.js +0 -7
  92. package/dist/topics-BoCkoPJJ.js +0 -21
  93. package/dist/turn-membership-VT7XZh-L.js +0 -856
  94. package/dist/turn-wake-C7HeLHAM.js +0 -151
@@ -1,9 +1,7 @@
1
- import { L as botConfig } from "./context-BKF_5zzI.js";
2
- import { nc as deleteProviderIdentityForSlackUser, o as getSqlExecutor, rc as deleteProviderIdentityForUser } from "./db-of6e3sGt.js";
3
- import { G as mapBounded } from "./prompt-DEkStuxG.js";
4
- import { ii as startOAuthFlow } from "./mailbox-turn-Byrry9o1.js";
5
- import { S as deleteMcpStoredOAuthCredentials, b as deleteMcpAuthSessionsForUserProvider, m as hasRequiredOAuthScope, x as deleteMcpServerSessionId } from "./registry-Cl7Labpe.js";
6
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BfdAnztW.js";
1
+ import { L as botConfig } from "./adapter-DlLLoJKj.js";
2
+ import { Pd as getAppContext, Sc as deleteProviderIdentityForUser, Yd as hasRequiredOAuthScope, nf as deleteMcpServerSessionId, o as getSqlExecutor, rf as deleteMcpStoredOAuthCredentials, tf as deleteMcpAuthSessionsForUserProvider, xc as deleteProviderIdentityForSlackUser } from "./db-BacvswT0.js";
3
+ import { G as mapBounded } from "./prompt-C5CW2wKO.js";
4
+ import { pi as startOAuthFlow } from "./markers-C33gNYNE.js";
7
5
  import { randomBytes } from "node:crypto";
8
6
  // src/handlers/oauth-html.ts
9
7
  /** Build pre-escaped callback HTML with the shared response security policy. */
@@ -188,12 +186,12 @@ async function readConnectedOAuthTokens(userId, plugin, userTokenStore) {
188
186
  return stored && hasRequiredOAuthScope(stored.scope, plugin.manifest.oauth?.scope) ? stored : void 0;
189
187
  }
190
188
  function connectablePlugin(provider) {
191
- const plugin = pluginCatalogRuntime.getDefinition(provider);
189
+ const plugin = getAppContext().catalog.getDefinition(provider);
192
190
  return plugin?.manifest.oauth ? plugin : void 0;
193
191
  }
194
192
  /** List OAuth plugins and the user's connection state for each one. */
195
193
  async function listConnections(userId, userTokenStore) {
196
- const plugins = pluginCatalogRuntime.getProviders().filter((plugin) => Boolean(plugin.manifest.oauth));
194
+ const plugins = getAppContext().catalog.getProviders().filter((plugin) => Boolean(plugin.manifest.oauth));
197
195
  return await mapBounded(plugins, async (plugin) => {
198
196
  const tokens = await readConnectedOAuthTokens(userId, plugin, userTokenStore);
199
197
  const account = tokens?.account;
@@ -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, u as sentry_exports } from "./sentry-CPbZjomA.js";
2
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-Cr_dNW1p.js";
2
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-qoh95v90.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 { _ as getDeploymentTelemetryAttributes, g as getDeploymentServiceVersion } from "./deployment-C0qXa0FD.js";
7
+ import { _ as getDeploymentTelemetryAttributes, g as getDeploymentServiceVersion } from "./deployment-BoJkRPDt.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
@@ -99,27 +99,11 @@ function createGatewayRequestTimingHandlers() {
99
99
  };
100
100
  }
101
101
  /**
102
- * Subscribes to undici's diagnostics channels and writes the HTTP phases of
103
- * AI Gateway model requests onto their `gen_ai.chat` span. Telemetry must not
104
- * fail a request, so handler errors are dropped. Returns a function that
105
- * removes the subscriptions.
106
- *
107
- * To find where time went before the gateway saw a request, get the gateway
108
- * latency for `gen_ai.response.id` from the AI Gateway generation API, then
109
- * compare the phases:
110
- * - High `queue_ms` on a reused socket, or high
111
- * `app.ai.event_loop.utilization`: the process was busy or the pool was
112
- * full. With a new socket, `queue_ms` includes the connect time.
113
- * - High `connect_ms`: DNS, TCP, or TLS was slow. It is absent on a reused
114
- * socket. It is best effort: overlapping connects to the same host usually
115
- * record none.
116
- * - High `body_send_ms`: the upload was slow.
117
- * - `response_wait_ms` much larger than the gateway time to first token,
118
- * with small Junior phases: the delay was in the network or at the Vercel
119
- * edge. The gateway sends headers with the first token. Give Vercel
120
- * `app.ai.gateway.vercel_id`.
121
- * - The same `service.instance.id` on more than one slow call: they shared
122
- * one process.
102
+ * Writes the undici HTTP phases of AI Gateway requests onto their `gen_ai.chat`
103
+ * span and returns an unsubscribe function. Handler errors are dropped, so
104
+ * telemetry never fails a request. On a new socket `queue_ms` holds connect
105
+ * time, and `connect_ms` is best effort. The gateway sends headers with the
106
+ * first token, so a long `response_wait_ms` points at the network or edge.
123
107
  */
124
108
  function subscribeGatewayRequestTiming() {
125
109
  const handlers = Object.entries(createGatewayRequestTimingHandlers()).map(([name, handler]) => [name, (message) => {