@sentry/junior 0.147.0 → 0.148.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 (155) hide show
  1. package/dist/{agent-hooks-HS6VGUPM.js → agent-hooks-VAUYT6PD.js} +10 -10
  2. package/dist/api/conversations/access.d.ts +2 -1
  3. package/dist/api/conversations/archive.d.ts +3 -5
  4. package/dist/api/conversations/create.d.ts +6 -0
  5. package/dist/api/conversations/detail.d.ts +2 -296
  6. package/dist/api/conversations/event-list.d.ts +2 -193
  7. package/dist/api/conversations/list.d.ts +4 -66
  8. package/dist/api/conversations/routes.d.ts +1 -1
  9. package/dist/api/conversations/stats.d.ts +0 -54
  10. package/dist/api/http.d.ts +2 -6
  11. package/dist/api/locations/detail.d.ts +3 -111
  12. package/dist/api/locations/list.d.ts +0 -45
  13. package/dist/api/locations/query.d.ts +2 -1
  14. package/dist/api/locations/routes.d.ts +1 -1
  15. package/dist/api/people/list.d.ts +0 -29
  16. package/dist/api/people/profile.d.ts +2 -106
  17. package/dist/api/people/profile.query.d.ts +2 -1
  18. package/dist/api/people/routes.d.ts +1 -1
  19. package/dist/api/people/shared.d.ts +1 -1
  20. package/dist/api/people/spend.d.ts +3 -4
  21. package/dist/api/personal-tokens/routes.d.ts +2 -2
  22. package/dist/api/route.d.ts +8 -14
  23. package/dist/api/schema/conversation.d.ts +60 -29
  24. package/dist/api/schema/location.d.ts +4 -0
  25. package/dist/api/schema/person.d.ts +7 -3
  26. package/dist/api/schema.d.ts +2 -2
  27. package/dist/api/schema.js +7 -1
  28. package/dist/api/stats.d.ts +0 -13
  29. package/dist/api/validation.d.ts +7 -0
  30. package/dist/api/viewer.d.ts +3 -0
  31. package/dist/api.d.ts +2 -1
  32. package/dist/api.js +624 -562
  33. package/dist/app.js +183 -105
  34. package/dist/{catalog-runtime-M6ZTPYRV.js → catalog-runtime-WADOZVTB.js} +5 -5
  35. package/dist/chat/actor.d.ts +4 -1
  36. package/dist/chat/agent/request.d.ts +2 -0
  37. package/dist/chat/agent/resume.d.ts +1 -0
  38. package/dist/chat/agent-dispatch/context.d.ts +2 -2
  39. package/dist/chat/agent-invocations/types.d.ts +52 -0
  40. package/dist/chat/api-turns/work.d.ts +103 -0
  41. package/dist/chat/conversations/history.d.ts +60 -0
  42. package/dist/chat/conversations/provenance.d.ts +6 -0
  43. package/dist/chat/conversations/sql/actor-identity.d.ts +19 -0
  44. package/dist/chat/conversations/store.d.ts +1 -1
  45. package/dist/chat/resource-events/store.d.ts +1 -1
  46. package/dist/chat/runtime/reply-executor.d.ts +1 -1
  47. package/dist/chat/runtime/slack-runtime.d.ts +2 -1
  48. package/dist/chat/runtime/turn-preparation.d.ts +9 -0
  49. package/dist/chat/scheduled-tasks/tool-support.d.ts +5 -5
  50. package/dist/chat/scheduled-tasks/tools/create.d.ts +2 -2
  51. package/dist/chat/scheduled-tasks/tools/delete.d.ts +2 -2
  52. package/dist/chat/scheduled-tasks/tools/list.d.ts +2 -2
  53. package/dist/chat/scheduled-tasks/tools/run-now.d.ts +2 -2
  54. package/dist/chat/scheduled-tasks/tools/update.d.ts +2 -2
  55. package/dist/chat/slack/channel.d.ts +26 -0
  56. package/dist/chat/slack/dispatch-turn.d.ts +1 -0
  57. package/dist/chat/slack/timestamp-param.d.ts +0 -2
  58. package/dist/chat/slack/{tools → tool-support}/canvas/api.d.ts +1 -1
  59. package/dist/chat/slack/{tools → tool-support}/canvas/context.d.ts +3 -0
  60. package/dist/chat/slack/tool-support/channel-access.d.ts +42 -0
  61. package/dist/chat/slack/tool-support/channel-target.d.ts +27 -0
  62. package/dist/chat/slack/tool-support/list/params.d.ts +5 -0
  63. package/dist/chat/slack/tools/canvas/create.d.ts +1 -1
  64. package/dist/chat/slack/tools/channel-join.d.ts +28 -0
  65. package/dist/chat/slack/tools/channel-list-messages.d.ts +3 -2
  66. package/dist/chat/slack/tools/conversation-message-search.d.ts +2 -8
  67. package/dist/chat/slack/tools/message-add-reaction.d.ts +1 -1
  68. package/dist/chat/slack/tools/public-search.d.ts +63 -2
  69. package/dist/chat/slack/tools/send-files.d.ts +1 -1
  70. package/dist/chat/slack/tools/thread-read.d.ts +2 -5
  71. package/dist/chat/source.d.ts +2 -0
  72. package/dist/chat/task-execution/checkpoint.d.ts +1 -0
  73. package/dist/chat/task-execution/state.d.ts +9 -4
  74. package/dist/chat/task-execution/store.d.ts +3 -2
  75. package/dist/chat/task-execution/turn-cursor.d.ts +2 -0
  76. package/dist/chat/task-execution/worker.d.ts +2 -0
  77. package/dist/chat/tasks/read.d.ts +1 -1
  78. package/dist/chat/tools/search-conversation-events.d.ts +1 -1
  79. package/dist/chat/tools/types.d.ts +11 -4
  80. package/dist/chat/tools/watch-resource-events.d.ts +2 -2
  81. package/dist/{chunk-ORO3PWKQ.js → chunk-2B3PT3V2.js} +1 -1
  82. package/dist/{chunk-SVHUEHUL.js → chunk-45LOR4PU.js} +21 -4
  83. package/dist/{chunk-YBVXBNSV.js → chunk-4AQZYNHM.js} +2 -2
  84. package/dist/{chunk-Z4YU7Z4L.js → chunk-4EA2SFK2.js} +65 -4
  85. package/dist/{chunk-7NVJVJID.js → chunk-4GXJUYJV.js} +2 -2
  86. package/dist/{chunk-IIOOO4FQ.js → chunk-55F4QU2V.js} +2 -1
  87. package/dist/{chunk-745QJ3ZA.js → chunk-7OEIXFC3.js} +2 -2
  88. package/dist/{chunk-DU74WPIC.js → chunk-D3WPMGEX.js} +1 -1
  89. package/dist/{chunk-PVNG6UMU.js → chunk-D6YX4NNN.js} +22 -10
  90. package/dist/chunk-DUY5CDAM.js +36 -0
  91. package/dist/{chunk-4LJO56OJ.js → chunk-EAI67NTM.js} +1 -1
  92. package/dist/{chunk-X5UY34KT.js → chunk-EINWQFXI.js} +8 -8
  93. package/dist/chunk-GDFF3BQG.js +136 -0
  94. package/dist/{chunk-EFLJ2WJH.js → chunk-GXYDVZKM.js} +5 -5
  95. package/dist/{chunk-CWP5RHVX.js → chunk-HLPLT3NY.js} +8 -5
  96. package/dist/{chunk-JUUKWRBE.js → chunk-HWQGBIH7.js} +1 -1
  97. package/dist/{chunk-AZ7EAOBE.js → chunk-IL4EDBMV.js} +5 -5
  98. package/dist/{chunk-DLDRQHG5.js → chunk-LAZGHEYU.js} +1 -1
  99. package/dist/{chunk-RXBVB2JM.js → chunk-LE5H7LMT.js} +1 -1
  100. package/dist/chunk-LNVEIJ2L.js +48 -0
  101. package/dist/{chunk-YEO3VX72.js → chunk-OJCP3C3J.js} +8 -6
  102. package/dist/{chunk-GGB4WL5A.js → chunk-POSZWRGL.js} +1 -1
  103. package/dist/{chunk-YNTTROJT.js → chunk-QOWHHM3F.js} +1 -1
  104. package/dist/{chunk-6H5SZR24.js → chunk-RRJV5UR5.js} +302 -59
  105. package/dist/{chunk-AYU72WO7.js → chunk-ULAU5ZGU.js} +41 -64
  106. package/dist/{chunk-SGZO7UWH.js → chunk-V2FXMOEA.js} +2 -2
  107. package/dist/{chunk-AIOK6LAG.js → chunk-VCYSOXON.js} +272 -41
  108. package/dist/{chunk-7A4M7PCV.js → chunk-VMNRXKAH.js} +1166 -540
  109. package/dist/{chunk-YSB2N563.js → chunk-VRHTNBA6.js} +121 -87
  110. package/dist/{chunk-AVZDSUFB.js → chunk-VY6W3T43.js} +4 -4
  111. package/dist/{chunk-7UQIVT6G.js → chunk-WCN4YSH7.js} +6 -6
  112. package/dist/{chunk-CSZINQJ2.js → chunk-WOONT5ZP.js} +1 -1
  113. package/dist/{chunk-Q4R73I43.js → chunk-XJ42NBP5.js} +58 -28
  114. package/dist/{chunk-YHDERDRO.js → chunk-ZCHIC2GM.js} +91 -75
  115. package/dist/chunk-ZPL2RR7F.js +798 -0
  116. package/dist/cli/chat.js +33 -35
  117. package/dist/cli/check.js +6 -6
  118. package/dist/cli/plugins.js +13 -13
  119. package/dist/cli/snapshot-create.js +9 -9
  120. package/dist/cli/upgrade.js +7 -7
  121. package/dist/db/schema/agent-invocations.d.ts +20 -0
  122. package/dist/db/schema/conversation-annotations.d.ts +2 -2
  123. package/dist/db/schema.d.ts +22 -2
  124. package/dist/{db-CSEW4RII.js → db-XUKZRFFK.js} +7 -7
  125. package/dist/instrumentation.js +4 -4
  126. package/dist/nitro.js +2 -2
  127. package/dist/{oauth-callback-server-FUEV5HNG.js → oauth-callback-server-LPZMMGFI.js} +25 -26
  128. package/dist/{runner-U3XHSKSH.js → runner-DGKUTMPX.js} +17 -18
  129. package/dist/{skills-AKE6W3WI.js → skills-P7YUFSXM.js} +6 -6
  130. package/dist/spawn-DSK3ZEVD.js +38 -0
  131. package/dist/{validation-WDTAULUF.js → validation-S7U5M5NR.js} +6 -6
  132. package/dist/version.js +1 -1
  133. package/dist/{work-C3HAO2BG.js → work-GAA7TVAD.js} +18 -19
  134. package/dist/{worker-LNP4YKBM.js → worker-JXPJH3QB.js} +11 -10
  135. package/package.json +5 -4
  136. package/dist/api/health.d.ts +0 -7
  137. package/dist/api/personal-tokens/create.d.ts +0 -11
  138. package/dist/api/personal-tokens/list.d.ts +0 -12
  139. package/dist/api/personal-tokens/revoke.d.ts +0 -5
  140. package/dist/api/plugin-reports.d.ts +0 -63
  141. package/dist/api/plugins.d.ts +0 -8
  142. package/dist/api/runtime.d.ts +0 -24
  143. package/dist/api/skills.d.ts +0 -6
  144. package/dist/chat/slack/tools/channel-access.d.ts +0 -30
  145. package/dist/chunk-34GS7B6L.js +0 -115
  146. package/dist/chunk-AVOCH2Z5.js +0 -285
  147. package/dist/chunk-HLXXQI5Q.js +0 -238
  148. package/dist/chunk-K4SZAP3K.js +0 -67
  149. package/dist/chunk-R776HKPK.js +0 -81
  150. package/dist/spawn-B6GDTWJ4.js +0 -39
  151. /package/dist/chat/slack/{tools → tool-support}/canvas/markdown.d.ts +0 -0
  152. /package/dist/chat/slack/{tools → tool-support}/channel-capabilities.d.ts +0 -0
  153. /package/dist/chat/slack/{tools → tool-support}/context.d.ts +0 -0
  154. /package/dist/chat/slack/{tools → tool-support}/list/api.d.ts +0 -0
  155. /package/dist/chat/slack/{tools → tool-support}/slack-message-url.d.ts +0 -0
