@sentry/junior 0.112.0 → 0.114.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 (59) hide show
  1. package/dist/{agent-hooks-6MVTPKP4.js → agent-hooks-WNBUY4OB.js} +8 -8
  2. package/dist/api/conversations/cursor.d.ts +17 -0
  3. package/dist/api/conversations/detail.d.ts +40 -18
  4. package/dist/api/conversations/event-list.d.ts +115 -0
  5. package/dist/api/conversations/event-page.d.ts +18 -0
  6. package/dist/api/conversations/events.d.ts +6 -2
  7. package/dist/api/conversations/projection.d.ts +6 -1
  8. package/dist/api/schema/conversation.d.ts +228 -51
  9. package/dist/api/schema.d.ts +2 -2
  10. package/dist/api/schema.js +7 -1
  11. package/dist/api.js +461 -139
  12. package/dist/app.d.ts +2 -0
  13. package/dist/app.js +33 -24
  14. package/dist/{catalog-runtime-UEO25P2J.js → catalog-runtime-6O4M6JGA.js} +5 -5
  15. package/dist/chat/config.d.ts +1 -1
  16. package/dist/chat/conversations/history.d.ts +86 -0
  17. package/dist/chat/conversations/projection.d.ts +20 -1
  18. package/dist/chat/pi/transcript.d.ts +2 -0
  19. package/dist/chat/services/context-budget.d.ts +7 -2
  20. package/dist/chat/services/context-compaction.d.ts +28 -1
  21. package/dist/chat/services/conversation-memory.d.ts +1 -0
  22. package/dist/chat/services/provider-error.d.ts +40 -0
  23. package/dist/chat/services/provider-retry.d.ts +3 -6
  24. package/dist/chat/services/turn-router.d.ts +1 -0
  25. package/dist/chat/task-execution/state.d.ts +2 -2
  26. package/dist/chat/task-execution/store.d.ts +1 -1
  27. package/dist/chat/tools/sandbox/edit-file.d.ts +1 -1
  28. package/dist/chat/tools/sandbox/text-edits.d.ts +1 -0
  29. package/dist/{chunk-CSS7JHEM.js → chunk-4FUEG3QY.js} +1 -1
  30. package/dist/{chunk-AU2JVUDF.js → chunk-5CZ7RETL.js} +1 -1
  31. package/dist/{chunk-SKEMI4IF.js → chunk-6QWPVTMO.js} +200 -52
  32. package/dist/{chunk-AWNDKI5K.js → chunk-ABPSDO6M.js} +20 -15
  33. package/dist/{chunk-QIALGHRN.js → chunk-FIGAF6KL.js} +34 -2
  34. package/dist/{chunk-TZU3R5OC.js → chunk-K2W4CK7K.js} +1 -1
  35. package/dist/{chunk-2FJ6WEYV.js → chunk-O4GT7LYB.js} +1 -1
  36. package/dist/{chunk-ZHP4KNF7.js → chunk-OSKEC4XU.js} +1 -1
  37. package/dist/{chunk-IV2O4HQJ.js → chunk-PM3PX42K.js} +1 -1
  38. package/dist/{chunk-NDQL4ESR.js → chunk-RD7EJI7H.js} +2 -2
  39. package/dist/{chunk-JE23YR3X.js → chunk-S4QDH23A.js} +75 -43
  40. package/dist/{chunk-GJG67YFS.js → chunk-TLGM5X2M.js} +2 -2
  41. package/dist/{chunk-VBSVNOLA.js → chunk-VNNBSKCO.js} +5 -5
  42. package/dist/{chunk-4EJO4HIC.js → chunk-W6RDUAO3.js} +1 -1
  43. package/dist/{chunk-GR4IB6OQ.js → chunk-WV4UJBAS.js} +431 -96
  44. package/dist/{chunk-66IP6WED.js → chunk-XLFBQJUO.js} +4 -4
  45. package/dist/{chunk-X3SP5RDW.js → chunk-YU6PO42Q.js} +1 -1
  46. package/dist/{chunk-PK4ETCUQ.js → chunk-ZGXH3REA.js} +226 -215
  47. package/dist/cli/chat.js +19 -19
  48. package/dist/cli/check.js +6 -6
  49. package/dist/cli/plugins.js +11 -11
  50. package/dist/cli/snapshot-warmup.js +8 -8
  51. package/dist/cli/upgrade.js +5 -5
  52. package/dist/{db-P5H5RVQV.js → db-4VLP7KBF.js} +5 -5
  53. package/dist/instrumentation.js +2 -2
  54. package/dist/nitro.js +2 -2
  55. package/dist/{runner-B4ZDUO3R.js → runner-IPXLWQOF.js} +12 -13
  56. package/dist/{skills-GWTOZ3XV.js → skills-QCNZISNF.js} +6 -6
  57. package/dist/{validation-QFIC6XH6.js → validation-I2BW3UHD.js} +6 -6
  58. package/dist/version.js +1 -1
  59. package/package.json +6 -6
