@sentry/junior 0.250.0 → 0.252.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 (61) hide show
  1. package/dist/{admin-DMKyXi83.js → admin-C_-XEdym.js} +1 -1
  2. package/dist/{agent-hooks-CtZuJPTU.js → agent-hooks-DcoKnnxn.js} +36 -13
  3. package/dist/{agent-runner-CNiTpIpb.js → agent-runner-B-7S_DCS.js} +357 -99
  4. package/dist/api/schema.d.ts +46 -32
  5. package/dist/api/schema.js +2 -2
  6. package/dist/api.js +50 -65
  7. package/dist/app.js +52 -81
  8. package/dist/{assistant-reply-K5r1pcgJ.js → assistant-reply-DbPLvsnL.js} +1 -1
  9. package/dist/{briefs-8xyS3oeV.js → briefs-D4SMqc-r.js} +4 -4
  10. package/dist/{catalog-runtime-BQ3g3OX_.js → catalog-runtime-BQQiwwA7.js} +1 -1
  11. package/dist/cli/chat.js +15 -15
  12. package/dist/cli/check.js +3 -3
  13. package/dist/cli/main.js +2 -2
  14. package/dist/cli/plugins.js +4 -4
  15. package/dist/cli/snapshot-create.js +3 -3
  16. package/dist/cli/upgrade.js +3 -3
  17. package/dist/{client-Q27hki0Y.js → client-ROZeVjq0.js} +2 -2
  18. package/dist/{config-Cb--Qs-g.js → config-DNNkxfGS.js} +2 -2
  19. package/dist/{connections-DZ70JeSN.js → connections-DJV6mLrH.js} +9 -9
  20. package/dist/{conversation-NutPJ8S8.js → conversation-T18Xlkx9.js} +9 -1
  21. package/dist/{conversation-privacy-BIDN1sW3.js → conversation-privacy-B19umzIL.js} +1 -1
  22. package/dist/{credential-sync-CyAN-Gos.js → credential-sync-CEd2F5PS.js} +14 -14
  23. package/dist/{executor-D8y7v95s.js → executor-_4bdoCxe.js} +59 -19
  24. package/dist/{images-BkGhqKIK.js → images-BAN7DHuO.js} +3 -3
  25. package/dist/instrumentation.js +2 -2
  26. package/dist/{job-queue-uGq6Grnt.js → job-queue-DSQx1qFY.js} +1 -1
  27. package/dist/{logging-C22RdmU8.js → logging-COUsTFIL.js} +1 -1
  28. package/dist/{message-D0RPetp-.js → message-CtDDEwwV.js} +3 -3
  29. package/dist/nitro.js +3 -3
  30. package/dist/{oauth-callback-server-DF_Odkvh.js → oauth-callback-server-CCiKrS0s.js} +2 -2
  31. package/dist/{pending-auth-Bg3A1-pE.js → pending-auth-DDx3EU4M.js} +2 -2
  32. package/dist/{profile-DK9umvav.js → profile-DP4LKL6V.js} +4 -4
  33. package/dist/{prompt-kYP1FAX_.js → prompt-C04mP1hu.js} +1 -1
  34. package/dist/{registry-BvsLuoLK.js → registry-CeEpPna6.js} +1 -1
  35. package/dist/{resolve-C9btOXju.js → resolve-B5ma3igH.js} +2 -2
  36. package/dist/{result-CcdQ2iau.js → result-Da0RVuWG.js} +7 -7
  37. package/dist/{runner-Bem4DUHN.js → runner-se1W_jGZ.js} +10 -10
  38. package/dist/{sandbox-egress-signals-Bl-4cF7E.js → sandbox-egress-signals-CS959-wm.js} +1 -1
  39. package/dist/{schema-DELmAdjR.js → schema-C9Vnyb_f.js} +1 -1
  40. package/dist/{session-stop-DteRDRCi.js → session-stop-DlRDisF5.js} +11 -11
  41. package/dist/{skills-CVwSL6Gc.js → skills-CSzgs0EC.js} +2 -2
  42. package/dist/{spawn-CA0YYtzr.js → spawn-DT9fMjtd.js} +2 -2
  43. package/dist/{store-Dw3eBN9S.js → store-Dx1U69mm.js} +6 -6
  44. package/dist/{task-queue-C7cyjcVj.js → task-queue-BX9YrIsw.js} +3 -3
  45. package/dist/{task-runner-BbSyWmOq.js → task-runner-CO55Olal.js} +46 -13
  46. package/dist/{tasks-B8nH3ND_.js → tasks-DwGlFX9i.js} +166 -212
  47. package/dist/{thread-state-BTOLzCM-.js → thread-state-Ces6tXmB.js} +6 -6
  48. package/dist/{turn-failure-response-BwNfO8Xt.js → turn-failure-response-B4VCvEQf.js} +8 -8
  49. package/dist/{turn-lifecycle-DSN0xGW7.js → turn-lifecycle-B1VV58Yo.js} +1 -1
  50. package/dist/{turn-session-routing-BRKYIn6n.js → turn-session-routing-Dw2Kamg9.js} +1 -1
  51. package/dist/{validation-CBkyzKCP.js → validation-yJF9LKOv.js} +1 -1
  52. package/dist/{version-CkwwLVLb.js → version-CZYqvIFh.js} +1 -1
  53. package/dist/version.js +1 -1
  54. package/dist/{viewer-DdzigZQh.js → viewer-D96vo_42.js} +3 -3
  55. package/dist/{web-input-BjdnnpuN.js → web-input-5mls-41-.js} +105 -104
  56. package/dist/{work-qQEjtmlv.js → work-D2M2-zCO.js} +9 -9
  57. package/dist/{worker-C-CSZMy_.js → worker-BwCpf8tB.js} +5 -5
  58. package/migrations/0055_automations.sql +125 -0
  59. package/migrations/meta/0055_snapshot.json +3948 -0
  60. package/migrations/meta/_journal.json +8 -1
  61. package/package.json +5 -5