@@ -4,30 +4,30 @@ import {
4
4
  isConversationScopedChannel,
5
5
  isDmChannel,
6
6
  normalizeSlackConversationId
7
- } from "./chunk-SGZO7UWH.js";
7
+ } from "./chunk-V2FXMOEA.js";
8
8
  import {
9
9
  getConversationEventStore,
10
10
  getDb
11
- } from "./chunk-YSB2N563.js";
11
+ } from "./chunk-VRHTNBA6.js";
12
12
  import {
13
13
  juniorConversationAnnotations,
14
14
  juniorConversationEvents,
15
15
  juniorIdentities,
16
16
  juniorUsers
17
- } from "./chunk-DU74WPIC.js";
17
+ } from "./chunk-D3WPMGEX.js";
18
18
  import {
19
19
  SANDBOX_WORKSPACE_ROOT
20
20
  } from "./chunk-EM225ITJ.js";
21
21
  import {
22
22
  getStateAdapter
23
- } from "./chunk-ORO3PWKQ.js";
23
+ } from "./chunk-2B3PT3V2.js";
24
24
  import {
25
25
  botConfig,
26
26
  completeObject,
27
27
  embedTexts,
28
28
  getSlackBotToken,
29
29
  standardModelId
30
- } from "./chunk-7NVJVJID.js";
30
+ } from "./chunk-4GXJUYJV.js";
31
31
  import {
32
32
  isActorUserId,
33
33
  parseActorUserId
@@ -42,7 +42,7 @@ import {
42
42
  logInfo,
43
43
  logWarn,
44
44
  normalizeIdentityEmail
45
- } from "./chunk-4LJO56OJ.js";
45
+ } from "./chunk-EAI67NTM.js";
46
46
 
