@sentry/junior 0.232.0 → 0.234.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 (55) hide show
  1. package/dist/{agent-hooks-n9qfV697.js → agent-hooks-BcH6E48y.js} +89 -12
  2. package/dist/{agent-runner-D_FVvrwA.js → agent-runner-DUkGlK89.js} +224 -768
  3. package/dist/api/schema.d.ts +538 -2
  4. package/dist/api/schema.js +4 -4
  5. package/dist/api.js +230 -19
  6. package/dist/app.js +31 -21
  7. package/dist/{briefs-B7wDx-LM.js → briefs-lyAQbDxJ.js} +4 -4
  8. package/dist/{catalog-runtime-FU8TmK-W.js → catalog-runtime-BSgsPVnr.js} +1 -1
  9. package/dist/{checkpoint-DuA1tIcd.js → checkpoint-BNfXlq_1.js} +7 -7
  10. package/dist/cli/chat.js +13 -13
  11. package/dist/cli/check.js +3 -3
  12. package/dist/cli/main.js +1 -1
  13. package/dist/cli/plugins.js +3 -3
  14. package/dist/cli/snapshot-create.js +3 -3
  15. package/dist/cli/upgrade.js +3 -3
  16. package/dist/{client-BMqP14EE.js → client-BX5lJRqW.js} +2 -2
  17. package/dist/{config-Q7ayKDYh.js → config-DuCzUoCo.js} +2 -2
  18. package/dist/{conversation-DsuDtoYR.js → conversation-CPjHYOV5.js} +13 -2
  19. package/dist/{conversation-privacy-DNNsgprf.js → conversation-privacy-CSxvdSoV.js} +1 -1
  20. package/dist/{credential-sync-DbgAGIhd.js → credential-sync-BO4DfH9a.js} +13 -13
  21. package/dist/{executor-DDonSWxn.js → executor--jWf-Nnm.js} +1 -1
  22. package/dist/{images-Bj8PcvZ5.js → images-BaL19wFC.js} +3 -3
  23. package/dist/instrumentation.js +2 -2
  24. package/dist/{job-queue-Dqc7qQbR.js → job-queue-cwHVOwVZ.js} +1 -1
  25. package/dist/{logging-X4U7SInw.js → logging-Cox1Mgcv.js} +1 -1
  26. package/dist/nitro.js +3 -3
  27. package/dist/{oauth-authorization-CetcZcwQ.js → oauth-authorization-CC8a1JKP.js} +1 -1
  28. package/dist/{oauth-callback-server-o34WSoGm.js → oauth-callback-server-Z7QSt416.js} +2 -2
  29. package/dist/{pending-auth-XoxEa4O5.js → pending-auth-DQhC3eSR.js} +1 -1
  30. package/dist/{profile-DzqqgpDo.js → profile-BdApelHS.js} +4 -4
  31. package/dist/{prompt-D5RPLy92.js → prompt-3D0sSbTC.js} +1 -1
  32. package/dist/{registry-RrIfDnkS.js → registry-DiY6B8CN.js} +1 -1
  33. package/dist/{resolve-Ccu6uGtp.js → resolve-VpJoiDpc.js} +2 -2
  34. package/dist/{runner-DDQCEV1P.js → runner-BIMegnPE.js} +9 -9
  35. package/dist/{sandbox-egress-signals-CT3xOtNG.js → sandbox-egress-signals-Cbtxe492.js} +1 -1
  36. package/dist/{schema-B-Taar1W.js → schema-CxwnlTDN.js} +4 -117
  37. package/dist/{skills-NB_I9BuR.js → skills-WttpPJUy.js} +2 -2
  38. package/dist/{spawn-DmwIhiNu.js → spawn-DhfMKt4y.js} +2 -2
  39. package/dist/{task-queue-B5CERq_E.js → task-queue-CZqUNJD0.js} +3 -3
  40. package/dist/{task-runner-COivEGS3.js → task-runner-BZaqoUCT.js} +16 -13
  41. package/dist/{thread-state-C7yyfiVM.js → thread-state-8tXZhu0y.js} +5 -5
  42. package/dist/{turn-failure-response-D990svo-.js → turn-failure-response-DFJ9L9NQ.js} +8 -8
  43. package/dist/{turn-lifecycle-C-LUNJC6.js → turn-lifecycle-WbpTUQ_r.js} +1 -1
  44. package/dist/{turn-session-routing-CoF0GbaY.js → turn-session-routing--EhI76rH.js} +1 -1
  45. package/dist/types-Du-HbEun.js +621 -0
  46. package/dist/{validation-f0y71ety.js → validation-0F9IgG3b.js} +1 -1
  47. package/dist/{version-CkRTIRkV.js → version-A7-RRBOE.js} +1 -1
  48. package/dist/version.js +1 -1
  49. package/dist/{web-authorization-BBwQsNCZ.js → web-authorization-BJggXofy.js} +6 -6
  50. package/dist/{web-input-Bkn-JGWd.js → web-input-B-siN5Dr.js} +212 -164
  51. package/dist/web-message-id-CVVCTWUb.js +464 -0
  52. package/dist/{work-vWPq9P5x.js → work-CNc0ejGG.js} +7 -7
  53. package/dist/{worker-BgZog5Jp.js → worker-BHbqpUAu.js} +5 -5
  54. package/package.json +5 -5
  55. package/dist/web-message-id-xPI_EFSC.js +0 -239