@@ -1,4 +1,4 @@
1
- import { a as setUserAdminFromSql, d as getDb, n as listAdminUsersFromSql } from "./viewer-DdzigZQh.js";
1
+ import { a as setUserAdminFromSql, d as getDb, n as listAdminUsersFromSql } from "./viewer-D96vo_42.js";
2
2
  import { CLI_USAGE } from "./cli/run.js";
3
3
  //#region src/cli/admin.ts
4
4
  /**
@@ -1,20 +1,20 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { a as embedTexts, r as completeObject } from "./client-Q27hki0Y.js";
3
- import { I as isRecord$1, a as extractGenAiUsageSummary, d as logException, f as logInfo, p as logWarn, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-C22RdmU8.js";
2
+ import { a as embedTexts, r as completeObject } from "./client-ROZeVjq0.js";
3
+ import { I as isRecord$1, a as extractGenAiUsageSummary, d as logException, f as logInfo, p as logWarn, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-COUsTFIL.js";
4
4
  import { a as getClient$1 } from "./sentry-CgWZM_kV.js";
5
- import { t as canExposeConversationPayload } from "./conversation-privacy-BIDN1sW3.js";
6
- import { i as getChatConfig, n as botConfig, o as getSlackBotToken } from "./config-Cb--Qs-g.js";
5
+ import { t as canExposeConversationPayload } from "./conversation-privacy-B19umzIL.js";
6
+ import { i as getChatConfig, n as botConfig, o as getSlackBotToken } from "./config-DNNkxfGS.js";
7
7
  import { r as defaultModelId } from "./model-profile-BwU8mqwD.js";
8
8
  import { d as parseSlackTeamId, g as parseSlackMessageTs, i as isActorUserId, o as parseActorUserId, u as parseSlackChannelReferenceId } from "./actor-BTtLaeWy.js";
9
- import { O as readUserTimezone, T as hasAgentTurnUsage, c as getConversationEventStore, d as getDb, f as getSqlExecutor, h as createSqlStore, i as resolveViewerUser, k as saveUserTimezone, r as readActorIdentity } from "./viewer-DdzigZQh.js";
9
+ import { O as readUserTimezone, T as hasAgentTurnUsage, c as getConversationEventStore, d as getDb, f as getSqlExecutor, h as createSqlStore, i as resolveViewerUser, k as saveUserTimezone, r as readActorIdentity } from "./viewer-D96vo_42.js";
10
10
  import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
11
- import { S as juniorAttachments, _ as juniorConversationEvents, b as juniorCodeChanges, f as juniorConversationParticipants, i as juniorWorkspaces, m as juniorConversationBriefs, n as juniorSnapshots, r as juniorWorkspaceRepos, x as juniorCodeRepositories, y as juniorConversationAnnotations } from "./executor-D8y7v95s.js";
11
+ import { b as juniorCodeRepositories, d as juniorConversationParticipants, g as juniorConversationEvents, i as juniorWorkspaces, n as juniorSnapshots, p as juniorConversationBriefs, r as juniorWorkspaceRepos, v as juniorConversationAnnotations, x as juniorAttachments, y as juniorCodeChanges } from "./executor-_4bdoCxe.js";
12
12
  import { o as decodeStoredConversationEvent } from "./history-9pO1Zd4Y.js";
13
- import { p as credentialSubjectSchema } from "./registry-BvsLuoLK.js";
14
- import { C as conversationReportEventSchema, F as readMessageAttachments, H as conversationBriefSchema, U as parseBriefInput, q as readMessageCardRefs } from "./conversation-NutPJ8S8.js";
15
- 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-DK9umvav.js";
13
+ import { p as credentialSubjectSchema } from "./registry-CeEpPna6.js";
14
+ import { C as conversationReportEventSchema, F as readMessageAttachments, H as conversationBriefSchema, U as parseBriefInput, q as readMessageCardRefs } from "./conversation-T18Xlkx9.js";
15
+ 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-DP4LKL6V.js";
16
16
  import { i as isValidTimeZone } from "./cadence-D00SCzT1.js";
17
- import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-kYP1FAX_.js";
17
+ import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-C04mP1hu.js";
18
18
  import { AsyncLocalStorage } from "node:async_hooks";
19
19
  import { z } from "zod";
20
20
  import { createHash, createHmac, randomUUID, timingSafeEqual } from "node:crypto";
@@ -125,10 +125,24 @@ const agentsInstructionsUpdatedEvent = defineConversationEvent({
125
125
  };
126
126
  }
127
127
  });
128
+ /** Core-written Conversation note. `notes.ts` owns when the model sees it. */
129
+ const conversationNoteEvent = defineConversationEvent({
130
+ name: "conversation_note",
131
+ version: 1,
132
+ schema: z.object({ text: z.string().trim().min(1).max(500) }).strict(),
133
+ renderEvent(event) {
134
+ return {
135
+ icon: "info",
136
+ title: "Note for the next Turn",
137
+ preview: event.text
138
+ };
139
+ }
140
+ });
128
141
  const NATIVE_EVENT_DEFINITIONS = [
129
142
  authenticationLinkedEvent,
130
143
  authenticationUnlinkedEvent,
131
- agentsInstructionsUpdatedEvent
144
+ agentsInstructionsUpdatedEvent,
145
+ conversationNoteEvent
132
146
  ];
