@sentry/junior 0.235.0 → 0.237.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 (73) hide show
  1. package/dist/{agent-hooks-DS7k0ZWY.js → agent-hooks-otHGbhBx.js} +20 -9
  2. package/dist/{agent-runner-BlDI1zV2.js → agent-runner-DMAsnPb9.js} +456 -120
  3. package/dist/api/schema.d.ts +223 -2
  4. package/dist/api/schema.js +5 -4
  5. package/dist/api.d.ts +8 -2
  6. package/dist/api.js +404 -47
  7. package/dist/{app-pGsR__aT.d.ts → app-MEd7wbF0.d.ts} +82 -48
  8. package/dist/app.d.ts +3 -3
  9. package/dist/app.js +162 -119
  10. package/dist/{types-Du-HbEun.js → automation-CrQGQ2MT.js} +306 -34
  11. package/dist/{briefs-C3jhszOz.js → briefs-DDA1ugXk.js} +4 -4
  12. package/dist/{catalog-runtime-B9u_3-GW.js → catalog-runtime-DlXuhrmk.js} +1 -1
  13. package/dist/{checkpoint-DLcJ5mKL.js → checkpoint-BlIIiHG5.js} +16 -9
  14. package/dist/cli/chat.d.ts +1 -1
  15. package/dist/cli/chat.js +14 -14
  16. package/dist/cli/check.js +4 -4
  17. package/dist/cli/main.js +1 -1
  18. package/dist/cli/plugins.d.ts +1 -1
  19. package/dist/cli/plugins.js +4 -4
  20. package/dist/cli/snapshot-create.js +3 -3
  21. package/dist/cli/upgrade.d.ts +1 -1
  22. package/dist/cli/upgrade.js +5 -5
  23. package/dist/{client-BSnNHO0R.js → client-CPMbTmJU.js} +2 -2
  24. package/dist/{config-Bmw4xTPK.js → config-CxpPG6nR.js} +57 -17
  25. package/dist/{conversation-C_aYrISI.js → conversation-9Fxa1Zbq.js} +13 -1
  26. package/dist/{conversation-privacy-BV2dtba2.js → conversation-privacy-Dbkdvozu.js} +1 -1
  27. package/dist/{credential-sync-CukzQJ1x.js → credential-sync-D9yGg3q5.js} +14 -14
  28. package/dist/{executor-B9ksWZCv.js → executor-BNxfDS1V.js} +39 -6
  29. package/dist/{images-CEXcQ0Id.js → images-D6Y3FJDQ.js} +3 -3
  30. package/dist/instrumentation.js +2 -2
  31. package/dist/{job-queue-CY1L2YRn.js → job-queue-Dq5_zt_l.js} +1 -1
  32. package/dist/{logging-F--48Q7Q.js → logging-rB_ngE_R.js} +1 -1
  33. package/dist/nitro.d.ts +2 -2
  34. package/dist/nitro.js +5 -5
  35. package/dist/{oauth-authorization-LasSG3Qc.js → oauth-authorization-5T1S1v_1.js} +1 -1
  36. package/dist/{oauth-callback-server-D07ZzVMs.js → oauth-callback-server-Csw7RssK.js} +2 -2
  37. package/dist/{pending-auth-DrG9Mkje.js → pending-auth-moCA2mTc.js} +1 -1
  38. package/dist/{plugins-BT2l4We3.d.ts → plugins-CjfUP5gJ.d.ts} +1 -0
  39. package/dist/{profile-DZ2DUdd1.js → profile-D6apIG2N.js} +4 -4
  40. package/dist/{prompt-BM_5mAU3.js → prompt-Ctwy6hSI.js} +1 -1
  41. package/dist/queue-B5SnqRln.d.ts +25 -0
  42. package/dist/{registry-_JLY0x7b.js → registry-zfTzTHe6.js} +38 -2
  43. package/dist/{resolve-Cuoj3MML.js → resolve-sJtTzuBO.js} +2 -2
  44. package/dist/{runner-BfelmbMv.js → runner-DkCk8cbc.js} +9 -9
  45. package/dist/{sandbox-egress-signals-D5QUIO7Z.js → sandbox-egress-signals-tSQ8OEcw.js} +1 -1
  46. package/dist/{schema-CrdDxGbx.js → schema-C5bgOpRg.js} +3 -2
  47. package/dist/{skills-DAegjk5Y.js → skills-BVpr_Gnv.js} +3 -3
  48. package/dist/{spawn-DCfV7zGK.js → spawn-CJhmyE4E.js} +2 -2
  49. package/dist/{task-queue-GcuFtzor.js → task-queue-BAiZ7_CF.js} +16 -10
  50. package/dist/{task-runner-B0-P_3aq.js → task-runner-Bh8XONXT.js} +9 -9
  51. package/dist/{thread-state-TezcEhuH.js → thread-state-BnQln4jO.js} +5 -5
  52. package/dist/{turn-failure-response-Drhj_-t4.js → turn-failure-response-Ba7_kItn.js} +8 -8
  53. package/dist/{turn-lifecycle-BpIW3zOx.js → turn-lifecycle-D6CTbkb9.js} +1 -1
  54. package/dist/{turn-session-routing-Dg8GDgyc.js → turn-session-routing-DNevs9H7.js} +1 -1
  55. package/dist/{validation-DAkYeKDT.js → validation-BNPhuAvt.js} +2 -3
  56. package/dist/{version-9CB4Z-J4.js → version-EQ4MWuUJ.js} +1 -1
  57. package/dist/version.js +1 -1
  58. package/dist/{web-authorization-Cu33voNg.js → web-authorization-DDt4FZld.js} +6 -6
  59. package/dist/{web-input-B3k0J7WB.js → web-input-C56ivZuH.js} +86 -102
  60. package/dist/web-message-id-xPI_EFSC.js +239 -0
  61. package/dist/{work-PmkvcY9l.js → work-DJ7hb9Ul.js} +7 -7
  62. package/dist/{worker-COcaq2J6.js → worker-DiiV8Lba.js} +5 -5
  63. package/migrations/0045_conversation_forks.sql +3 -0
  64. package/migrations/0046_automation_versions.sql +71 -0
  65. package/migrations/0047_user_timezone.sql +1 -0
  66. package/migrations/meta/0045_snapshot.json +3503 -0
  67. package/migrations/meta/0046_snapshot.json +3707 -0
  68. package/migrations/meta/0047_snapshot.json +3713 -0
  69. package/migrations/meta/_journal.json +22 -1
  70. package/package.json +4 -4
  71. package/dist/web-message-id-CVVCTWUb.js +0 -464
  72. package/dist/{package-discovery-7a9YqLhE.js → package-discovery-BVvSnQBB.js} +1 -1
  73. package/dist/{plugin-module-BKGOXca2.js → plugin-module-CVvEUSMH.js} +1 -1