@@ -24,6 +24,13 @@ var conversationSurfaceSchema = z2.enum([
24
24
  ]);
25
25
  var conversationUsageSchema = usageSchema;
26
26
  var conversationParamsSchema = z2.object({ conversationId: z2.string().min(1) }).strict();
27
+ var conversationDetailQuerySchema = z2.object({
28
+ limit: z2.coerce.number().int().min(1).max(1e3).default(500)
29
+ }).strict();
30
+ var conversationEventsQuerySchema = z2.object({
31
+ before: z2.string().min(1),
32
+ limit: z2.coerce.number().int().min(1).max(1e3).default(500)
33
+ }).strict();
27
34
  var conversationFeedQuerySchema = z2.object({
28
35
  actorEmail: z2.string().trim().email().transform((value) => value.toLowerCase()).optional()
29
36
  }).strict();
@@ -74,26 +81,26 @@ var conversationReportMessageHandledEventDataSchema = z2.object({
74
81
  type: z2.literal("message_handled"),
75
82
  messageId: z2.string().min(1)
76
83
  }).strict();
77
- var conversationReportToolStartedEventDataSchema = z2.object({
78
- type: z2.literal("tool_started"),
79
- toolCallId: z2.string().min(1),
80
- name: z2.string().min(1)
81
- }).strict();
82
84
  var conversationReportToolCallSchema = z2.object({
83
85
  toolCallId: z2.string().min(1),
84
86
  name: z2.string().min(1),
85
- input: z2.unknown().optional()
86
- }).strict();
87
+ status: z2.enum(["running", "completed", "error"]),
88
+ startedAt: z2.string().datetime().optional(),
89
+ startedSeq: z2.number().int().nonnegative().optional(),
90
+ input: z2.unknown().optional(),
91
+ output: z2.unknown().optional()
92
+ }).strict().superRefine((call, context) => {
93
+ if (call.startedAt === void 0 !== (call.startedSeq === void 0)) {
94
+ context.addIssue({
95
+ code: "custom",
96
+ message: "tool start sequence and timestamp must be provided together"
97
+ });
98
+ }
99
+ });
87
100
  var conversationReportToolCallsEventDataSchema = z2.object({
88
101
  type: z2.literal("tool_calls"),
89
102
  calls: z2.array(conversationReportToolCallSchema).min(1)
90
103
  }).strict();
91
- var conversationReportToolResultEventDataSchema = z2.object({
92
- type: z2.literal("tool_result"),
93
- toolCallId: z2.string().min(1),
94
- outcome: z2.enum(["completed", "error"]),
95
- output: z2.unknown().optional()
96
- }).strict();
97
104
  var conversationReportTurnLifecycleEventDataSchema = z2.discriminatedUnion(
98
105
  "state",
99
106
  [
@@ -110,7 +117,30 @@ var conversationReportTurnLifecycleEventDataSchema = z2.discriminatedUnion(
110
117
  }).strict()
111
118
  ]
112
119
  );