@@ -1,239 +0,0 @@
1
- import { z } from "zod";
2
- //#region src/reporting-schema.ts
3
- const healthReportSchema = z.object({
4
- status: z.literal("ok"),
5
- service: z.string(),
6
- timestamp: z.string()
7
- }).strict();
8
- const pluginSchema = z.object({
9
- configKeys: z.array(z.string()),
10
- description: z.string(),
11
- displayName: z.string(),
12
- name: z.string()
13
- }).strict();
14
- const pluginsSchema = z.array(pluginSchema);
15
- const skillReportSchema = z.object({
16
- name: z.string(),
17
- pluginProvider: z.string().optional()
18
- }).strict();
19
- const skillReportsSchema = z.array(skillReportSchema);
20
- const pluginPackageContentItemReportSchema = z.object({
21
- dir: z.string(),
22
- hasMigrationsDir: z.boolean(),
23
- hasSkillsDir: z.boolean(),
24
- packageName: z.string()
25
- }).strict();
26
- const pluginPackageContentReportSchema = z.object({
27
- packageNames: z.array(z.string()),
28
- packages: z.array(pluginPackageContentItemReportSchema),
29
- manifestRoots: z.array(z.string()),
30
- skillRoots: z.array(z.string()),
31
- tracingIncludes: z.array(z.string())
32
- }).strict();
33
- const runtimeInfoReportSchema = z.object({
34
- cwd: z.string(),
35
- homeDir: z.string(),
36
- descriptionText: z.string().optional(),
37
- providers: z.array(z.string()),
38
- skills: z.array(skillReportSchema),
39
- packagedContent: pluginPackageContentReportSchema
40
- }).strict();
41
- const pluginOperationalToneSchema = z.enum([
42
- "danger",
43
- "good",
44
- "neutral",
45
- "warning"
46
- ]);
47
- const pluginOperationalMetricSchema = z.object({
48
- label: z.string(),
49
- tone: pluginOperationalToneSchema.optional(),
50
- value: z.string()
51
- }).strict();
52
- const pluginOperationalFieldSchema = z.object({
53
- key: z.string(),
54
- label: z.string()
55
- }).strict();
56
- const pluginOperationalRecordSchema = z.object({
57
- id: z.string(),
58
- tone: pluginOperationalToneSchema.optional(),
59
- values: z.record(z.string(), z.string())
60
- }).strict();
61
- const pluginOperationalRecordSetSchema = z.object({
62
- fields: z.array(pluginOperationalFieldSchema).optional(),
63
- emptyText: z.string().optional(),
64
- records: z.array(pluginOperationalRecordSchema).optional(),
65
- title: z.string()
66
- }).strict();
67
- const pluginOperationalBarChartWidgetSchema = z.object({
68
- categories: z.array(z.object({
69
- id: z.string().min(1),
70
- label: z.string().min(1),
71
- values: z.record(z.string(), z.number().finite())
72
- }).strict()).max(100),
73
- description: z.string().optional(),
74
- emptyText: z.string().optional(),
75
- id: z.string().min(1),
76
- series: z.array(z.object({
77
- format: z.literal("usd").optional(),
78
- key: z.string().min(1),
79
- label: z.string().min(1),
80
- tone: pluginOperationalToneSchema.optional()
81
- }).strict()).min(1).max(8),
82
- timeRangeDays: z.array(z.union([
83
- z.literal(1),
84
- z.literal(7),
85
- z.literal(30),
86
- z.literal(90)
87
- ])).min(1).max(4).optional(),
88
- title: z.string().min(1),
89
- type: z.literal("bar_chart")
90
- }).strict();
91
- const pluginOperationalReportSchema = z.object({
92
- generatedAt: z.string().optional(),
93
- metrics: z.array(pluginOperationalMetricSchema).optional(),
94
- recordSets: z.array(pluginOperationalRecordSetSchema).optional(),
95
- title: z.string().optional(),
96
- pluginName: z.string(),
97
- widgets: z.array(pluginOperationalBarChartWidgetSchema).max(12).optional()
98
- }).strict();
99
- const pluginOperationalReportFeedSchema = z.object({
100
- generatedAt: z.string(),
101
- reports: z.array(pluginOperationalReportSchema),
102
- source: z.literal("plugins")
103
- }).strict();
104
- //#endregion
105
- //#region src/api/reporting-window.ts
106
- /** Shared UTC day/hour/six-hour windows for dashboard activity series. */
107
- const HOUR_MS = 36e5;
108
- const SIX_HOUR_MS = 6 * HOUR_MS;
109
- const DAY_MS = 24 * HOUR_MS;
110
- /** Start of the UTC calendar day containing `valueMs`. */
111
- function startOfUtcDay(valueMs) {
112
- const date = new Date(valueMs);
113
- date.setUTCHours(0, 0, 0, 0);
114
- return date;
115
- }
116
- /** Start of the UTC hour containing `valueMs`. */
117
- function startOfUtcHour(valueMs) {
118
- const date = new Date(valueMs);
119
- date.setUTCMinutes(0, 0, 0);
120
- return date;
121
- }
122
- /** Start of the UTC 6-hour bucket containing `valueMs` (00/06/12/18). */
123
- function startOfUtcSixHour(valueMs) {
124
- const date = startOfUtcHour(valueMs);
125
- date.setUTCHours(Math.floor(date.getUTCHours() / 6) * 6, 0, 0, 0);
126
- return date;
127
- }
128
- /** UTC day key `YYYY-MM-DD`. */
129
- function utcDayKey(value) {
130
- return (typeof value === "number" ? new Date(value) : value).toISOString().slice(0, 10);
131
- }
132
- /** UTC hour key `YYYY-MM-DDTHH`. */
133
- function utcHourKey(value) {
134
- return (typeof value === "number" ? new Date(value) : value).toISOString().slice(0, 13);
135
- }
136
- /** UTC 6-hour bucket key `YYYY-MM-DDTHH` at 00/06/12/18. */
137
- function utcSixHourKey(value) {
138
- return utcHourKey(startOfUtcSixHour(typeof value === "number" ? value : value.getTime()));
139
- }
140
- /** Inclusive trailing UTC day window ending on today's UTC day. */
141
- function trailingUtcDayWindow(nowMs, dayCount) {
142
- const end = startOfUtcDay(nowMs);
143
- const start = new Date(end);
144
- start.setUTCDate(start.getUTCDate() - (dayCount - 1));
145
- return {
146
- end,
147
- start
148
- };
149
- }
150
- /** Inclusive trailing UTC hour window ending on the current UTC hour. */
151
- function trailingUtcHourWindow(nowMs, hourCount = 24) {
152
- const end = startOfUtcHour(nowMs);
153
- return {
154
- end,
155
- start: /* @__PURE__ */ new Date(end.getTime() - (hourCount - 1) * HOUR_MS)
156
- };
157
- }
158
- /** Inclusive trailing UTC 6-hour window ending on the current 6h bucket. */
159
- function trailingUtcSixHourWindow(nowMs, bucketCount = 28) {
160
- const end = startOfUtcSixHour(nowMs);
161
- return {
162
- end,
163
- start: /* @__PURE__ */ new Date(end.getTime() - (bucketCount - 1) * SIX_HOUR_MS)
164
- };
165
- }
166
- /** Fill a fixed UTC day window from a sparse map. */
167
- function fillUtcDays(args) {
168
- const { end, start } = trailingUtcDayWindow(args.nowMs, args.count);
169
- const items = [];
170
- for (const cursor = new Date(start); cursor.getTime() <= end.getTime(); cursor.setUTCDate(cursor.getUTCDate() + 1)) {
171
- const date = utcDayKey(cursor);
172
- items.push(args.rows.get(date) ?? args.empty(date));
173
- }
174
- return items;
175
- }
176
- /** Fill a fixed UTC hour window from a sparse map. */
177
- function fillUtcHours(args) {
178
- const hourCount = args.count ?? 24;
179
- const { end, start } = trailingUtcHourWindow(args.nowMs, hourCount);
180
- const items = [];
181
- for (const cursor = new Date(start); cursor.getTime() <= end.getTime(); cursor.setTime(cursor.getTime() + HOUR_MS)) {
182
- const date = utcHourKey(cursor);
183
- items.push(args.rows.get(date) ?? args.empty(date));
184
- }
185
- return items;
186
- }
187
- /** Fill a fixed UTC 6-hour window from a map of known rows. */
188
- function fillUtcSixHours(args) {
189
- const bucketCount = args.count ?? 28;
190
- const { end, start } = trailingUtcSixHourWindow(args.nowMs, bucketCount);
191
- const items = [];
192
- for (const cursor = new Date(start); cursor.getTime() <= end.getTime(); cursor.setTime(cursor.getTime() + SIX_HOUR_MS)) {
193
- const date = utcSixHourKey(cursor);
194
- items.push(args.rows.get(date) ?? args.empty(date));
195
- }
196
- return items;
197
- }
198
- /**
199
- * Sum hour rows into trailing 6-hour buckets.
200
- * Adds number fields. Keeps other fields from the first row in the bucket.
201
- * Sets `date` to the 6-hour bucket key.
202
- */
203
- function sumUtcHoursIntoSixHours(args) {
204
- const bucketCount = args.count ?? 28;
205
- const bySix = /* @__PURE__ */ new Map();
206
- for (const hour of args.hours) {
207
- const key = utcSixHourKey(Date.parse(`${hour.date}:00:00.000Z`));
208
- const next = {
209
- ...bySix.get(key) ?? args.empty(key),
210
- date: key
211
- };
212
- for (const [field, value] of Object.entries(hour)) {
213
- if (field === "date") continue;
214
- if (typeof value === "number") {
215
- const prior = next[field];
216
- next[field] = (typeof prior === "number" ? prior : 0) + value;
217
- }
218
- }
219
- bySix.set(key, next);
220
- }
221
- return fillUtcSixHours({
222
- count: bucketCount,
223
- empty: args.empty,
224
- nowMs: args.nowMs,
225
- rows: bySix
226
- });
227
- }
228
- //#endregion
229
- //#region src/chat/conversations/web-message-id.ts
230
- /**
231
- * Build the retry-stable Message id shared by web ingress and browser sends.
232
- * Keep the existing hash and prefix so retries still address stored Messages.
233
- */
234
- async function webMessageId(args) {
235
- const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(`${args.conversationId}\u0000${args.idempotencyKey}`));
236
- return `api-msg:${Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join("").slice(0, 24)}`;
237
- }
238
- //#endregion
239
- export { skillReportsSchema as C, skillReportSchema as S, pluginPackageContentItemReportSchema as _, fillUtcHours as a, pluginsSchema as b, sumUtcHoursIntoSixHours as c, trailingUtcSixHourWindow as d, utcDayKey as f, pluginOperationalReportSchema as g, pluginOperationalReportFeedSchema as h, fillUtcDays as i, trailingUtcDayWindow as l, healthReportSchema as m, DAY_MS as n, fillUtcSixHours as o, utcHourKey as p, HOUR_MS as r, startOfUtcHour as s, webMessageId as t, trailingUtcHourWindow as u, pluginPackageContentReportSchema as v, runtimeInfoReportSchema as x, pluginSchema as y };