@sentry/junior 0.267.0 → 0.269.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 (95) hide show
  1. package/README.md +2 -9
  2. package/dist/{actor-DZSokpwj.js → actor-CP9K2Idu.js} +2 -1
  3. package/dist/{adapter-BybMEezj.js → adapter-2-CG25be.js} +3 -51
  4. package/dist/{admin-DOs1_EiW.js → admin-DSs8S5Uy.js} +1 -1
  5. package/dist/{agent-invocations-CxKldAeB.js → agent-invocations-C1RNOCs8.js} +2 -0
  6. package/dist/{agent-runner-DgNATN4D.js → agent-runner-CrDrPUtY.js} +3411 -1640
  7. package/dist/api/schema.d.ts +2 -5630
  8. package/dist/api/schema.js +7 -7
  9. package/dist/api.d.ts +3 -1
  10. package/dist/api.js +268 -287
  11. package/dist/{app-DAB3fzyp.d.ts → app-BrMMzjYm.d.ts} +10 -3
  12. package/dist/app.d.ts +1 -1
  13. package/dist/app.js +371 -223
  14. package/dist/{automation-CmeFBSEh.js → automation-p87hg_AV.js} +74 -74
  15. package/dist/{briefs-CWKjka7v.js → briefs-PtODdLNu.js} +4 -4
  16. package/dist/{catalog-runtime-cMlAI5LY.js → catalog-runtime-BsoSmTM0.js} +1 -1
  17. package/dist/cli/chat.js +16 -26
  18. package/dist/cli/check.js +3 -3
  19. package/dist/cli/main.js +5 -3
  20. package/dist/cli/plugins.js +4 -4
  21. package/dist/cli/snapshot-create.js +4 -4
  22. package/dist/cli/upgrade.d.ts +1 -1
  23. package/dist/cli/upgrade.js +3 -3
  24. package/dist/{client-BjgbMawj.js → client-Cqf4TboL.js} +20 -15
  25. package/dist/{config-CdB6yJj5.js → config-CPsE4T5L.js} +2 -2
  26. package/dist/{connections-RE_65jzK.js → connections-upFXLmhG.js} +10 -11
  27. package/dist/{conversation-DSo310Ps.js → conversation-CTpD_PGk.js} +7 -84
  28. package/dist/{conversation-privacy-BzgJC5k0.js → conversation-privacy-D6zJc8ff.js} +1 -1
  29. package/dist/{credential-sync-DhEGEpgq.js → credential-sync-CS_6IC-f.js} +30 -34
  30. package/dist/{credentialed-CIGwoLU2.js → credentialed-BU-OW7HP.js} +577 -74
  31. package/dist/{store-B8CABbmR.d.ts → db-BzOCzVb1.d.ts} +17 -7
  32. package/dist/{executor-VYrx_K4w.js → executor-CNS7ONt-.js} +78 -4
  33. package/dist/instrumentation.js +2 -2
  34. package/dist/{assistant-reply-CT7VcXQe.js → interruption-marker-g6Xup3Fk.js} +8 -2
  35. package/dist/{job-queue-C0BZSa7r.js → job-queue-DI-k-Bbk.js} +2 -2
  36. package/dist/{list-1XQP-o6K.js → list-CGoQdXTp.js} +429 -1401
  37. package/dist/locks-D-0h111u.js +48 -0
  38. package/dist/{logging-DuZ1A4ab.js → logging-n7knse-O.js} +1 -1
  39. package/dist/{history-C84mlAwO.js → media-85PDJxO_.js} +83 -1
  40. package/dist/{message-NKSbbnA6.js → message-BpaWd8TT.js} +4 -4
  41. package/dist/nitro.d.ts +1 -1
  42. package/dist/nitro.js +3 -3
  43. package/dist/{oauth-callback-server-qAHLPtml.js → oauth-callback-server-CpGmEw_i.js} +2 -2
  44. package/dist/{prompt-BW9jFsqZ.js → prompt-BlQB0QQt.js} +1 -1
  45. package/dist/{registry-FQutO926.js → registry-By36_xsm.js} +2 -2
  46. package/dist/reporting-schema-CZREhYc-.js +104 -0
  47. package/dist/reporting-window-CVarfId9.js +255 -0
  48. package/dist/{resolve-Bk4yeuHy.js → resolve-CUIBcdPd.js} +3 -3
  49. package/dist/{result-B9e9ATOU.js → result-BemsOMOO.js} +31 -12
  50. package/dist/{runner-C3S2ObH-.js → runner-BVok7PAA.js} +12 -11
  51. package/dist/{sandbox-egress-signals-DqpGzzMB.js → sandbox-egress-signals-BSUWQI95.js} +1 -1
  52. package/dist/{schema-X7Fj4fv1.js → schema-ChnFo5f2.js} +98 -6
  53. package/dist/schema-jK4-1u_H.d.ts +5927 -0
  54. package/dist/{service-account-Do30HUNv.js → service-account-DHvlLnZw.js} +4 -3
  55. package/dist/{service-account-BQasl-qq.js → service-account-hMmESDcr.js} +3 -3
  56. package/dist/{session-stop-DkOjt46_.js → session-stop-BQW_iFcd.js} +499 -23
  57. package/dist/{skills-CQHrwfOa.js → skills-DmJJIuLF.js} +2 -2
  58. package/dist/{spawn-BHuqN14f.js → spawn-ChCm46i-.js} +2 -2
  59. package/dist/{store-6EetVP-m.js → store-1DVhoKOL.js} +4 -4
  60. package/dist/{store-DvNZIsCr.js → store-DCo2n5iJ.js} +3 -3
  61. package/dist/{task-queue-B0DLgd2P.js → task-queue-HMC4QjFm.js} +3 -3
  62. package/dist/task-runner-cA6yjn_E.js +269 -0
  63. package/dist/{thread-state-DRmdJ2QN.js → thread-state-CHy8LS0C.js} +8 -18
  64. package/dist/{turn-failure-response-G11cs2gE.js → turn-failure-response-Dr7erLWs.js} +11 -16
  65. package/dist/{turn-lifecycle-OzLIwvi1.js → turn-lifecycle-bf2fIYi_.js} +1 -1
  66. package/dist/{tasks-0ilmuCux.js → turn-session-routing-BqO0qXLk.js} +959 -44
  67. package/dist/{validation-CxEmt1id.js → validation-DHR1ivfh.js} +1 -1
  68. package/dist/{version-Bapedn4A.js → version-CXCHLgWm.js} +1 -1
  69. package/dist/version.js +1 -1
  70. package/dist/{viewer-DrN3oC2X.js → viewer-DSbD6DF6.js} +503 -241
  71. package/dist/{work-DUQoNcqP.js → work-BE_qTYGi.js} +17 -36
  72. package/dist/{worker-D1l4Ugk0.js → worker-Cm9_sWXg.js} +15 -7
  73. package/migrations/0065_user_customization.sql +1 -0
  74. package/migrations/0066_review_items.sql +53 -0
  75. package/migrations/0067_review_item_dedupe_tenant.sql +2 -0
  76. package/migrations/0068_review_item_slack_cards.sql +10 -0
  77. package/migrations/0069_system_identity.sql +25 -0
  78. package/migrations/0070_review_item_foreign_keys.sql +5 -0
  79. package/migrations/AGENTS.md +17 -0
  80. package/migrations/meta/0065_snapshot.json +3511 -0
  81. package/migrations/meta/0066_snapshot.json +4099 -0
  82. package/migrations/meta/0067_snapshot.json +3921 -0
  83. package/migrations/meta/0068_snapshot.json +4176 -0
  84. package/migrations/meta/0069_snapshot.json +3979 -0
  85. package/migrations/meta/0070_snapshot.json +3997 -0
  86. package/migrations/meta/_journal.json +42 -0
  87. package/package.json +5 -5
  88. package/dist/db-Bg-zC3r5.d.ts +0 -5
  89. package/dist/history-BgI33Kie.d.ts +0 -78
  90. package/dist/images-CecjXAAz.js +0 -64
  91. package/dist/task-runner-B-PD_JOj.js +0 -1074
  92. package/dist/turn-session-routing-Dyut9l7Y.js +0 -76
  93. package/dist/user-input-request-BDFBdF8r.js +0 -116
  94. package/dist/web-message-id-CJSUiksE.js +0 -236
  95. package/migrations/README.md +0 -30