113
- var conversationReportCompactionEventDataSchema = z2.object({ type: z2.literal("compaction") }).strict();
120
+ var conversationReportTurnRoutedEventDataSchema = z2.object({
121
+ type: z2.literal("turn_routed"),
122
+ turnId: z2.string().min(1),
123
+ modelProfile: z2.string().min(1),
124
+ modelId: z2.string().min(1),
125
+ reasoningLevel: z2.string().min(1),
126
+ confidence: z2.number().min(0).max(1).optional(),
127
+ source: z2.enum(["configured", "inherited", "router"])
128
+ }).strict();
129
+ var conversationReportCompactionEventDataSchema = z2.object({
130
+ type: z2.literal("compaction"),
131
+ modelProfile: z2.string().min(1).optional(),
132
+ modelId: z2.string().min(1).optional(),
133
+ details: z2.object({
134
+ reason: z2.literal("capacity"),
135
+ estimatedInputTokens: z2.number().int().nonnegative(),
136
+ replacementInputTokens: z2.number().int().nonnegative().optional(),
137
+ triggerTokens: z2.number().int().nonnegative(),
138
+ inputLimitTokens: z2.number().int().positive(),
139
+ inputMessageCount: z2.number().int().nonnegative(),
140
+ retainedMessageCount: z2.number().int().nonnegative(),
141
+ summaryChars: z2.number().int().nonnegative()
142
+ }).strict().optional()
143
+ }).strict();
114
144
  var conversationReportHandoffEventDataSchema = z2.object({
115
145
  type: z2.literal("handoff"),
116
146
  modelProfile: z2.string().min(1),
@@ -118,28 +148,24 @@ var conversationReportHandoffEventDataSchema = z2.object({
118
148
  reasoningLevel: z2.string().min(1).optional(),
119
149
  triggeringToolCallId: z2.string().min(1).optional()
120
150
  }).strict();
121
- var conversationReportSubagentStartedEventDataSchema = z2.object({
122
- type: z2.literal("subagent_started"),
151
+ var conversationReportSubagentEventDataSchema = z2.object({
152
+ type: z2.literal("subagent"),
153
+ startedSeq: z2.number().int().nonnegative(),
154
+ startedAt: z2.string().datetime(),
123
155
  childConversationId: z2.string().min(1),
124
156
  subagentKind: z2.string().min(1),
125
- parentToolCallId: z2.string().min(1).optional()
126
- }).strict();
127
- var conversationReportSubagentEndedEventDataSchema = z2.object({
128
- type: z2.literal("subagent_ended"),
129
- startedSeq: z2.number().int().nonnegative(),
130
- outcome: z2.enum(["success", "error", "aborted"])
157
+ parentToolCallId: z2.string().min(1).optional(),
158
+ status: z2.enum(["running", "completed", "error", "aborted"])
131
159
  }).strict();
132
160
  var conversationReportEventDataSchema = z2.discriminatedUnion("type", [
133
161
  conversationReportMessageEventDataSchema,
134
162
  conversationReportMessageHandledEventDataSchema,
135
- conversationReportToolStartedEventDataSchema,
136
163
  conversationReportToolCallsEventDataSchema,
137
- conversationReportToolResultEventDataSchema,
138
164
  conversationReportTurnLifecycleEventDataSchema,
165
+ conversationReportTurnRoutedEventDataSchema,
139
166
  conversationReportCompactionEventDataSchema,
140
167
  conversationReportHandoffEventDataSchema,
141
- conversationReportSubagentStartedEventDataSchema,
142
- conversationReportSubagentEndedEventDataSchema
168
+ conversationReportSubagentEventDataSchema
143
169
  ]);
144
170
  var conversationReportEventSchema = z2.object({
145
171
  seq: z2.number().int().nonnegative(),
@@ -161,13 +187,7 @@ var conversationModelUsageSchema = z2.object({
161
187
  modelId: z2.string(),
162
188
  usage: conversationUsageSchema
163
189
  }).strict();
164
- var conversationDetailReportSchema = conversationSummaryReportSchema.extend({
165
- modelUsage: z2.array(conversationModelUsageSchema).optional(),
166
- events: z2.array(conversationReportEventSchema),
167
- eventHistory: conversationEventHistorySchema,
168
- generatedAt: z2.string(),
169
- sentryConversationUrl: z2.string().optional()
170
- }).strict().superRefine((report, context) => {
190
+ function validateConversationEvents(report, context) {
171
191
  if (report.eventHistory.status === "expired" && report.events.length > 0) {
172
192
  context.addIssue({
173
193
  code: "custom",
@@ -201,22 +221,31 @@ var conversationDetailReportSchema = conversationSummaryReportSchema.extend({
201
221
  });
202
222
  }
203
223
  }
204
- if (report.eventHistory.status === "redacted" && event.data.type === "tool_calls" && event.data.calls.some((call) => call.input !== void 0)) {
224
+ if (report.eventHistory.status === "redacted" && event.data.type === "tool_calls" && event.data.calls.some(
225
+ (call) => call.input !== void 0 || call.output !== void 0
226
+ )) {
205
227
  context.addIssue({
206
228
  code: "custom",
207
229
  path: ["events", index, "data"],
208
- message: "redacted event history must redact tool inputs"
209
- });
210
- }
211
- if (report.eventHistory.status === "redacted" && event.data.type === "tool_result" && event.data.output !== void 0) {
212
- context.addIssue({
213
- code: "custom",
214
- path: ["events", index, "data"],
215
- message: "redacted event history must redact tool outputs"
230
+ message: "redacted event history must redact tool payloads"
216
231
  });
217
232
  }
218
233
  }
219
- });
234
+ }
235
+ var conversationDetailReportSchema = conversationSummaryReportSchema.extend({
236
+ modelUsage: z2.array(conversationModelUsageSchema).optional(),
237
+ events: z2.array(conversationReportEventSchema),
238
+ eventHistory: conversationEventHistorySchema,
239
+ previousCursor: z2.string().min(1).optional(),
240
+ generatedAt: z2.string(),
241
+ sentryConversationUrl: z2.string().optional()
242
+ }).strict().superRefine(validateConversationEvents);
243
+ var conversationEventPageSchema = z2.object({
244
+ events: z2.array(conversationReportEventSchema),
245
+ eventHistory: conversationEventHistorySchema,
246
+ previousCursor: z2.string().min(1).optional(),
247
+ generatedAt: z2.string()
248
+ }).strict().superRefine(validateConversationEvents);
220
249
  var conversationFeedSchema = z2.object({
221
250
  conversations: z2.array(conversationSummaryReportSchema),
222
251
  source: z2.literal("conversation_index"),
@@ -378,6 +407,8 @@ var actorProfileReportSchema = z5.object({
378
407
  export {
379
408
  apiErrorSchema,
380
409
  conversationParamsSchema,
410
+ conversationDetailQuerySchema,
411
+ conversationEventsQuerySchema,
381
412
  conversationFeedQuerySchema,
382
413
  archiveConversationBodySchema,
383
414
  archiveConversationResponseSchema,
@@ -386,6 +417,7 @@ export {
386
417
  conversationReportEventSchema,
387
418
  conversationEventHistorySchema,
388
419
  conversationDetailReportSchema,
420
+ conversationEventPageSchema,
389
421
  conversationFeedSchema,
390
422
  conversationStatsReportSchema,
391
423
  dailyConversationActivitySchema,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-ZHP4KNF7.js";
3
+ } from "./chunk-OSKEC4XU.js";
4
4
  import {
5
5
  logWarn
6
- } from "./chunk-CSS7JHEM.js";
6
+ } from "./chunk-4FUEG3QY.js";
7
7
  import {
8
8
  skillRoots
9
9
  } from "./chunk-3V7OFJZC.js";
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  SANDBOX_WORKSPACE_ROOT,
3
3
  getStateAdapter
4
- } from "./chunk-X3SP5RDW.js";
4
+ } from "./chunk-YU6PO42Q.js";
5
5
  import {
6
6
  isConversationChannel,
7
7
  isConversationScopedChannel,
8
8
  isDmChannel,
9
9
  normalizeSlackConversationId
10
- } from "./chunk-NDQL4ESR.js";
10
+ } from "./chunk-RD7EJI7H.js";
11
11
  import {
12
12
  getDb
13
- } from "./chunk-QIALGHRN.js";
13
+ } from "./chunk-FIGAF6KL.js";
14
14
  import {
15
15
  botConfig,
16
16
  completeObject,
17
17
  embedTexts,
18
18
  standardModelId
19
- } from "./chunk-PK4ETCUQ.js";
19
+ } from "./chunk-ZGXH3REA.js";
20
20
  import {
21
21
  isActorUserId,
22
22
  parseActorUserId
@@ -25,7 +25,7 @@ import {
25
25
  logException,
26
26
  logInfo,
27
27
  logWarn
28
- } from "./chunk-CSS7JHEM.js";
28
+ } from "./chunk-4FUEG3QY.js";
29
29
  import {
30
30
  parseSlackChannelReferenceId,
31
31
  parseSlackMessageTs,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-ZHP4KNF7.js";
3
+ } from "./chunk-OSKEC4XU.js";
4
4
 
5
5
  // src/chat/plugins/validation.ts
6
6
  import { isDeepStrictEqual } from "util";