@@ -1,16 +1,16 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { a as embedTexts, r as completeObject } from "./client-BSnNHO0R.js";
3
- import { F as normalizeIdentityEmail, I as isRecord$2, a as extractGenAiUsageSummary, d as logException, f as logInfo, p as logWarn, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-F--48Q7Q.js";
2
+ import { a as embedTexts, r as completeObject } from "./client-CPMbTmJU.js";
3
+ import { F as normalizeIdentityEmail, I as isRecord$2, a as extractGenAiUsageSummary, d as logException, f as logInfo, p as logWarn, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-rB_ngE_R.js";
4
4
  import { a as getClient$1 } from "./sentry-CgWZM_kV.js";
5
- import { t as canExposeConversationPayload } from "./conversation-privacy-BV2dtba2.js";
6
- import { a as getChatConfig, n as botConfig, s as getSlackBotToken } from "./config-Bmw4xTPK.js";
5
+ import { t as canExposeConversationPayload } from "./conversation-privacy-Dbkdvozu.js";
6
+ import { i as getChatConfig, n as botConfig, o as getSlackBotToken } from "./config-CxpPG6nR.js";
7
7
  import { r as defaultModelId } from "./model-profile-BwU8mqwD.js";
8
8
  import { b as parseSlackMessageTs, c as isActorUserId, h as parseSlackTeamId, m as parseSlackChannelReferenceId, u as parseActorUserId } from "./context-0Et9iVSB.js";
9
9
  import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
10
- import { C as juniorCodeRepositories, D as juniorIdentities, E as juniorConversations, O as juniorUsers, S as juniorCodeChanges, T as conversationReadColumns, _ as CONVERSATION_METRICS, g as juniorConversationBriefs, h as juniorConversationBindings, i as juniorWorkspaces, m as juniorConversationParticipants, n as juniorSnapshots, r as juniorWorkspaceRepos, t as createJuniorSqlExecutor, v as juniorConversationMetrics, w as juniorAttachments, x as juniorConversationAnnotations, y as juniorConversationEvents } from "./executor-B9ksWZCv.js";
11
- import { $ as encodeHistoryPayload, C as conversationReportEventSchema, H as readMessageCardRefs, L as conversationBriefSchema, Q as newConversationEventSchema, R as parseBriefInput, X as decodeStoredConversationEvent, Z as historyReplacementSchema, it as usageSchema, j as readMessageAttachments, q as conversationEventDataSchema } from "./conversation-C_aYrISI.js";
12
- import { C as getDefaultRedisStateAdapterFor, N as SANDBOX_WORKSPACE_ROOT, k as sleep$1, l as isSandboxMissingError, n as hash, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-DZ2DUdd1.js";
13
- import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-BM_5mAU3.js";
10
+ import { C as juniorCodeChanges, D as juniorConversations, E as conversationReadColumns, O as juniorIdentities, S as juniorConversationAnnotations, T as juniorAttachments, _ as juniorConversationBriefs, b as juniorConversationEvents, g as juniorConversationBindings, h as juniorConversationParticipants, i as juniorWorkspaces, k as juniorUsers, n as juniorSnapshots, r as juniorWorkspaceRepos, t as createJuniorSqlExecutor, v as CONVERSATION_METRICS, w as juniorCodeRepositories, y as juniorConversationMetrics } from "./executor-BNxfDS1V.js";
11
+ import { $ as historyReplacementSchema, B as parseBriefInput, C as conversationReportEventSchema, N as readMessageAttachments, Q as decodeStoredConversationEvent, W as readMessageCardRefs, Y as conversationEventDataSchema, et as newConversationEventSchema, ot as usageSchema, tt as encodeHistoryPayload, z as conversationBriefSchema } from "./conversation-9Fxa1Zbq.js";
12
+ import { C as getDefaultRedisStateAdapterFor, N as SANDBOX_WORKSPACE_ROOT, k as sleep$1, l as isSandboxMissingError, n as hash, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-D6apIG2N.js";
13
+ import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-Ctwy6hSI.js";
14
14
  import { AsyncLocalStorage } from "node:async_hooks";
15
15
  import { z } from "zod";
16
16
  import { createHash, createHmac, randomUUID, timingSafeEqual } from "node:crypto";
@@ -141,6 +141,17 @@ async function upsertIdentityRecord(executor, identity, linkedUserId, nowMs) {
141
141
  ...row.userId ? { userId: row.userId } : void 0
142
142
  };
143
143
  }
144
+ /** Read the saved timezone for one user. */
145
+ async function readUserTimezone(db, userId) {
146
+ return (await db.select({ timezone: juniorUsers.timezone }).from(juniorUsers).where(eq(juniorUsers.id, userId)).limit(1))[0]?.timezone ?? void 0;
147
+ }
148
+ /** Save the IANA timezone for one user. */
149
+ async function saveUserTimezone(db, userId, timezone, nowMs) {
150
+ await db.update(juniorUsers).set({
151
+ timezone,
152
+ updatedAt: dateFromMs$1(nowMs)
153
+ }).where(and(eq(juniorUsers.id, userId), sql`${juniorUsers.timezone} is distinct from ${timezone}`));
154
+ }
144
155
  /** Persist one provider identity observation and link verified emails to users. */
145
156
  async function upsertIdentity(executor, identity, nowMs = Date.now()) {
146
157
  return await upsertIdentityRecord(executor, identity, void 0, nowMs);
@@ -5743,4 +5754,4 @@ function createPluginHookRunner(input = {}) {
5743
5754
  };
5744
5755
  }
5745
5756
  //#endregion
5746
- export { readActorIdentity as $, getConversationMessageSearchStore as $t, getWorkspaceSnapshotBuilder as A, conversationHasParticipantUser as At, SlackActionError as B, readAttachmentVisionSummary as Bt, WorkspaceValidationError as C, createPluginModel as Ct, setWorkspaceSnapshotBuild as D, conversationArchivedForEmail as Dt, setWorkspaceSnapshot as E, conversationArchiveTimes as Et, bindScheduledAutomationCredentialSubject as F, readLatestConversationBrief as Ft, isConversationScopedChannel as G, listConversationAnnotations as Gt, getFilePermalink as H, resolveRootVisibility as Ht, bindSlackDirectCredentialSubject as I, readConversationEventPage as It, runWithSlackInstallationToken as J, agentsInstructionsUpdatedEvent as Jt, isDmChannel as K, listConversationAnnotationsById as Kt, verifyEventAutomationCredentialSubject as L, buildSentryConversationUrl as Lt, workspaceRepoCheckoutPath as M, conversationNotArchivedForUser as Mt, resolveChannelCapabilities as N, viewerConversationMembership as Nt, SANDBOX_RUNTIME as O, conversationArchivedForUser as Ot, bindEventAutomationCredentialSubject as P, createPluginConversationEvents as Pt, findUserByEmail as Q, getConversationEventStore as Qt, verifyScheduledAutomationCredentialSubject as R, getSlackFileId as Rt, updateWorkspace as S, createPluginEmbedder as St, loadSnapshotsForProfile as T, readConversationAccessFromSql as Tt, getHeaderString as U, saveObjectAnnotations as Ut, downloadPrivateSlackFile as V, recordSlackAttachment as Vt, getSlackClient as W, createPluginAnnotations as Wt, getWorkspaceTeamId as X, authenticationUnlinkedEvent as Xt, withSlackRetries as Y, authenticationLinkedEvent as Yt, runWithWorkspaceTeamId as Z, db_exports as Zt, deleteWorkspace as _, upsertLinkedIdentity as _n, getDashboardConversationLink as _t, getPluginRoutes as a, withConversationMutationLock as an, RESOURCE_WATCH_TOOL_SOURCE as at, listWorkspaces as b, requireSlackDestination as bn, setDashboardConversationLinkOptions as bt, getPluginTools as c, parseSessionSource as cn, cancelWatch as ct, setPlugins as d, agentTurnTotalTokens as dn, createWatch as dt, getConversationStore as en, resolveViewerUser as et, validatePlugins as f, agentTurnUsageSchema as fn, deliverWatch as ft, createWorkspace as g, upsertIdentity as gn, JUNIOR_THREAD_STATE_TTL_MS as gt, setBriefsConfig as h, deleteProviderIdentityForSlackUser as hn, takeDueTimerWatches as ht, getPluginApiRoutes as i, withConversationEventLock as in, RESOURCE_SUBSCRIPTION_MAX_TTL_MS as it, tryWorkspaceRepoCheckoutPath as j, conversationNotArchivedForEmail as jt, deleteWorkspaceSnapshotBuilders as k, conversationHasParticipantEmail as kt, getPluginUserPromptContributions as l, addAgentTurnUsage as ln, collectEventMatchKeys as lt, registration_exports as m, resolveRootConversationId as mn, listWatches as mt, applyPluginFormatMarkdown as n, getSqlExecutor as nn, getSlackToolContext as nt, getPluginSlackConversationLink as o, locationFromRow as on, STOP_WATCHING_TOOL_NAME as ot, coreTaskRegistrations as p, hasAgentTurnUsage as pn, findMatchingWatches as pt, normalizeSlackConversationId as q, JUNIOR_NATIVE_EVENT_NAMESPACE as qt, createPluginHookRunner as r, createSqlConversationEventStore as rn, RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS as rt, getPluginSystemPromptContributions as s, bindProviderConversation as sn, cancelSubscriptions as st, agent_hooks_exports as t, getDb as tn, updateViewerDisplayName as tt, getPlugins as u, agentTurnCostUsd as un, createTimerWatch as ut, getWorkspace as v, createSlackDestination as vn, getDashboardObjectIconLink as vt, invalidateReadySnapshot as w, createPluginLogger as wt, listWorkspacesByRepository as x, sameDestination as xn, createPluginState as xt, getWorkspaceByName as y, parseDestination as yn, getDashboardTaskLink as yt, verifySlackDirectCredentialSubject as z, matchSlackAttachments as zt };
5757
+ export { readActorIdentity as $, getConversationMessageSearchStore as $t, getWorkspaceSnapshotBuilder as A, conversationHasParticipantUser as At, SlackActionError as B, readAttachmentVisionSummary as Bt, WorkspaceValidationError as C, sameDestination as Cn, createPluginModel as Ct, setWorkspaceSnapshotBuild as D, conversationArchivedForEmail as Dt, setWorkspaceSnapshot as E, conversationArchiveTimes as Et, bindScheduledAutomationCredentialSubject as F, readLatestConversationBrief as Ft, isConversationScopedChannel as G, listConversationAnnotations as Gt, getFilePermalink as H, resolveRootVisibility as Ht, bindSlackDirectCredentialSubject as I, readConversationEventPage as It, runWithSlackInstallationToken as J, agentsInstructionsUpdatedEvent as Jt, isDmChannel as K, listConversationAnnotationsById as Kt, verifyEventAutomationCredentialSubject as L, buildSentryConversationUrl as Lt, workspaceRepoCheckoutPath as M, conversationNotArchivedForUser as Mt, resolveChannelCapabilities as N, viewerConversationMembership as Nt, SANDBOX_RUNTIME as O, conversationArchivedForUser as Ot, bindEventAutomationCredentialSubject as P, createPluginConversationEvents as Pt, findUserByEmail as Q, getConversationEventStore as Qt, verifyScheduledAutomationCredentialSubject as R, getSlackFileId as Rt, updateWorkspace as S, requireSlackDestination as Sn, createPluginEmbedder as St, loadSnapshotsForProfile as T, readConversationAccessFromSql as Tt, getHeaderString as U, saveObjectAnnotations as Ut, downloadPrivateSlackFile as V, recordSlackAttachment as Vt, getSlackClient as W, createPluginAnnotations as Wt, getWorkspaceTeamId as X, authenticationUnlinkedEvent as Xt, withSlackRetries as Y, authenticationLinkedEvent as Yt, runWithWorkspaceTeamId as Z, db_exports as Zt, deleteWorkspace as _, saveUserTimezone as _n, getDashboardConversationLink as _t, getPluginRoutes as a, withConversationMutationLock as an, RESOURCE_WATCH_TOOL_SOURCE as at, listWorkspaces as b, createSlackDestination as bn, setDashboardConversationLinkOptions as bt, getPluginTools as c, parseSessionSource as cn, cancelWatch as ct, setPlugins as d, agentTurnTotalTokens as dn, createWatch as dt, getConversationStore as en, resolveViewerUser as et, validatePlugins as f, agentTurnUsageSchema as fn, deliverWatch as ft, createWorkspace as g, readUserTimezone as gn, JUNIOR_THREAD_STATE_TTL_MS as gt, setBriefsConfig as h, deleteProviderIdentityForSlackUser as hn, takeDueTimerWatches as ht, getPluginApiRoutes as i, withConversationEventLock as in, RESOURCE_SUBSCRIPTION_MAX_TTL_MS as it, tryWorkspaceRepoCheckoutPath as j, conversationNotArchivedForEmail as jt, deleteWorkspaceSnapshotBuilders as k, conversationHasParticipantEmail as kt, getPluginUserPromptContributions as l, addAgentTurnUsage as ln, collectEventMatchKeys as lt, registration_exports as m, resolveRootConversationId as mn, listWatches as mt, applyPluginFormatMarkdown as n, getSqlExecutor as nn, getSlackToolContext as nt, getPluginSlackConversationLink as o, locationFromRow as on, STOP_WATCHING_TOOL_NAME as ot, coreTaskRegistrations as p, hasAgentTurnUsage as pn, findMatchingWatches as pt, normalizeSlackConversationId as q, JUNIOR_NATIVE_EVENT_NAMESPACE as qt, createPluginHookRunner as r, createSqlConversationEventStore as rn, RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS as rt, getPluginSystemPromptContributions as s, bindProviderConversation as sn, cancelSubscriptions as st, agent_hooks_exports as t, getDb as tn, updateViewerDisplayName as tt, getPlugins as u, agentTurnCostUsd as un, createTimerWatch as ut, getWorkspace as v, upsertIdentity as vn, getDashboardObjectIconLink as vt, invalidateReadySnapshot as w, createPluginLogger as wt, listWorkspacesByRepository as x, parseDestination as xn, createPluginState as xt, getWorkspaceByName as y, upsertLinkedIdentity as yn, getDashboardTaskLink as yt, verifySlackDirectCredentialSubject as z, matchSlackAttachments as zt };