@@ -1,4 +1,4 @@
1
- import { h as logWarn } from "./logging-DuZ1A4ab.js";
1
+ import { h as logWarn } from "./logging-n7knse-O.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  // src/chat/conversation-privacy.ts
4
4
  const SAFE_METADATA_KEY_LIMIT = 20;
@@ -1,19 +1,20 @@
1
- import { nt as recordAuthorizationCompleted, qt as getTurnRecord, tt as recordAuthenticationLinked, zt as getConversationPendingAuth } from "./tasks-0ilmuCux.js";
2
- import { p as escapeXml } from "./client-BjgbMawj.js";
3
- import { a as getRuntimeMetadata, n as botConfig } from "./config-CdB6yJj5.js";
4
- import { R as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-DuZ1A4ab.js";
5
- import { f as parseSlackUserId } from "./actor-DZSokpwj.js";
6
- import { L as upsertIdentity, N as findUserByVerifiedEmails, R as upsertLinkedIdentity, S as identityFromActor, m as getSqlExecutor } from "./viewer-DrN3oC2X.js";
1
+ import { It as recordAuthenticationLinked, Lt as recordAuthorizationCompleted, On as getTurnRecord, bn as getConversationPendingAuth } from "./turn-session-routing-BqO0qXLk.js";
2
+ import { p as escapeXml } from "./client-Cqf4TboL.js";
3
+ import { a as getRuntimeMetadata, n as botConfig } from "./config-CPsE4T5L.js";
4
+ import { R as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-n7knse-O.js";
5
+ import { p as parseSlackUserId } from "./actor-CP9K2Idu.js";
6
+ import { B as upsertLinkedIdentity, C as getSqlExecutor, I as findUserByVerifiedEmails, M as resolveActorIdentityId, o as readIdentityById } from "./viewer-DSbD6DF6.js";
7
7
  import { i as homeDir } from "./package-discovery-DJBompdd.js";
8
- import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-FQutO926.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-cMlAI5LY.js";
10
- import { t as discoverSkills } from "./skills-CQHrwfOa.js";
11
- import { a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, v as lookupSlackUserProfile } from "./agent-runner-DgNATN4D.js";
12
- import { $ as postSlackMessage, B as parseOAuthStatePayload, V as resolveBaseUrl, i as resolvePluginOAuthAccount, n as createUserTokenStore, nn as getSlackClient, z as formatProviderLabel } from "./credentialed-CIGwoLU2.js";
13
- import { i as getStateAdapter, o as acquireActiveLock } from "./adapter-BybMEezj.js";
14
- import { _ as getMcpProviderErrorAttributes } from "./service-account-Do30HUNv.js";
15
- import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DRmdJ2QN.js";
16
- import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-RE_65jzK.js";
8
+ import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-By36_xsm.js";
9
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BsoSmTM0.js";
10
+ import { t as discoverSkills } from "./skills-DmJJIuLF.js";
11
+ import { a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, v as lookupSlackUserProfile } from "./agent-runner-CrDrPUtY.js";
12
+ import { Dn as getSlackClient, Et as postSlackMessage, dt as parseOAuthStatePayload, ft as resolveBaseUrl, i as resolvePluginOAuthAccount, n as createUserTokenStore, ut as formatProviderLabel } from "./credentialed-BU-OW7HP.js";
13
+ import { r as acquireActiveLock } from "./locks-D-0h111u.js";
14
+ import { r as getStateAdapter } from "./adapter-2-CG25be.js";
15
+ import { _ as getMcpProviderErrorAttributes } from "./service-account-DHvlLnZw.js";
16
+ import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-CHy8LS0C.js";
17
+ import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-upFXLmhG.js";
17
18
  import { n as relayLocalOAuthCallback } from "./oauth-relay-CTygMkNx.js";
18
19
  import path from "node:path";
19
20
  import { z } from "zod";
@@ -394,28 +395,23 @@ function pluginAuthorizationId(args) {
394
395
  }
395
396
  /** Return the Junior user of the person who started the OAuth connection. */
396
397
  async function resolveOAuthActorUserId(actor) {
397
- if (actor.platform === "web") {
398
- const observation = identityFromActor(actor.email ? {
399
- email: actor.email,
400
- ...actor.fullName ? { fullName: actor.fullName } : void 0
401
- } : void 0);
402
- return observation ? (await upsertIdentity(getSqlExecutor(), observation)).userId : void 0;
403
- }
398
+ const identityActor = actor.platform === "web" ? actor : await slackProfileActor(actor);
399
+ const identityId = await resolveActorIdentityId(getSqlExecutor(), identityActor);
400
+ return identityId ? (await readIdentityById(identityId))?.user?.id : void 0;
401
+ }
402
+ /** Refresh a Slack actor with the profile Slack returns for that user. */
403
+ async function slackProfileActor(actor) {
404
404
  const slackUserId = parseSlackUserId(actor.userId);
405
405
  if (!slackUserId) throw new Error("OAuth Slack actor user id is invalid");
406
406
  const profile = await lookupSlackUserProfile(slackUserId);
407
- return (await upsertIdentity(getSqlExecutor(), {
408
- kind: "user",
409
- provider: "slack",
410
- providerTenantId: actor.teamId,
411
- providerSubjectId: profile.id,
412
- displayName: profile.real_name || profile.display_name,
413
- handle: profile.name,
414
- ...profile.email ? {
415
- email: profile.email,
416
- emailVerified: true
417
- } : void 0
418
- })).userId;
407
+ return {
408
+ platform: "slack",
409
+ teamId: actor.teamId,
410
+ userId: profile.id,
411
+ ...profile.real_name || profile.display_name ? { fullName: profile.real_name || profile.display_name } : void 0,
412
+ ...profile.name ? { userName: profile.name } : void 0,
413
+ ...profile.email ? { email: profile.email } : void 0
414
+ };
419
415
  }
420
416
  /**
421
417
  * Link a connected provider account to the person who connected it.