47
47
  // src/chat/plugins/agent-hooks.ts
48
48
  import {
@@ -460,7 +460,7 @@ function createResourceEventTeamIdResolver() {
460
460
  };
461
461
  }
462
462
 
463
- // src/chat/slack/tools/context.ts
463
+ // src/chat/slack/tool-support/context.ts
464
464
  function getSlackToolContext(context) {
465
465
  if (context.source.platform !== "slack") {
466
466
  return void 0;
@@ -740,7 +740,7 @@ function verifyEventTaskCredentialSubject(input) {
740
740
  return timingSafeMatch(expected, binding.signature);
741
741
  }
742
742
 
743
- // src/chat/slack/tools/channel-capabilities.ts
743
+ // src/chat/slack/tool-support/channel-capabilities.ts
744
744
  function resolveChannelCapabilities(channelId) {
745
745
  return {
746
746
  canCreateCanvas: isConversationScopedChannel(channelId),
@@ -805,6 +805,40 @@ function systemPromptPluginContext(plugin) {
805
805
  ...basePluginContext(plugin)
806
806
  };
807
807
  }
808
+ function pluginInvocationContext(context) {
809
+ const common = { conversationId: context.conversationId };
810
+ switch (context.source.platform) {
811
+ case "slack": {
812
+ if (context.destination.platform !== "slack") {
813
+ throw new TypeError("Slack plugin context requires Slack destination");
814
+ }
815
+ return {
816
+ ...common,
817
+ actor: context.actor?.platform === "slack" ? context.actor : void 0,
818
+ destination: context.destination,
819
+ source: context.source
820
+ };
821
+ }
822
+ case "local": {
823
+ if (context.destination.platform !== "local") {
824
+ throw new TypeError("Local plugin context requires local destination");
825
+ }
826
+ return {
827
+ ...common,
828
+ actor: context.actor?.platform === "local" ? context.actor : void 0,
829
+ destination: context.destination,
830
+ source: context.source
831
+ };
832
+ }
833
+ case "web":
834
+ return {
835
+ ...common,
836
+ actor: context.actor?.platform === "web" ? context.actor : void 0,
837
+ destination: context.destination,
838
+ source: context.source
839
+ };
840
+ }
841
+ }
808
842
  function invocationPluginContext(plugin, context, turnId) {
809
843
  const base = basePluginContext(plugin);
810
844
  const common = {
@@ -824,27 +858,9 @@ function invocationPluginContext(plugin, context, turnId) {
824
858
  text: context.userText ?? "",
825
859
  state: createPluginState(plugin.manifest.name)
826
860
  };
827
- if (context.source.platform === "slack") {
828
- if (context.destination.platform !== "slack") {
829
- throw new TypeError(
830
- "Slack plugin prompt context requires Slack destination"
831
- );
832
- }
833
- return {
834
- ...common,
835
- destination: context.destination,
836
- actor: context.actor?.platform === "slack" ? context.actor : void 0
837
- };
838
- }
839
- if (context.destination.platform !== "local") {
840
- throw new TypeError(
841
- "Local plugin prompt context requires local destination"
842
- );
843
- }
844
861
  return {
845
862
  ...common,
846
- destination: context.destination,
847
- actor: context.actor?.platform === "local" ? context.actor : void 0
863
+ ...pluginInvocationContext(context)
848
864
  };
849
865
  }
850
866
  function pluginMcpContext(plugin, context) {
@@ -990,7 +1006,8 @@ async function getPluginSystemPromptContributions(source) {
990
1006
  try {
991
1007
  const pluginContributions = await hook({
992
1008
  ...systemPromptPluginContext(plugin),
993
- platform: source.platform
1009
+ // Plugin system prompts only distinguish Slack vs non-Slack surfaces.
1010
+ platform: source.platform === "slack" ? "slack" : "local"
994
1011
  });
995
1012
  const result = systemPromptMessageArraySchema.safeParse(pluginContributions);
996
1013
  if (!result.success) {
@@ -1127,54 +1144,53 @@ function getPluginTools(context, sandbox = createSandboxCapability(context.works
1127
1144
  canSubscribe: context.source.platform === "slack" && canRouteResourceEvents()
1128
1145
  };
1129
1146
  const resolveActor = context.resolveActorIdentity ?? (async () => void 0);
1147
+ const common = {
1148
+ ...basePluginContext(plugin),
1149
+ ...annotations ? { annotations } : {},
1150
+ conversationId: context.conversationId,
1151
+ userText: context.userText,
1152
+ embedder: createPluginEmbedder(pluginName),
1153
+ egress: context.egress,
1154
+ ...mcp ? { mcp } : {},
1155
+ model: createPluginModel(pluginName, plugin.model),
1156
+ resourceEvents,
1157
+ sandbox,
1158
+ state: createPluginState(pluginName),
1159
+ users: { resolveActor }
1160
+ };
1130
1161
  let pluginContext;
1131
- if (context.source.platform === "slack") {
1132
- if (context.destination.platform !== "slack") {
1133
- throw new TypeError(
1134
- "Slack plugin tool context requires Slack destination"
1135
- );
1136
- }
1137
- pluginContext = {
1138
- ...basePluginContext(plugin),
1139
- actor: context.actor?.platform === "slack" ? context.actor : void 0,
1140
- conversationId: context.conversationId,
1141
- ...annotations ? { annotations } : {},
1142
- destination: context.destination,
1143
- slack: slackContext,
1144
- source: context.source,
1145
- userText: context.userText,
1146
- embedder: createPluginEmbedder(pluginName),
1147
- egress: context.egress,
1148
- ...mcp ? { mcp } : {},
1149
- model: createPluginModel(pluginName, plugin.model),
1150
- resourceEvents,
1151
- sandbox,
1152
- state: createPluginState(pluginName),
1153
- users: { resolveActor }
1154
- };
1155
- } else {
1156
- if (context.destination.platform !== "local") {
1157
- throw new TypeError(
1158
- "Local plugin tool context requires local destination"
1159
- );
1160
- }
1161
- pluginContext = {
1162
- ...basePluginContext(plugin),
1163
- actor: context.actor?.platform === "local" ? context.actor : void 0,
1164
- conversationId: context.conversationId,
1165
- ...annotations ? { annotations } : {},
1166
- destination: context.destination,
1167
- source: context.source,
1168
- userText: context.userText,
1169
- embedder: createPluginEmbedder(pluginName),
1170
- egress: context.egress,
1171
- ...mcp ? { mcp } : {},
1172
- model: createPluginModel(pluginName, plugin.model),
1173
- resourceEvents,
1174
- sandbox,
1175
- state: createPluginState(pluginName),
1176
- users: { resolveActor }
1177
- };
1162
+ switch (context.source.platform) {
1163
+ case "slack":
1164
+ if (context.destination.platform !== "slack") {
1165
+ throw new TypeError("Slack plugin context requires Slack destination");
1166
+ }
1167
+ pluginContext = {
1168
+ ...common,
1169
+ actor: context.actor?.platform === "slack" ? context.actor : void 0,
1170
+ destination: context.destination,
1171
+ slack: slackContext,
1172
+ source: context.source
1173
+ };
1174
+ break;
1175
+ case "local":
1176
+ if (context.destination.platform !== "local") {
1177
+ throw new TypeError("Local plugin context requires local destination");
1178
+ }
1179
+ pluginContext = {
1180
+ ...common,
1181
+ actor: context.actor?.platform === "local" ? context.actor : void 0,
1182
+ destination: context.destination,
1183
+ source: context.source
1184
+ };
1185
+ break;
1186
+ case "web":
1187
+ pluginContext = {
1188
+ ...common,
1189
+ actor: context.actor?.platform === "web" ? context.actor : void 0,
1190
+ destination: context.destination,
1191
+ source: context.source
1192
+ };
1193
+ break;
1178
1194
  }
1179
1195
  const pluginTools = hook(pluginContext);
1180
1196
  const namespace = pluginToolNamespace(pluginName);