133
147
  /** Resolve a registered Junior-native conversation event definition. */
134
148
  function getJuniorNativeEventDefinition(args) {
@@ -2701,6 +2715,15 @@ async function listWatches(input) {
2701
2715
  const ids = await readSubscriptionIdIndex(state, conversationIndexKey(input.conversationId));
2702
2716
  return (await Promise.all(ids.map(async (id) => parseSubscription(await state.get(subscriptionKey(id)))))).filter((record) => record !== void 0 && record.conversationId === input.conversationId && activeAt(record, nowMs)).sort((left, right) => left.createdAtMs - right.createdAtMs);
2703
2717
  }
2718
+ /**
2719
+ * Read one watch by id in any status. The caller checks that its Conversation
2720
+ * owns the watch before it acts on it.
2721
+ */
2722
+ async function getWatch(input) {
2723
+ const state = input.state ?? getStateAdapter();
2724
+ await state.connect();
2725
+ return parseSubscription(await state.get(subscriptionKey(input.id)));
2726
+ }
2704
2727
  /** Cancel a current-conversation subscription and remove it from match indexes. */
2705
2728
  async function cancelWatch(input) {
2706
2729
  const state = input.state ?? getStateAdapter();
@@ -2818,7 +2841,7 @@ const RESOURCE_SUBSCRIPTION_MAX_TTL_MS = 2592e6;
2818
2841
  const STOP_WATCHING_TOOL_NAME = "stopWatchingResources";
2819
2842
  const RESOURCE_WATCH_TOOL_SOURCE = {
2820
2843
  id: "resource-watches",
2821
- description: "Inspect or stop watches for the current conversation."
2844
+ description: "Inspect or stop watches for the current conversation and its child agents."
2822
2845
  };
2823
2846
  //#endregion
2824
2847
  //#region src/chat/slack/tool-support/context.ts
@@ -4348,4 +4371,4 @@ function createPluginHookRunner(input = {}) {
4348
4371
  };
4349
4372
  }
4350
4373
  //#endregion
4351
- export { verifyEventAutomationCredentialSubject as $, getWorkspaceSnapshotBuilder as A, saveObjectAnnotations as At, STOP_WATCHING_TOOL_NAME as B, getHeaderString as Bt, WorkspaceValidationError as C, readConversationEventPage as Ct, setWorkspaceSnapshotBuild as D, readAttachmentVisionSummary as Dt, setWorkspaceSnapshot as E, matchSlackAttachments as Et, isSlackMessageTurn as F, resolveUserTimezone as Ft, createWatch as G, runWithSlackInstallationToken as Gt, cancelWatch as H, isConversationScopedChannel as Ht, slackMessageTurnDisabledReason as I, lookupSlackUser as It, listWatches as J, runWithWorkspaceTeamId as Jt, deliverWatch as K, withSlackRetries as Kt, RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS as L, SlackActionError as Lt, workspaceRepoCheckoutPath as M, listConversationAnnotations as Mt, resolveChannelCapabilities as N, listConversationAnnotationsById as Nt, SANDBOX_RUNTIME as O, recordSlackAttachment as Ot, getSlackToolContext as P, defaultTimezone as Pt, bindSlackDirectCredentialSubject as Q, authenticationUnlinkedEvent as Qt, RESOURCE_SUBSCRIPTION_MAX_TTL_MS as R, downloadPrivateSlackFile as Rt, updateWorkspace as S, readLatestConversationBrief as St, loadSnapshotsForProfile as T, getSlackFileId as Tt, collectEventMatchKeys as U, isDmChannel as Ut, cancelSubscriptions as V, getSlackClient as Vt, createTimerWatch as W, normalizeSlackConversationId as Wt, bindEventAutomationCredentialSubject as X, agentsInstructionsUpdatedEvent as Xt, takeDueTimerWatches as Y, JUNIOR_NATIVE_EVENT_NAMESPACE as Yt, bindScheduledAutomationCredentialSubject as Z, authenticationLinkedEvent as Zt, deleteWorkspace as _, conversationHasParticipantUser as _t, getPluginRoutes as a, getDashboardObjectIconLink as at, listWorkspaces as b, viewerConversationMembership as bt, getPluginTools as c, createPluginState as ct, setPlugins as d, createPluginLogger as dt, verifyScheduledAutomationCredentialSubject as et, validatePlugins as f, readConversationAccessFromSql as ft, createWorkspace as g, conversationHasParticipantEmail as gt, setBriefsConfig as h, conversationArchivedForUser as ht, getPluginApiRoutes as i, getDashboardConversationLink as it, tryWorkspaceRepoCheckoutPath as j, createPluginAnnotations as jt, deleteWorkspaceSnapshotBuilders as k, resolveRootVisibility as kt, getPluginUserPromptContributions as l, createPluginEmbedder as lt, registration_exports as m, conversationArchivedForEmail as mt, applyPluginFormatMarkdown as n, verifyTimerWatchCredentialSubject as nt, getPluginSlackConversationLink as o, getDashboardTaskLink as ot, coreTaskRegistrations as p, conversationArchiveTimes as pt, findMatchingWatches as q, getWorkspaceTeamId as qt, createPluginHookRunner as r, JUNIOR_THREAD_STATE_TTL_MS as rt, getPluginSystemPromptContributions as s, setDashboardConversationLinkOptions as st, agent_hooks_exports as t, verifySlackDirectCredentialSubject as tt, getPlugins as u, createPluginModel as ut, getWorkspace as v, conversationNotArchivedForEmail as vt, invalidateReadySnapshot as w, buildSentryConversationUrl as wt, listWorkspacesByRepository as x, createPluginConversationEvents as xt, getWorkspaceByName as y, conversationNotArchivedForUser as yt, RESOURCE_WATCH_TOOL_SOURCE as z, getFilePermalink as zt };
4374
+ export { bindSlackDirectCredentialSubject as $, authenticationUnlinkedEvent as $t, getWorkspaceSnapshotBuilder as A, resolveRootVisibility as At, STOP_WATCHING_TOOL_NAME as B, getFilePermalink as Bt, WorkspaceValidationError as C, readLatestConversationBrief as Ct, setWorkspaceSnapshotBuild as D, matchSlackAttachments as Dt, setWorkspaceSnapshot as E, getSlackFileId as Et, isSlackMessageTurn as F, defaultTimezone as Ft, createWatch as G, normalizeSlackConversationId as Gt, cancelWatch as H, getSlackClient as Ht, slackMessageTurnDisabledReason as I, resolveUserTimezone as It, getWatch as J, getWorkspaceTeamId as Jt, deliverWatch as K, runWithSlackInstallationToken as Kt, RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS as L, lookupSlackUser as Lt, workspaceRepoCheckoutPath as M, createPluginAnnotations as Mt, resolveChannelCapabilities as N, listConversationAnnotations as Nt, SANDBOX_RUNTIME as O, readAttachmentVisionSummary as Ot, getSlackToolContext as P, listConversationAnnotationsById as Pt, bindScheduledAutomationCredentialSubject as Q, authenticationLinkedEvent as Qt, RESOURCE_SUBSCRIPTION_MAX_TTL_MS as R, SlackActionError as Rt, updateWorkspace as S, createPluginConversationEvents as St, loadSnapshotsForProfile as T, buildSentryConversationUrl as Tt, collectEventMatchKeys as U, isConversationScopedChannel as Ut, cancelSubscriptions as V, getHeaderString as Vt, createTimerWatch as W, isDmChannel as Wt, takeDueTimerWatches as X, JUNIOR_NATIVE_EVENT_NAMESPACE as Xt, listWatches as Y, runWithWorkspaceTeamId as Yt, bindEventAutomationCredentialSubject as Z, agentsInstructionsUpdatedEvent as Zt, deleteWorkspace as _, conversationHasParticipantEmail as _t, getPluginRoutes as a, getDashboardConversationLink as at, listWorkspaces as b, conversationNotArchivedForUser as bt, getPluginTools as c, setDashboardConversationLinkOptions as ct, setPlugins as d, createPluginModel as dt, conversationNoteEvent as en, verifyEventAutomationCredentialSubject as et, validatePlugins as f, createPluginLogger as ft, createWorkspace as g, conversationArchivedForUser as gt, setBriefsConfig as h, conversationArchivedForEmail as ht, getPluginApiRoutes as i, JUNIOR_THREAD_STATE_TTL_MS as it, tryWorkspaceRepoCheckoutPath as j, saveObjectAnnotations as jt, deleteWorkspaceSnapshotBuilders as k, recordSlackAttachment as kt, getPluginUserPromptContributions as l, createPluginState as lt, registration_exports as m, conversationArchiveTimes as mt, applyPluginFormatMarkdown as n, verifySlackDirectCredentialSubject as nt, getPluginSlackConversationLink as o, getDashboardObjectIconLink as ot, coreTaskRegistrations as p, readConversationAccessFromSql as pt, findMatchingWatches as q, withSlackRetries as qt, createPluginHookRunner as r, verifyTimerWatchCredentialSubject as rt, getPluginSystemPromptContributions as s, getDashboardTaskLink as st, agent_hooks_exports as t, verifyScheduledAutomationCredentialSubject as tt, getPlugins as u, createPluginEmbedder as ut, getWorkspace as v, conversationHasParticipantUser as vt, invalidateReadySnapshot as w, readConversationEventPage as wt, listWorkspacesByRepository as x, viewerConversationMembership as xt, getWorkspaceByName as y, conversationNotArchivedForEmail as yt, RESOURCE_WATCH_TOOL_SOURCE as z, downloadPrivateSlackFile as zt };