@sentry/server-utils 11.13.0 → 11.14.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 (88) hide show
  1. package/build/cjs/chunks/config.js +19 -5
  2. package/build/cjs/chunks/config.js.map +1 -1
  3. package/build/cjs/chunks/exports.js +72 -26
  4. package/build/cjs/chunks/exports.js.map +1 -1
  5. package/build/cjs/chunks/moduleInjectedTransform.js +6 -5
  6. package/build/cjs/chunks/moduleInjectedTransform.js.map +1 -1
  7. package/build/cjs/index.js +161 -65
  8. package/build/cjs/index.js.map +1 -1
  9. package/build/cjs/orchestrion/bundler/rollup.js +4 -4
  10. package/build/cjs/orchestrion/bundler/rollup.js.map +1 -1
  11. package/build/esm/ai/google-genai/constants.js +2 -1
  12. package/build/esm/ai/google-genai/constants.js.map +1 -1
  13. package/build/esm/ai/google-genai/decisions.js +25 -0
  14. package/build/esm/ai/google-genai/decisions.js.map +1 -0
  15. package/build/esm/ai/google-genai/index.js +16 -5
  16. package/build/esm/ai/google-genai/index.js.map +1 -1
  17. package/build/esm/ai/mistral/index.js +9 -8
  18. package/build/esm/ai/mistral/index.js.map +1 -1
  19. package/build/esm/ai/mistral/streaming.js +3 -7
  20. package/build/esm/ai/mistral/streaming.js.map +1 -1
  21. package/build/esm/ai/mistral/utils.js +9 -1
  22. package/build/esm/ai/mistral/utils.js.map +1 -1
  23. package/build/esm/ai/vercel-ai/index.js +3 -1
  24. package/build/esm/ai/vercel-ai/index.js.map +1 -1
  25. package/build/esm/ai/workers-ai/index.js +8 -7
  26. package/build/esm/ai/workers-ai/index.js.map +1 -1
  27. package/build/esm/ai/workers-ai/streaming.js +3 -7
  28. package/build/esm/ai/workers-ai/streaming.js.map +1 -1
  29. package/build/esm/index.js +3 -2
  30. package/build/esm/index.js.map +1 -1
  31. package/build/esm/integrations/cron.js +2 -2
  32. package/build/esm/integrations/cron.js.map +1 -1
  33. package/build/esm/integrations/google-genai.js +10 -6
  34. package/build/esm/integrations/google-genai.js.map +1 -1
  35. package/build/esm/integrations/mistral.js +4 -3
  36. package/build/esm/integrations/mistral.js.map +1 -1
  37. package/build/esm/integrations/node-cron.js +5 -4
  38. package/build/esm/integrations/node-cron.js.map +1 -1
  39. package/build/esm/integrations/node-schedule.js +2 -2
  40. package/build/esm/integrations/node-schedule.js.map +1 -1
  41. package/build/esm/integrations/vercel-ai/vercel-ai-dc-subscriber.js +9 -1
  42. package/build/esm/integrations/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
  43. package/build/esm/orchestrion/bundler/moduleInjectedTransform.js +6 -5
  44. package/build/esm/orchestrion/bundler/moduleInjectedTransform.js.map +1 -1
  45. package/build/esm/orchestrion/bundler/rollup.js +4 -4
  46. package/build/esm/orchestrion/bundler/rollup.js.map +1 -1
  47. package/build/esm/orchestrion/config/google-genai.js +19 -5
  48. package/build/esm/orchestrion/config/google-genai.js.map +1 -1
  49. package/build/esm/package.json +1 -1
  50. package/build/esm/utils/cronMonitoring.js +128 -50
  51. package/build/esm/utils/cronMonitoring.js.map +1 -1
  52. package/build/types/ai/google-genai/constants.d.ts +3 -0
  53. package/build/types/ai/google-genai/constants.d.ts.map +1 -1
  54. package/build/types/ai/google-genai/decisions.d.ts +8 -0
  55. package/build/types/ai/google-genai/decisions.d.ts.map +1 -0
  56. package/build/types/ai/google-genai/index.d.ts +3 -1
  57. package/build/types/ai/google-genai/index.d.ts.map +1 -1
  58. package/build/types/ai/mistral/index.d.ts.map +1 -1
  59. package/build/types/ai/mistral/streaming.d.ts +1 -1
  60. package/build/types/ai/mistral/streaming.d.ts.map +1 -1
  61. package/build/types/ai/mistral/utils.d.ts +5 -0
  62. package/build/types/ai/mistral/utils.d.ts.map +1 -1
  63. package/build/types/ai/vercel-ai/index.d.ts.map +1 -1
  64. package/build/types/ai/vercel-ai/vercel-ai-attributes.d.ts +3 -0
  65. package/build/types/ai/vercel-ai/vercel-ai-attributes.d.ts.map +1 -1
  66. package/build/types/ai/workers-ai/index.d.ts.map +1 -1
  67. package/build/types/ai/workers-ai/streaming.d.ts +1 -1
  68. package/build/types/ai/workers-ai/streaming.d.ts.map +1 -1
  69. package/build/types/index.d.ts +3 -1
  70. package/build/types/index.d.ts.map +1 -1
  71. package/build/types/integrations/cron.d.ts.map +1 -1
  72. package/build/types/integrations/google-genai.d.ts +3 -3
  73. package/build/types/integrations/google-genai.d.ts.map +1 -1
  74. package/build/types/integrations/mistral.d.ts.map +1 -1
  75. package/build/types/integrations/node-cron.d.ts +1 -1
  76. package/build/types/integrations/node-cron.d.ts.map +1 -1
  77. package/build/types/integrations/node-schedule.d.ts.map +1 -1
  78. package/build/types/integrations/vercel-ai/vercel-ai-dc-subscriber.d.ts.map +1 -1
  79. package/build/types/orchestrion/bundler/moduleInjectedTransform.d.ts.map +1 -1
  80. package/build/types/orchestrion/bundler/rollup.d.ts +3 -3
  81. package/build/types/orchestrion/bundler/rollup.d.ts.map +1 -1
  82. package/build/types/orchestrion/channels.d.ts +1 -0
  83. package/build/types/orchestrion/channels.d.ts.map +1 -1
  84. package/build/types/orchestrion/config/google-genai.d.ts +13 -0
  85. package/build/types/orchestrion/config/google-genai.d.ts.map +1 -1
  86. package/build/types/utils/cronMonitoring.d.ts +4 -5
  87. package/build/types/utils/cronMonitoring.d.ts.map +1 -1
  88. package/package.json +3 -3
@@ -36,61 +36,71 @@ function subscribeToScheduleChange(channelName, integrationName, onChange, onSta
36
36
  function shouldMonitorJob(name, job, excludeJobs) {
37
37
  return typeof name === "string" && !!name && typeof job === "function" && !job[MONITORED] && !stringMatchesSomePattern(name, excludeJobs, true);
38
38
  }
39
- const NICKNAMES = {
39
+ const COMMON_NICKNAMES = {
40
40
  "@yearly": "0 0 1 1 *",
41
- "@annually": "0 0 1 1 *",
42
41
  "@monthly": "0 0 1 * *",
43
42
  "@weekly": "0 0 * * 0",
44
43
  "@daily": "0 0 * * *",
45
- "@midnight": "0 0 * * *",
46
- "@hourly": "0 * * * *",
47
- "@minutely": "* * * * *",
48
- "@weekdays": "0 0 * * 1-5",
49
- "@weekends": "0 0 * * 0,6"
44
+ "@hourly": "0 * * * *"
45
+ };
46
+ const NICKNAMES = {
47
+ "node-cron": {
48
+ ...COMMON_NICKNAMES,
49
+ "@annually": "0 0 1 1 *",
50
+ "@midnight": "0 0 * * *"
51
+ },
52
+ cron: {
53
+ ...COMMON_NICKNAMES,
54
+ "@minutely": "* * * * *",
55
+ "@weekdays": "0 0 * * 1-5",
56
+ "@weekends": "0 0 * * 0,6"
57
+ },
58
+ "cron-parser": COMMON_NICKNAMES
50
59
  };
51
60
  const MONTHS = [
52
- "jan",
53
- "feb",
54
- "mar",
55
- "apr",
61
+ "january",
62
+ "february",
63
+ "march",
64
+ "april",
56
65
  "may",
57
- "jun",
58
- "jul",
59
- "aug",
60
- "sep",
61
- "oct",
62
- "nov",
63
- "dec"
66
+ "june",
67
+ "july",
68
+ "august",
69
+ "september",
70
+ "october",
71
+ "november",
72
+ "december"
64
73
  ];
65
74
  const WEEKDAYS = [
66
- "sun",
67
- "mon",
68
- "tue",
69
- "wed",
70
- "thu",
71
- "fri",
72
- "sat"
75
+ "sunday",
76
+ "monday",
77
+ "tuesday",
78
+ "wednesday",
79
+ "thursday",
80
+ "friday",
81
+ "saturday"
73
82
  ];
74
83
  /**
75
84
  * The Sentry monitor config for a cron expression, or `undefined` if Sentry would read it differently.
76
85
  * Without a `timezone`, the server's time zone is used, like the schedulers do.
77
86
  */
78
- function cronExpressionToMonitorConfig(expression, timezone, daySemantics) {
87
+ function cronExpressionToMonitorConfig(expression, timezone, dialect) {
79
88
  const trimmed = expression.trim();
80
- const fields = (NICKNAMES[trimmed.toLowerCase()] || trimmed).split(/\s+/);
89
+ const fields = (NICKNAMES[dialect][trimmed.toLowerCase()] || trimmed).split(/\s+/);
81
90
  if (fields.length === 6 && /^\d+$/.test(fields[0])) fields.shift();
82
- if (fields.length !== 5 || !fields.every((field) => /^[\d*,/a-z-]+$/i.test(field))) return;
83
- const [minute, hour, dayOfMonth, month, dayOfWeekWithNames] = fields;
84
- const dayOfWeek = replaceNames(dayOfWeekWithNames, WEEKDAYS, 0);
85
- if (!isSameDayMatching(dayOfMonth, dayOfWeek, daySemantics)) return;
91
+ if (fields.length !== 5 || !fields.every((field) => /^[\d*,/a-z#-]+$/i.test(field))) return;
92
+ const [minute, hour, dayOfMonth, month, dayOfWeek] = fields;
93
+ const monthNumbers = replaceNames(month, MONTHS, 1, dialect);
94
+ const weekdayNames = replaceNames(dayOfWeek, WEEKDAYS, 0, dialect);
95
+ const weekdayNumbers = dialect === "node-cron" ? endRangesOnSundayAsSeven(weekdayNames) : weekdayNames;
86
96
  const crontab = [
87
97
  minute,
88
98
  hour,
89
99
  dayOfMonth,
90
- replaceNames(month, MONTHS, 1),
91
- endRangesOnSundayAsSeven(dayOfWeek)
100
+ monthNumbers,
101
+ weekdayNumbers
92
102
  ];
93
- if (crontab.some((field) => /[a-z]/i.test(field) || hasReversedRange(field))) return;
103
+ if (crontab.some((field, index) => hasUnsupportedCharacter(field, dialect === "cron-parser" ? CRON_PARSER_DAY_TOKENS[index] : void 0) || hasReversedRange(field) || hasSteppedSingleValueRange(field)) || !isSameDayMatching(dayOfMonth, weekdayNumbers, dialect) || !hasDayInSelectedMonths(dayOfMonth, monthNumbers)) return;
94
104
  const sentryTimezone = toSentryTimezone(typeof timezone === "string" && timezone ? timezone : void 0);
95
105
  if (!sentryTimezone) return;
96
106
  return {
@@ -101,31 +111,93 @@ function cronExpressionToMonitorConfig(expression, timezone, daySemantics) {
101
111
  timezone: sentryTimezone
102
112
  };
103
113
  }
104
- function isSameDayMatching(dayOfMonth, dayOfWeek, daySemantics) {
105
- if (dayOfMonth === "*" || dayOfWeek === "*") return true;
106
- if (daySemantics === "and") return dayOfMonth.startsWith("*") || dayOfWeek.startsWith("*");
107
- return !(dayOfMonth.startsWith("*") || dayOfWeek.startsWith("*") || countValues(dayOfMonth, 1, 31) >= 29 || countValues(dayOfWeek, 0, 7, (day) => day % 7) === 7);
114
+ const CRON_PARSER_DAY_TOKENS = [
115
+ void 0,
116
+ void 0,
117
+ /^L$/,
118
+ void 0,
119
+ /^[0-7](?:L|#[1-5])$/
120
+ ];
121
+ function hasUnsupportedCharacter(field, dayToken) {
122
+ return field.split(",").some((part) => /[a-z#]/i.test(part) && !dayToken?.test(part));
123
+ }
124
+ function isSameDayMatching(dayOfMonth, dayOfWeek, dialect) {
125
+ const monthDays = parseDayField(dayOfMonth, 1, 31);
126
+ const weekdays = parseDayField(dayOfWeek, 0, 7);
127
+ if (!monthDays || !weekdays) return false;
128
+ const sentryNeedsBoth = dayOfMonth.startsWith("*") || dayOfWeek.startsWith("*");
129
+ if (dialect === "cron-parser") return isSameDayMatchingInCronParser(dayOfMonth, dayOfWeek, monthDays, weekdays, sentryNeedsBoth);
130
+ const allMonthDays = monthDays.days === 31;
131
+ const allWeekdays = weekdays.days === 7;
132
+ return allMonthDays && allWeekdays || (dialect === "node-cron" || allMonthDays || allWeekdays) === sentryNeedsBoth;
133
+ }
134
+ function isSameDayMatchingInCronParser(dayOfMonth, dayOfWeek, monthDays, weekdays, sentryNeedsBoth) {
135
+ if (weekdays.cronParserAddsSunday || dayOfWeek.includes("#") && (dayOfMonth !== "*" || dayOfWeek.includes(","))) return false;
136
+ if (dayOfWeek === "*") return true;
137
+ if (dayOfMonth === "*") return weekdays.cronParserValues !== 8 || weekdays.days === 7;
138
+ return !sentryNeedsBoth && monthDays.cronParserValues < 29 && weekdays.cronParserValues !== 8;
139
+ }
140
+ const DAYS_IN_MONTH = [
141
+ 31,
142
+ 29,
143
+ 31,
144
+ 30,
145
+ 31,
146
+ 30,
147
+ 31,
148
+ 31,
149
+ 30,
150
+ 31,
151
+ 30,
152
+ 31
153
+ ];
154
+ function hasDayInSelectedMonths(dayOfMonth, month) {
155
+ const days = parseDayField(dayOfMonth, 1, 31)?.values;
156
+ const months = parseDayField(month, 1, 12)?.values;
157
+ if (!days || !months) return false;
158
+ return !days.size || Math.min(...days) <= Math.max(...[...months].map((m) => DAYS_IN_MONTH[m - 1]));
108
159
  }
109
- function countValues(field, min, max, normalize = (value) => value) {
110
- const values = /* @__PURE__ */ new Set();
160
+ function parseDayField(field, low, high) {
161
+ const days = /* @__PURE__ */ new Set();
162
+ let cronParserValues = 0;
163
+ let cronParserListsSunday = false;
111
164
  for (const part of field.split(",")) {
112
- const match = /^(?:\*|(\d+)(?:-(\d+))?)(?:\/(\d+))?$/.exec(part);
113
- if (!match) continue;
114
- const [, start, end, step] = match;
115
- const first = start === void 0 ? min : Number(start);
116
- const last = Math.min(end !== void 0 ? Number(end) : start !== void 0 && step === void 0 ? first : max, max);
117
- for (let value = first; value <= last; value += Number(step) || 1) values.add(normalize(value));
165
+ if (/^(?:L|[0-7](?:L|#[1-5]))$/.test(part)) {
166
+ cronParserValues++;
167
+ continue;
168
+ }
169
+ const match = /^(?:(\*)|(\d+)(?:-(\d+))?)(?:\/(\d+))?$/.exec(part);
170
+ if (!match) return;
171
+ const [, wildcard, from, to, step] = match;
172
+ const lower = wildcard ? low : Number(from);
173
+ const upper = wildcard || step && !to ? high : Number(to ?? from);
174
+ const increment = Number(step ?? 1);
175
+ if (!increment || lower < low || upper > high || lower > upper) return;
176
+ if (high === 7 && upper === 7 && lower !== 0 && (to || step)) {
177
+ cronParserValues++;
178
+ cronParserListsSunday = true;
179
+ }
180
+ for (let day = lower; day <= upper; day += increment) {
181
+ days.add(high === 7 && day === 7 ? 0 : day);
182
+ cronParserValues++;
183
+ }
118
184
  }
119
- return values.size;
185
+ return {
186
+ values: days,
187
+ days: days.size,
188
+ cronParserValues,
189
+ cronParserAddsSunday: cronParserListsSunday && !days.has(0)
190
+ };
120
191
  }
121
- function replaceNames(field, names, offset) {
192
+ function replaceNames(field, names, offset, dialect) {
122
193
  return field.replace(/[a-z]+/gi, (word) => {
123
- const index = names.indexOf(word.slice(0, 3).toLowerCase());
194
+ const lowerCase = word.toLowerCase();
195
+ const index = names.findIndex((name) => lowerCase === name.slice(0, 3) || dialect === "node-cron" && lowerCase === name);
124
196
  return index === -1 ? word : String(index + offset);
125
197
  });
126
198
  }
127
199
  function endRangesOnSundayAsSeven(field) {
128
- return field.replace(/(\d+)-0(?!\d)/g, (range, start) => Number(start) ? `${start}-7` : range);
200
+ return field.split(",").map((part) => part.replace(/^(\d+)-0(?!\d)/, (range, start) => Number(start) ? `${start}-7` : range)).join(",");
129
201
  }
130
202
  function hasReversedRange(field) {
131
203
  return field.split(",").some((part) => {
@@ -133,6 +205,12 @@ function hasReversedRange(field) {
133
205
  return !!range && Number(range[1]) > Number(range[2]);
134
206
  });
135
207
  }
208
+ function hasSteppedSingleValueRange(field) {
209
+ return field.split(",").some((part) => {
210
+ const range = /^(\d+)-(\d+)\//.exec(part);
211
+ return !!range && Number(range[1]) === Number(range[2]);
212
+ });
213
+ }
136
214
  function toSentryTimezone(timezone) {
137
215
  if (timezone && /^(?:utc|gmt)?[+-]/i.test(timezone)) return;
138
216
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"cronMonitoring.js","names":["diagnosticsChannel.tracingChannel"],"sources":["../../../src/utils/cronMonitoring.ts"],"sourcesContent":["import type { MonitorConfig } from '@sentry/core';\nimport {\n addNonEnumerableProperty,\n captureException,\n debug,\n isThenable,\n startNewTrace,\n stringMatchesSomePattern,\n withMonitor,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport * as diagnosticsChannel from './diagnosticsChannel';\n\nexport type AnyFn = (this: unknown, ...args: unknown[]) => unknown;\n\n// Set by `Sentry.cron.instrumentCron`, `instrumentNodeCron`, `instrumentNodeSchedule` and `wrapScheduledJob`, which already\n// send check-ins.\nconst MONITORED = Symbol.for('sentry.cron.monitored');\n\n/**\n * Calls `onJob` with the arguments of each call on a scheduler's job-creation channel, so it can wrap the job.\n * Errors are logged and the job is created unmonitored.\n */\nexport function subscribeToJobCreation(\n channelName: string,\n integrationName: string,\n onJob: (args: unknown[]) => void,\n): void {\n diagnosticsChannel.tracingChannel<{ arguments: unknown[] }>(channelName).start.subscribe(message => {\n try {\n onJob((message as { arguments: unknown[] }).arguments);\n } catch (e) {\n DEBUG_BUILD && debug.error(`[${integrationName}] Failed to set up the cron monitor:`, e);\n }\n });\n}\n\n/** A call on a schedule-change channel: its arguments, the job it was called on, and what it returned. */\nexport interface ScheduleChange {\n arguments: unknown[];\n self?: unknown;\n result?: unknown;\n}\n\n/**\n * Calls `onChange` after each call on a scheduler's schedule-change channel, so it can update the job's monitor config.\n * `onStart` gets the same object before the call. Errors are logged and the job keeps its config.\n */\nexport function subscribeToScheduleChange(\n channelName: string,\n integrationName: string,\n onChange: (change: ScheduleChange) => void,\n onStart?: (change: ScheduleChange) => void,\n): void {\n const channel = diagnosticsChannel.tracingChannel<ScheduleChange>(channelName);\n const handle = (handler: (change: ScheduleChange) => void) => (message: unknown) => {\n try {\n handler(message as ScheduleChange);\n } catch (e) {\n DEBUG_BUILD && debug.error(`[${integrationName}] Failed to update the cron monitor:`, e);\n }\n };\n if (onStart) {\n channel.start.subscribe(handle(onStart));\n }\n channel.end.subscribe(handle(onChange));\n}\n\n/** Whether a job is named, not excluded, and not already monitored by `Sentry.cron.instrument*` or `wrapScheduledJob`. */\nexport function shouldMonitorJob(\n name: unknown,\n job: unknown,\n excludeJobs: Array<string | RegExp> | undefined,\n): name is string {\n return (\n typeof name === 'string' &&\n !!name &&\n typeof job === 'function' &&\n !(job as { [MONITORED]?: boolean })[MONITORED] &&\n !stringMatchesSomePattern(name, excludeJobs, true)\n );\n}\n\nconst NICKNAMES: Record<string, string> = {\n '@yearly': '0 0 1 1 *',\n '@annually': '0 0 1 1 *',\n '@monthly': '0 0 1 * *',\n '@weekly': '0 0 * * 0',\n '@daily': '0 0 * * *',\n '@midnight': '0 0 * * *',\n '@hourly': '0 * * * *',\n '@minutely': '* * * * *',\n '@weekdays': '0 0 * * 1-5',\n '@weekends': '0 0 * * 0,6',\n};\n\nconst MONTHS = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];\nconst WEEKDAYS = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];\n\n/**\n * How a scheduler combines a restricted day-of-month and day-of-week:\n * - `and`: both must match (`node-cron`).\n * - `or`: either matches, unless one is `*` or a full range (`cron-parser`, `cron`).\n */\nexport type DayFieldSemantics = 'and' | 'or';\n\n/**\n * The Sentry monitor config for a cron expression, or `undefined` if Sentry would read it differently.\n * Without a `timezone`, the server's time zone is used, like the schedulers do.\n */\nexport function cronExpressionToMonitorConfig(\n expression: string,\n timezone: unknown,\n daySemantics: DayFieldSemantics,\n): MonitorConfig | undefined {\n const trimmed = expression.trim();\n const fields = (NICKNAMES[trimmed.toLowerCase()] || trimmed).split(/\\s+/);\n\n // Sentry schedules have minute granularity, so only a fixed second can be dropped.\n if (fields.length === 6 && /^\\d+$/.test(fields[0] as string)) {\n fields.shift();\n }\n if (fields.length !== 5 || !fields.every(field => /^[\\d*,/a-z-]+$/i.test(field))) {\n return undefined;\n }\n\n const [minute, hour, dayOfMonth, month, dayOfWeekWithNames] = fields as [string, string, string, string, string];\n const dayOfWeek = replaceNames(dayOfWeekWithNames, WEEKDAYS, 0);\n if (!isSameDayMatching(dayOfMonth, dayOfWeek, daySemantics)) {\n return undefined;\n }\n\n const crontab = [minute, hour, dayOfMonth, replaceNames(month, MONTHS, 1), endRangesOnSundayAsSeven(dayOfWeek)];\n if (crontab.some(field => /[a-z]/i.test(field) || hasReversedRange(field))) {\n return undefined;\n }\n\n const sentryTimezone = toSentryTimezone(typeof timezone === 'string' && timezone ? timezone : undefined);\n if (!sentryTimezone) {\n return undefined;\n }\n\n return { schedule: { type: 'crontab', value: crontab.join(' ') }, timezone: sentryTimezone };\n}\n\n// Sentry requires both day fields to match when one starts with `*`, and either otherwise.\nfunction isSameDayMatching(dayOfMonth: string, dayOfWeek: string, daySemantics: DayFieldSemantics): boolean {\n if (dayOfMonth === '*' || dayOfWeek === '*') {\n return true;\n }\n if (daySemantics === 'and') {\n return dayOfMonth.startsWith('*') || dayOfWeek.startsWith('*');\n }\n // `cron` reads a field that lists every day like `*`. `cron-parser` does so for a day-of-month that lists every day\n // of the current month, and February has 29 there.\n return !(\n dayOfMonth.startsWith('*') ||\n dayOfWeek.startsWith('*') ||\n countValues(dayOfMonth, 1, 31) >= 29 ||\n countValues(dayOfWeek, 0, 7, day => day % 7) === 7\n );\n}\n\nfunction countValues(field: string, min: number, max: number, normalize = (value: number): number => value): number {\n const values = new Set<number>();\n for (const part of field.split(',')) {\n const match = /^(?:\\*|(\\d+)(?:-(\\d+))?)(?:\\/(\\d+))?$/.exec(part);\n if (!match) {\n continue;\n }\n const [, start, end, step] = match;\n const first = start === undefined ? min : Number(start);\n const last = Math.min(\n end !== undefined ? Number(end) : start !== undefined && step === undefined ? first : max,\n max,\n );\n for (let value = first; value <= last; value += Number(step) || 1) {\n values.add(normalize(value));\n }\n }\n return values.size;\n}\n\nfunction replaceNames(field: string, names: string[], offset: number): string {\n return field.replace(/[a-z]+/gi, word => {\n const index = names.indexOf(word.slice(0, 3).toLowerCase());\n return index === -1 ? word : String(index + offset);\n });\n}\n\n// `sat-sun` is `6-0`, which node-cron 4.6+ runs on Saturday and Sunday. Sentry only accepts it as `6-7`.\nfunction endRangesOnSundayAsSeven(field: string): string {\n return field.replace(/(\\d+)-0(?!\\d)/g, (range, start: string) => (Number(start) ? `${start}-7` : range));\n}\n\n// node-cron 4.6+ wraps these around (`22-2` hours), earlier versions swap them, the other schedulers reject them,\n// and so does Sentry.\nfunction hasReversedRange(field: string): boolean {\n return field.split(',').some(part => {\n const range = /^(\\d+)-(\\d+)/.exec(part);\n return !!range && Number(range[1]) > Number(range[2]);\n });\n}\n\nfunction toSentryTimezone(timezone: string | undefined): string | undefined {\n if (timezone && /^(?:utc|gmt)?[+-]/i.test(timezone)) {\n return undefined;\n }\n try {\n const resolved = new Intl.DateTimeFormat('en-US', { timeZone: timezone }).resolvedOptions().timeZone;\n return resolved && resolved !== 'Etc/Unknown' ? resolved : undefined;\n } catch {\n return undefined;\n }\n}\n\nconst monitorConfigs = new WeakMap<AnyFn, MonitorConfig | undefined>();\n\n/**\n * Wraps a scheduled job with check-ins. Errors are captured, because schedulers catch them, and rethrown.\n * Jobs without a monitor config send no check-ins.\n */\nexport function wrapScheduledJob(\n func: AnyFn,\n monitorSlug: string,\n monitorConfig: MonitorConfig | undefined,\n mechanismType: string,\n): AnyFn {\n const captureAndRethrow = (error: unknown): never => {\n captureException(error, { mechanism: { handled: false, type: mechanismType } });\n throw error;\n };\n\n const wrapped = function (this: unknown, ...args: unknown[]): unknown {\n const run = (): unknown => {\n try {\n const result: unknown = func.apply(this, args);\n return isThenable(result) ? result.then(undefined, captureAndRethrow) : result;\n } catch (e) {\n return captureAndRethrow(e);\n }\n };\n const currentConfig = monitorConfigs.get(wrapped);\n return startNewTrace(() => (currentConfig ? withMonitor(monitorSlug, run, currentConfig) : run()));\n };\n monitorConfigs.set(wrapped, monitorConfig);\n addNonEnumerableProperty(wrapped, MONITORED, true);\n return wrapped;\n}\n\n/** Sets the monitor config a job from `wrapScheduledJob` sends on its next runs. Other functions are ignored. */\nexport function updateMonitorConfig(job: unknown, monitorConfig: MonitorConfig | undefined): void {\n if (typeof job === 'function' && monitorConfigs.has(job as AnyFn)) {\n monitorConfigs.set(job as AnyFn, monitorConfig);\n }\n}\n"],"mappings":";;;;AAiBA,MAAM,YAAY,OAAO,IAAI,uBAAuB;;;;;AAMpD,SAAgB,uBACd,aACA,iBACA,OACM;CACNA,eAA4D,WAAW,CAAC,CAAC,MAAM,WAAU,YAAW;EAClG,IAAI;GACF,MAAO,QAAqC,SAAS;EACvD,SAAS,GAAG;GACV,eAAe,MAAM,MAAM,IAAI,gBAAgB,uCAAuC,CAAC;EACzF;CACF,CAAC;AACH;;;;;AAaA,SAAgB,0BACd,aACA,iBACA,UACA,SACM;CACN,MAAM,UAAUA,eAAkD,WAAW;CAC7E,MAAM,UAAU,aAA+C,YAAqB;EAClF,IAAI;GACF,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,CAAE;CACnG;CACA,eAAe,IAAI,SAAS,aAAa;CACzC,yBAAyB,SAAS,WAAW,IAAI;CACjD,OAAO;AACT;;AAGA,SAAgB,oBAAoB,KAAc,eAAgD;CAChG,IAAI,OAAO,QAAQ,cAAc,eAAe,IAAI,GAAY,GAC9D,eAAe,IAAI,KAAc,aAAa;AAElD"}
1
+ {"version":3,"file":"cronMonitoring.js","names":["diagnosticsChannel.tracingChannel"],"sources":["../../../src/utils/cronMonitoring.ts"],"sourcesContent":["import type { MonitorConfig } from '@sentry/core';\nimport {\n addNonEnumerableProperty,\n captureException,\n debug,\n isThenable,\n startNewTrace,\n stringMatchesSomePattern,\n withMonitor,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport * as diagnosticsChannel from './diagnosticsChannel';\n\nexport type AnyFn = (this: unknown, ...args: unknown[]) => unknown;\n\n// Set by `Sentry.cron.instrumentCron`, `instrumentNodeCron`, `instrumentNodeSchedule` and `wrapScheduledJob`, which already\n// send check-ins.\nconst MONITORED = Symbol.for('sentry.cron.monitored');\n\n/**\n * Calls `onJob` with the arguments of each call on a scheduler's job-creation channel, so it can wrap the job.\n * Errors are logged and the job is created unmonitored.\n */\nexport function subscribeToJobCreation(\n channelName: string,\n integrationName: string,\n onJob: (args: unknown[]) => void,\n): void {\n diagnosticsChannel.tracingChannel<{ arguments: unknown[] }>(channelName).start.subscribe(message => {\n try {\n onJob((message as { arguments: unknown[] }).arguments);\n } catch (e) {\n DEBUG_BUILD && debug.error(`[${integrationName}] Failed to set up the cron monitor:`, e);\n }\n });\n}\n\n/** A call on a schedule-change channel: its arguments, the job it was called on, and what it returned. */\nexport interface ScheduleChange {\n arguments: unknown[];\n self?: unknown;\n result?: unknown;\n}\n\n/**\n * Calls `onChange` after each call on a scheduler's schedule-change channel, so it can update the job's monitor config.\n * `onStart` gets the same object before the call. Errors are logged and the job keeps its config.\n */\nexport function subscribeToScheduleChange(\n channelName: string,\n integrationName: string,\n onChange: (change: ScheduleChange) => void,\n onStart?: (change: ScheduleChange) => void,\n): void {\n const channel = diagnosticsChannel.tracingChannel<ScheduleChange>(channelName);\n const handle = (handler: (change: ScheduleChange) => void) => (message: unknown) => {\n try {\n handler(message as ScheduleChange);\n } catch (e) {\n DEBUG_BUILD && debug.error(`[${integrationName}] Failed to update the cron monitor:`, e);\n }\n };\n if (onStart) {\n channel.start.subscribe(handle(onStart));\n }\n channel.end.subscribe(handle(onChange));\n}\n\n/** Whether a job is named, not excluded, and not already monitored by `Sentry.cron.instrument*` or `wrapScheduledJob`. */\nexport function shouldMonitorJob(\n name: unknown,\n job: unknown,\n excludeJobs: Array<string | RegExp> | undefined,\n): name is string {\n return (\n typeof name === 'string' &&\n !!name &&\n typeof job === 'function' &&\n !(job as { [MONITORED]?: boolean })[MONITORED] &&\n !stringMatchesSomePattern(name, excludeJobs, true)\n );\n}\n\n/**\n * The library that parses a scheduler's cron expressions: `node-cron`, `cron` (also behind `@nestjs/schedule`), or\n * `cron-parser` 4 or 5 (behind `node-schedule` and BullMQ).\n */\nexport type CronDialect = 'node-cron' | 'cron' | 'cron-parser';\n\nconst COMMON_NICKNAMES: Record<string, string> = {\n '@yearly': '0 0 1 1 *',\n '@monthly': '0 0 1 * *',\n '@weekly': '0 0 * * 0',\n '@daily': '0 0 * * *',\n '@hourly': '0 * * * *',\n};\n\nconst NICKNAMES: Record<CronDialect, Record<string, string>> = {\n 'node-cron': { ...COMMON_NICKNAMES, '@annually': '0 0 1 1 *', '@midnight': '0 0 * * *' },\n cron: { ...COMMON_NICKNAMES, '@minutely': '* * * * *', '@weekdays': '0 0 * * 1-5', '@weekends': '0 0 * * 0,6' },\n 'cron-parser': COMMON_NICKNAMES,\n};\n\nconst MONTHS = [\n 'january',\n 'february',\n 'march',\n 'april',\n 'may',\n 'june',\n 'july',\n 'august',\n 'september',\n 'october',\n 'november',\n 'december',\n];\nconst WEEKDAYS = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];\n\n/**\n * The Sentry monitor config for a cron expression, or `undefined` if Sentry would read it differently.\n * Without a `timezone`, the server's time zone is used, like the schedulers do.\n */\nexport function cronExpressionToMonitorConfig(\n expression: string,\n timezone: unknown,\n dialect: CronDialect,\n): MonitorConfig | undefined {\n const trimmed = expression.trim();\n const fields = (NICKNAMES[dialect][trimmed.toLowerCase()] || trimmed).split(/\\s+/);\n\n // Sentry schedules have minute granularity, so only a fixed second can be dropped.\n if (fields.length === 6 && /^\\d+$/.test(fields[0] as string)) {\n fields.shift();\n }\n if (fields.length !== 5 || !fields.every(field => /^[\\d*,/a-z#-]+$/i.test(field))) {\n return undefined;\n }\n\n const [minute, hour, dayOfMonth, month, dayOfWeek] = fields as [string, string, string, string, string];\n const monthNumbers = replaceNames(month, MONTHS, 1, dialect);\n const weekdayNames = replaceNames(dayOfWeek, WEEKDAYS, 0, dialect);\n const weekdayNumbers = dialect === 'node-cron' ? endRangesOnSundayAsSeven(weekdayNames) : weekdayNames;\n const crontab = [minute, hour, dayOfMonth, monthNumbers, weekdayNumbers];\n if (\n crontab.some(\n (field, index) =>\n hasUnsupportedCharacter(field, dialect === 'cron-parser' ? CRON_PARSER_DAY_TOKENS[index] : undefined) ||\n hasReversedRange(field) ||\n hasSteppedSingleValueRange(field),\n ) ||\n !isSameDayMatching(dayOfMonth, weekdayNumbers, dialect) ||\n !hasDayInSelectedMonths(dayOfMonth, monthNumbers)\n ) {\n return undefined;\n }\n\n const sentryTimezone = toSentryTimezone(typeof timezone === 'string' && timezone ? timezone : undefined);\n if (!sentryTimezone) {\n return undefined;\n }\n\n return { schedule: { type: 'crontab', value: crontab.join(' ') }, timezone: sentryTimezone };\n}\n\n// `cron-parser` reads these like Sentry: `L` is the last day of the month, `5L` the last Friday, `5#2` the second Friday.\nconst CRON_PARSER_DAY_TOKENS = [undefined, undefined, /^L$/, undefined, /^[0-7](?:L|#[1-5])$/];\n\nfunction hasUnsupportedCharacter(field: string, dayToken: RegExp | undefined): boolean {\n return field.split(',').some(part => /[a-z#]/i.test(part) && !dayToken?.test(part));\n}\n\n// Sentry needs both day fields to match when one starts with `*`, and either otherwise.\nfunction isSameDayMatching(dayOfMonth: string, dayOfWeek: string, dialect: CronDialect): boolean {\n const monthDays = parseDayField(dayOfMonth, 1, 31);\n const weekdays = parseDayField(dayOfWeek, 0, 7);\n if (!monthDays || !weekdays) {\n return false;\n }\n const sentryNeedsBoth = dayOfMonth.startsWith('*') || dayOfWeek.startsWith('*');\n if (dialect === 'cron-parser') {\n return isSameDayMatchingInCronParser(dayOfMonth, dayOfWeek, monthDays, weekdays, sentryNeedsBoth);\n }\n // `cron` needs either day field to match, but ignores one that lists every day, like `1-31` or `sun-sat`.\n const allMonthDays = monthDays.days === 31;\n const allWeekdays = weekdays.days === 7;\n const schedulerNeedsBoth = dialect === 'node-cron' || allMonthDays || allWeekdays;\n return (allMonthDays && allWeekdays) || schedulerNeedsBoth === sentryNeedsBoth;\n}\n\n// `cron-parser` ignores a day-of-week with 8 values, and a day-of-month with at least as many values as the month has\n// days (29 in February), duplicates included. Then only the other field has to match, and otherwise either.\nfunction isSameDayMatchingInCronParser(\n dayOfMonth: string,\n dayOfWeek: string,\n monthDays: DayField,\n weekdays: DayField,\n sentryNeedsBoth: boolean,\n): boolean {\n // `cron-parser` 4 ignores a restricted day of month when the day of week has a `#`.\n if (weekdays.cronParserAddsSunday || (dayOfWeek.includes('#') && (dayOfMonth !== '*' || dayOfWeek.includes(',')))) {\n return false;\n }\n if (dayOfWeek === '*') {\n return true;\n }\n if (dayOfMonth === '*') {\n return weekdays.cronParserValues !== 8 || weekdays.days === 7;\n }\n return !sentryNeedsBoth && monthDays.cronParserValues < 29 && weekdays.cronParserValues !== 8;\n}\n\nconst DAYS_IN_MONTH = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\n// Sentry rejects a day of month that none of the months have, like `31` in `0 9 31 2,4 *`. The schedulers run these on\n// the day of week or not at all.\nfunction hasDayInSelectedMonths(dayOfMonth: string, month: string): boolean {\n const days = parseDayField(dayOfMonth, 1, 31)?.values;\n const months = parseDayField(month, 1, 12)?.values;\n if (!days || !months) {\n return false;\n }\n return !days.size || Math.min(...days) <= Math.max(...[...months].map(m => DAYS_IN_MONTH[m - 1] as number));\n}\n\ninterface DayField {\n values: Set<number>;\n days: number;\n cronParserValues: number;\n cronParserAddsSunday: boolean;\n}\n\nfunction parseDayField(field: string, low: number, high: number): DayField | undefined {\n const days = new Set<number>();\n let cronParserValues = 0;\n let cronParserListsSunday = false;\n for (const part of field.split(',')) {\n // `L`, `5L` and `5#2` stand for one day each. Only the `cron-parser` dialect lets them through.\n if (/^(?:L|[0-7](?:L|#[1-5]))$/.test(part)) {\n cronParserValues++;\n continue;\n }\n const match = /^(?:(\\*)|(\\d+)(?:-(\\d+))?)(?:\\/(\\d+))?$/.exec(part);\n if (!match) {\n return undefined;\n }\n const [, wildcard, from, to, step] = match;\n const lower = wildcard ? low : Number(from);\n const upper = wildcard || (step && !to) ? high : Number(to ?? from);\n const increment = Number(step ?? 1);\n if (!increment || lower < low || upper > high || lower > upper) {\n return undefined;\n }\n // `cron-parser` starts a weekday range that ends on 7 with a Sunday, whatever the step.\n if (high === 7 && upper === 7 && lower !== 0 && (to || step)) {\n cronParserValues++;\n cronParserListsSunday = true;\n }\n for (let day = lower; day <= upper; day += increment) {\n days.add(high === 7 && day === 7 ? 0 : day);\n cronParserValues++;\n }\n }\n return {\n values: days,\n days: days.size,\n cronParserValues,\n cronParserAddsSunday: cronParserListsSunday && !days.has(0),\n };\n}\n\nfunction replaceNames(field: string, names: string[], offset: number, dialect: CronDialect): string {\n return field.replace(/[a-z]+/gi, word => {\n const lowerCase = word.toLowerCase();\n const index = names.findIndex(\n name => lowerCase === name.slice(0, 3) || (dialect === 'node-cron' && lowerCase === name),\n );\n return index === -1 ? word : String(index + offset);\n });\n}\n\n// `sat-sun` is `6-0`, which node-cron 4.6+ runs on Saturday and Sunday. Sentry only accepts it as `6-7`. The other\n// schedulers reject it.\nfunction endRangesOnSundayAsSeven(field: string): string {\n return field\n .split(',')\n .map(part => part.replace(/^(\\d+)-0(?!\\d)/, (range, start: string) => (Number(start) ? `${start}-7` : range)))\n .join(',');\n}\n\n// node-cron 4.6+ wraps these around (`22-2` hours), earlier versions swap them, the other schedulers reject them,\n// and so does Sentry.\nfunction hasReversedRange(field: string): boolean {\n return field.split(',').some(part => {\n const range = /^(\\d+)-(\\d+)/.exec(part);\n return !!range && Number(range[1]) > Number(range[2]);\n });\n}\n\n// The schedulers run `13-13/3` only on the 13th, but Sentry reads it as `13/3`.\nfunction hasSteppedSingleValueRange(field: string): boolean {\n return field.split(',').some(part => {\n const range = /^(\\d+)-(\\d+)\\//.exec(part);\n return !!range && Number(range[1]) === Number(range[2]);\n });\n}\n\nfunction toSentryTimezone(timezone: string | undefined): string | undefined {\n if (timezone && /^(?:utc|gmt)?[+-]/i.test(timezone)) {\n return undefined;\n }\n try {\n const resolved = new Intl.DateTimeFormat('en-US', { timeZone: timezone }).resolvedOptions().timeZone;\n return resolved && resolved !== 'Etc/Unknown' ? resolved : undefined;\n } catch {\n return undefined;\n }\n}\n\nconst monitorConfigs = new WeakMap<AnyFn, MonitorConfig | undefined>();\n\n/**\n * Wraps a scheduled job with check-ins. Errors are captured, because schedulers catch them, and rethrown.\n * Jobs without a monitor config send no check-ins.\n */\nexport function wrapScheduledJob(\n func: AnyFn,\n monitorSlug: string,\n monitorConfig: MonitorConfig | undefined,\n mechanismType: string,\n): AnyFn {\n const captureAndRethrow = (error: unknown): never => {\n captureException(error, { mechanism: { handled: false, type: mechanismType } });\n throw error;\n };\n\n const wrapped = function (this: unknown, ...args: unknown[]): unknown {\n const run = (): unknown => {\n try {\n const result: unknown = func.apply(this, args);\n return isThenable(result) ? result.then(undefined, captureAndRethrow) : result;\n } catch (e) {\n return captureAndRethrow(e);\n }\n };\n const currentConfig = monitorConfigs.get(wrapped);\n return startNewTrace(() => (currentConfig ? withMonitor(monitorSlug, run, currentConfig) : run()));\n };\n monitorConfigs.set(wrapped, monitorConfig);\n addNonEnumerableProperty(wrapped, MONITORED, true);\n return wrapped;\n}\n\n/** Sets the monitor config a job from `wrapScheduledJob` sends on its next runs. Other functions are ignored. */\nexport function updateMonitorConfig(job: unknown, monitorConfig: MonitorConfig | undefined): void {\n if (typeof job === 'function' && monitorConfigs.has(job as AnyFn)) {\n monitorConfigs.set(job as AnyFn, monitorConfig);\n }\n}\n"],"mappings":";;;;AAiBA,MAAM,YAAY,OAAO,IAAI,uBAAuB;;;;;AAMpD,SAAgB,uBACd,aACA,iBACA,OACM;CACNA,eAA4D,WAAW,CAAC,CAAC,MAAM,WAAU,YAAW;EAClG,IAAI;GACF,MAAO,QAAqC,SAAS;EACvD,SAAS,GAAG;GACV,eAAe,MAAM,MAAM,IAAI,gBAAgB,uCAAuC,CAAC;EACzF;CACF,CAAC;AACH;;;;;AAaA,SAAgB,0BACd,aACA,iBACA,UACA,SACM;CACN,MAAM,UAAUA,eAAkD,WAAW;CAC7E,MAAM,UAAU,aAA+C,YAAqB;EAClF,IAAI;GACF,QAAQ,OAAyB;EACnC,SAAS,GAAG;GACV,eAAe,MAAM,MAAM,IAAI,gBAAgB,uCAAuC,CAAC;EACzF;CACF;CACA,IAAI,SACF,QAAQ,MAAM,UAAU,OAAO,OAAO,CAAC;CAEzC,QAAQ,IAAI,UAAU,OAAO,QAAQ,CAAC;AACxC;;AAGA,SAAgB,iBACd,MACA,KACA,aACgB;CAChB,OACE,OAAO,SAAS,YAChB,CAAC,CAAC,QACF,OAAO,QAAQ,cACf,CAAE,IAAkC,cACpC,CAAC,yBAAyB,MAAM,aAAa,IAAI;AAErD;AAQA,MAAM,mBAA2C;CAC/C,WAAW;CACX,YAAY;CACZ,WAAW;CACX,UAAU;CACV,WAAW;AACb;AAEA,MAAM,YAAyD;CAC7D,aAAa;EAAE,GAAG;EAAkB,aAAa;EAAa,aAAa;CAAY;CACvF,MAAM;EAAE,GAAG;EAAkB,aAAa;EAAa,aAAa;EAAe,aA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;GAC1E,SAAS,GAAG;IACV,OAAO,kBAAkB,CAAC;GAC5B;EACF;EACA,MAAM,gBAAgB,eAAe,IAAI,OAAO;EAChD,OAAO,oBAAqB,gBAAgB,YAAY,aAAa,KAAK,aAAa,IAAI,IAAI,CAAE;CACnG;CACA,eAAe,IAAI,SAAS,aAAa;CACzC,yBAAyB,SAAS,WAAW,IAAI;CACjD,OAAO;AACT;;AAGA,SAAgB,oBAAoB,KAAc,eAAgD;CAChG,IAAI,OAAO,QAAQ,cAAc,eAAe,IAAI,GAAY,GAC9D,eAAe,IAAI,KAAc,aAAa;AAElD"}
@@ -20,6 +20,9 @@ export declare const GOOGLE_GENAI_METHOD_REGISTRY: {
20
20
  readonly operation: 'chat';
21
21
  readonly streaming: true;
22
22
  };
23
+ readonly 'decisions.create': {
24
+ readonly operation: 'decide';
25
+ };
23
26
  };
24
27
  export declare const GOOGLE_GENAI_SYSTEM_NAME = "google_genai";
25
28
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/ai/google-genai/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,6BAA6B,EAAG,cAAuB,CAAC;AAMrE,eAAO,MAAM,4BAA4B;;iBACX,SAAS,EAAE,kBAAkB;;;iBACvB,SAAS,EAAE,kBAAkB;iBAAE,SAAS;;;iBACjD,SAAS,EAAE,YAAY;;;iBAC9B,eAAe,EAAE,MAAM;;;iBACnB,SAAS,EAAE,MAAM;;;iBACX,SAAS,EAAE,MAAM;iBAAE,SAAS;;CACX,CAAC;AAGhD,eAAO,MAAM,wBAAwB,iBAAiB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/ai/google-genai/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,6BAA6B,EAAG,cAAuB,CAAC;AAOrE,eAAO,MAAM,4BAA4B;;iBACX,SAAS,EAAE,kBAAkB;;;iBACvB,SAAS,EAAE,kBAAkB;iBAAE,SAAS;;;iBACjD,SAAS,EAAE,YAAY;;;iBAC9B,eAAe,EAAE,MAAM;;;iBACnB,SAAS,EAAE,MAAM;;;iBACX,SAAS,EAAE,MAAM;iBAAE,SAAS;;;iBAClC,SAAS,EAAE,QAAQ;;CACI,CAAC;AAGhD,eAAO,MAAM,wBAAwB,iBAAiB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Span } from '@sentry/core';
2
+ /**
3
+ * Serialize a decisions request. Its evidence is `input` where Jev's is `state`; it is recorded as `state`
4
+ * so both render the same.
5
+ */
6
+ export declare function getDecisionInputMessages(params: Record<string, unknown>): string | undefined;
7
+ export declare function addDecisionResponseAttributes(span: Span, response: unknown, recordOutputs: boolean): void;
8
+ //# sourceMappingURL=decisions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decisions.d.ts","sourceRoot":"","sources":["../../../../src/ai/google-genai/decisions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIzC;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAE5F;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI,CAqBzG"}
@@ -20,7 +20,7 @@ export declare function addPrivateRequestAttributes(span: Span, params: Record<s
20
20
  * Add response attributes from the Google GenAI response
21
21
  * @see https://github.com/googleapis/js-genai/blob/v1.19.0/src/types.ts#L2313
22
22
  */
23
- export declare function addResponseAttributes(span: Span, response: GoogleGenAIResponse, recordOutputs?: boolean): void;
23
+ export declare function addResponseAttributes(span: Span, response: GoogleGenAIResponse, recordOutputs?: boolean, operationName?: string): void;
24
24
  /**
25
25
  * Recover the config a chat message sends but does not carry in its own arguments.
26
26
  *
@@ -39,6 +39,8 @@ export declare function resolveChatParams(operationName: string, params: Record<
39
39
  * Reads the caller's `config.abortSignal` from params resolved by `resolveChatParams`.
40
40
  */
41
41
  export declare function getAbortSignal(params: Record<string, unknown> | undefined): AbortSignal | undefined;
42
+ /** `decisions.create` takes its abort signal in its request options, not in a `config`. */
43
+ export declare function getCallAbortSignal(operationName: string, params: Record<string, unknown> | undefined, requestOptions: unknown): AbortSignal | undefined;
42
44
  /**
43
45
  * Instrument a Google GenAI client with Sentry tracing
44
46
  * Can be used across Node.js, Cloudflare Workers, and Vercel Edge
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/google-genai/index.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AA+B7D,OAAO,KAAK,EAA0B,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAS/F;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAqBvF;AA8BD;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,MAAM,EACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,OAAO,CAAC,EAAE,OAAO,EACjB,YAAY,UAAO,GAClB,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CA4BpC;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CA6CpH;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,mBAAmB,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,IAAI,CA6D9G;A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,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwBzB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAoB7G;AAsGD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,CAAC,CAElG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/mistral/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAsB,MAAM,cAAc,CAAC;AAuB7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAa9C;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,OAAO,EAAE,EACf,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,OAAO,EACrB,SAAS,EAAE,OAAO,GACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwBzB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAoB7G;AA6GD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,CAAC,CAElG"}
@@ -19,6 +19,6 @@ export declare function isAsyncIterable(value: unknown): value is AsyncIterableS
19
19
  *
20
20
  * Returns `false` for a value that is not a stream, leaving it untouched.
21
21
  */
22
- export declare function instrumentEventStream(stream: unknown, span: Span, recordOutputs: boolean): boolean;
22
+ export declare function instrumentEventStream(stream: unknown, span: Span, recordOutputs: boolean, abortSignal?: AbortSignal): boolean;
23
23
  export {};
24
24
  //# sourceMappingURL=streaming.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../../../src/ai/mistral/streaming.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAwBzC,KAAK,mBAAmB,GAAG;IAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,MAAM,aAAa,CAAC,OAAO,CAAC,CAAA;CAAE,CAAC;AAepF,uDAAuD;AACvD,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAE5E;AAmLD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,GAAG,OAAO,CA4FlG"}
1
+ {"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../../../src/ai/mistral/streaming.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAuBzC,KAAK,mBAAmB,GAAG;IAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,MAAM,aAAa,CAAC,OAAO,CAAC,CAAA;CAAE,CAAC;AAepF,uDAAuD;AACvD,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAE5E;AAmLD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,OAAO,EACtB,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CA4FT"}
@@ -8,6 +8,11 @@ export declare function contentToString(content: unknown): string;
8
8
  * to keep the name low cardinality.
9
9
  */
10
10
  export declare function getSpanName(operationName: string, attributes: Record<string, unknown>): string;
11
+ /**
12
+ * Reads the caller's signal from Mistral's request options. The SDK spreads `options` over
13
+ * `options.fetchOptions`, so a top-level `signal` wins.
14
+ */
15
+ export declare function getMistralRequestSignal(requestOptions: unknown): AbortSignal | undefined;
11
16
  /**
12
17
  * Extract request parameters. Mistral request fields are camelCase.
13
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/mistral/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAsB,MAAM,cAAc,CAAC;AAqB7D;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAcxD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAQ9F;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYjG;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,IAAI,CA8DhG"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/mistral/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAsB,MAAM,cAAc,CAAC;AAqB7D;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAcxD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAQ9F;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAGxF;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYjG;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,IAAI,CA8DhG"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/vercel-ai/index.ts"],"names":[],"mappings":"AAUA;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,gBAAgB,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAoExG;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,aAKpC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/vercel-ai/index.ts"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,gBAAgB,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CA0ExG;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,aAKpC,CAAC"}
@@ -234,6 +234,9 @@ export interface ProviderMetadata {
234
234
  vertex?: GoogleGenerativeAIProviderMetadata;
235
235
  deepseek?: DeepSeekProviderMetadata;
236
236
  perplexity?: PerplexityProviderMetadata;
237
+ gateway?: {
238
+ cost?: string | number;
239
+ };
237
240
  }
238
241
  export {};
239
242
  //# sourceMappingURL=vercel-ai-attributes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vercel-ai-attributes.d.ts","sourceRoot":"","sources":["../../../../src/ai/vercel-ai/vercel-ai-attributes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,wBAAwB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ClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,KAAK,CAAC,EAAE,sBAAsB,CAAC;IAC/B,SAAS,CAAC,EAAE,yBAAyB,CAAC;IACtC,OAAO,CAAC,EAAE,6BAA6B,CAAC;IACxC,MAAM,CAAC,EAAE,kCAAkC,CAAC;IAC5C,MAAM,CAAC,EAAE,kCAAkC,CAAC;IAC5C,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IACpC,UAAU,CAAC,EAAE,0BAA0B,CAAC;CACzC"}
1
+ {"version":3,"file":"vercel-ai-attributes.d.ts","sourceRoot":"","sources":["../../../../src/ai/vercel-ai/vercel-ai-attributes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,UAAU,yBAAyB;IACjC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,KAAK,CAAC,EAAE;QACN,YAAY,EAAE,MAAM,CAAC;QACrB,2BAA2B,CAAC,EAAE,MAAM,CAAC;QACrC,uBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,cAAc,CAAC,EAAE;YACf,yBAAyB,CAAC,EAAE,MA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+1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/workers-ai/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAoGhD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,CAAC,CAiBpG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/workers-ai/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA2GhD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,CAAC,CAiBpG"}
@@ -5,5 +5,5 @@ import type { Span } from '@sentry/core';
5
5
  *
6
6
  * The span is ended once the consumer finishes reading (or cancels) the stream.
7
7
  */
8
- export declare function instrumentWorkersAiStream(stream: ReadableStream<Uint8Array>, span: Span, recordOutputs: boolean): ReadableStream<Uint8Array>;
8
+ export declare function instrumentWorkersAiStream(stream: ReadableStream<Uint8Array>, span: Span, recordOutputs: boolean, abortSignal?: AbortSignal): ReadableStream<Uint8Array>;
9
9
  //# sourceMappingURL=streaming.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../../../src/ai/workers-ai/streaming.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AA2JzC;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,EAClC,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,OAAO,GACrB,cAAc,CAAC,UAAU,CAAC,CAkF5B"}
1
+ {"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../../../src/ai/workers-ai/streaming.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AA2JzC;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,EAClC,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,OAAO,EACtB,WAAW,CAAC,EAAE,WAAW,GACxB,cAAc,CAAC,UAAU,CAAC,CAkF5B"}
@@ -23,10 +23,12 @@ export { dataloaderIntegration } from './integrations/dataloader';
23
23
  export { genericPoolIntegration } from './integrations/generic-pool';
24
24
  export { cronJobIntegration } from './integrations/cron';
25
25
  export type { CronJobIntegrationOptions } from './integrations/cron';
26
- export { nodeCronIntegration } from './integrations/node-cron';
26
+ export { isReadAlikeByNodeCron3 as _INTERNAL_isReadAlikeByNodeCron3, nodeCronIntegration, } from './integrations/node-cron';
27
27
  export type { NodeCronIntegrationOptions } from './integrations/node-cron';
28
28
  export { nodeScheduleIntegration } from './integrations/node-schedule';
29
29
  export type { NodeScheduleIntegrationOptions } from './integrations/node-schedule';
30
+ export { cronExpressionToMonitorConfig as _INTERNAL_cronExpressionToMonitorConfig } from './utils/cronMonitoring';
31
+ export type { CronDialect as _INTERNAL_CronDialect } from './utils/cronMonitoring';
30
32
  export { googleGenAIIntegration } from './integrations/google-genai';
31
33
  export { graphqlIntegration } from './integrations/graphql';
32
34
  export { hapiIntegration } from './integrations/hapi';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAG1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,IAAI,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAC3G,OAAO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G,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"cron.d.ts","sourceRoot":"","sources":["../../../src/integrations/cron.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAS,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAYrE,MAAM,WAAW,yBAAyB;IACxC,qEAAqE;IACrE,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACtC;AAaD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;CAAyC,CAAC;AAOzE,uGAAuG;AACvG,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,cAAc,GAAG,IAAI,CAY/E"}
1
+ {"version":3,"file":"cron.d.ts","sourceRoot":"","sources":["../../../src/integrations/cron.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAS,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAYrE,MAAM,WAAW,yBAAyB;IACxC,qEAAqE;IACrE,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACtC;AAaD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;CAAyC,CAAC;AAOzE,uGAAuG;AACvG,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,cAAc,GAAG,IAAI,CAc/E"}
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Diagnostics-channel-based Google GenAI integration. Subscribes to the
3
3
  * `orchestrion:@google/genai:*` diagnostics_channels injected into the SDK's `Models`
4
- * (`generateContent`/`generateContentStream`/`embedContent`) and `Chat`
5
- * (`sendMessage`/`sendMessageStream`) methods, so it requires the Sentry runtime hook or
6
- * bundler plugin.
4
+ * (`generateContent`/`generateContentStream`/`embedContent`), `Chat`
5
+ * (`sendMessage`/`sendMessageStream`) and decisions (`create`) methods, so it requires the Sentry
6
+ * runtime hook or bundler plugin.
7
7
  */
8
8
  export declare const googleGenAIIntegration: (options?: import("../ai/core/utils").GenAiOptions | undefined) => import("@sentry/core").Integration & {
9
9
  name: "Google_GenAI";
@@ -1 +1 @@
1
- {"version":3,"file":"google-genai.d.ts","sourceRoot":"","sources":["../../../src/integrations/google-genai.ts"],"names":[],"mappings":"AA0KA;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;CAA6C,CAAC"}
1
+ {"version":3,"file":"google-genai.d.ts","sourceRoot":"","sources":["../../../src/integrations/google-genai.ts"],"names":[],"mappings":"AA6KA;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;CAA6C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mistral.d.ts","sourceRoot":"","sources":["../../../src/integrations/mistral.ts"],"names":[],"mappings":"AA0FA;;GAEG;AACH,eAAO,MAAM,oBAAoB;;CAA2C,CAAC"}
1
+ {"version":3,"file":"mistral.d.ts","sourceRoot":"","sources":["../../../src/integrations/mistral.ts"],"names":[],"mappings":"AAmGA;;GAEG;AACH,eAAO,MAAM,oBAAoB;;CAA2C,CAAC"}
@@ -15,7 +15,7 @@ export declare const nodeCronIntegration: (options?: NodeCronIntegrationOptions
15
15
  export declare function getMonitorConfig(expression: string, timezone: unknown, isReadAlike?: (expression: string) => boolean): MonitorConfig | undefined;
16
16
  /**
17
17
  * node-cron before 4.6 reads `7` as `0` and swaps reversed ranges, so it runs `sat-sun`, `6-0` and `6-7` every day.
18
- * Returns `false` for weekday ranges that could hit that.
18
+ * It also reads a step without a range, like `5/10`, as its start. Returns `false` where that could differ.
19
19
  */
20
20
  export declare function isReadAlikeByNodeCron4(expression: string): boolean;
21
21
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"node-cron.d.ts","sourceRoot":"","sources":["../../../src/integrations/node-cron.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,aAAa,EAAE,MAAM,cAAc,CAAC;AAejE,MAAM,WAAW,0BAA0B;IACzC,sEAAsE;IACtE,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACtC;AAcD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;CAA0C,CAAC;AA2B3E,uHAAuH;AACvH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,OAAO,EACjB,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,GAC5C,aAAa,GAAG,SAAS,CAI3B;AAID;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAGlE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAalE"}
1
+ {"version":3,"file":"node-cron.d.ts","sourceRoot":"","sources":["../../../src/integrations/node-cron.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,aAAa,EAAE,MAAM,cAAc,CAAC;AAejE,MAAM,WAAW,0BAA0B;IACzC,sEAAsE;IACtE,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACtC;AAcD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;CAA0C,CAAC;AA2B3E,uHAAuH;AACvH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,OAAO,EACjB,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,GAC5C,aAAa,GAAG,SAAS,CAI3B;AAID;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAOlE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAalE"}
@@ -1 +1 @@
1
- {"version":3,"file":"node-schedule.d.ts","sourceRoot":"","sources":["../../../src/integrations/node-schedule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,aAAa,EAAE,MAAM,cAAc,CAAC;AAKjE,OAAO,KAAK,EAAS,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAWrE,MAAM,WAAW,8BAA8B;IAC7C,qEAAqE;IACrE,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACtC;AAaD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;CAA8C,CAAC;AAoBnF,iHAAiH;AACjH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,8BAA8B,GAAG,IAAI,CAapG;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAMvD;AAED,qGAAqG;AACrG,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAQnD;AAWD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAMzE"}
1
+ {"version":3,"file":"node-schedule.d.ts","sourceRoot":"","sources":["../../../src/integrations/node-schedule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,aAAa,EAAE,MAAM,cAAc,CAAC;AAKjE,OAAO,KAAK,EAAS,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAWrE,MAAM,WAAW,8BAA8B;IAC7C,qEAAqE;IACrE,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACtC;AAaD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;CAA8C,CAAC;AAoBnF,iHAAiH;AACjH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,8BAA8B,GAAG,IAAI,CAapG;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAMvD;AAED,qGAAqG;AACrG,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAQnD;AAWD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAQzE"}
@@ -1 +1 @@
1
- {"version":3,"file":"vercel-ai-dc-subscriber.d.ts","sourceRoot":"","sources":["../../../../src/integrations/vercel-ai/vercel-ai-dc-subscriber.ts"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAezD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,OAAO,EAA+B,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIrF,OAAO,EAAwC,KAAK,uBAAuB,EAA2B,MAAM,QAAQ,CAAC;AAErH;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,iBAAiB,CAAC;AAgE/D,2GAA2G;AAC3G,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,sBAAsB,GAAG,IAAI,CAQnE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAKzD;AA0FD,sEAAsE;AACtE,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,YAAY,GACZ,cAAc,GACd,gBAAgB,GAChB,MAAM,GACN,mBAAmB,GACnB,aAAa,GACb,OAAO,GACP,WAAW,GACX,QAAQ,GACR,uBAAuB,GACvB,qBAAqB,CAAC;AAE1B;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;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B,GACrC,IAAI,GAAG,SAAS,CA8FlB;AAyHD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,sBAAsB,EAC5B,cAAc,EAAE,sBAAsB,GACrC,IAAI,CAyEN;AAoJD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CA0B/F"}
@@ -1 +1 @@
1
- {"version":3,"file":"moduleInjectedTransform.d.ts","sourceRoot":"","sources":["../../../../src/orchestrion/bundler/moduleInjectedTransform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA4BnD;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC,oIACqF,CAAC;AAuEpI,MAAM,WAAW,+BAA+B;IAC9C,iFAAiF;IACjF,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CAKtC,eAAe,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,EACrD,EAAE,mBAAwB,EAAE,GAAE,+BAAoC,GACjE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAyDjC"}
1
+ {"version":3,"file":"moduleInjectedTransform.d.ts","sourceRoot":"","sources":["../../../../src/orchestrion/bundler/moduleInjectedTransform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA6BnD;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC,oIACqF,CAAC;AAyEpI,MAAM,WAAW,+BAA+B;IAC9C,iFAAiF;IACjF,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CAKtC,eAAe,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,EACrD,EAAE,mBAAwB,EAAE,GAAE,+BAAoC,GACjE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAyDjC"}
@@ -13,12 +13,12 @@ export interface CommonJSInteropOptions {
13
13
  * `@rollup/plugin-commonjs` options for builds that bundle CommonJS packages while their
14
14
  * dependencies stay external. Builtin `require()`s unwrap to the module (a namespace breaks
15
15
  * direct calls) and convert inside `try` blocks (a bare `require` throws in ESM output).
16
- * Externals keep `'auto'`, which {@link sentryCommonJSInteropPlugin} fixes for Node >= 23.
16
+ * Externals keep `'auto'`, which {@link sentryCommonJSInteropPlugin} fixes for Node >= 23, Deno and Bun.
17
17
  */
18
18
  export declare function commonJSInteropOptions(): CommonJSInteropOptions;
19
19
  /**
20
- * Fixes `@rollup/plugin-commonjs`' `'auto'` interop for Node >= 23 by patching the broken
21
- * namespace check in its helpers module. The patch applies only while the exact broken
20
+ * Fixes `@rollup/plugin-commonjs`' `'auto'` interop for Node >= 23, Deno and Bun by patching the
21
+ * broken namespace check in its helpers module. The patch applies only while the exact broken
22
22
  * expression exists, so it retires itself once the plugin is fixed upstream.
23
23
  */
24
24
  export declare function sentryCommonJSInteropPlugin(): Plugin;
@@ -1 +1 @@
1
- {"version":3,"file":"rollup.d.ts","sourceRoot":"","sources":["../../../../src/orchestrion/bundler/rollup.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIV,MAAM,EAGP,MAAM,QAAQ,CAAC;AAEhB,YAAY,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAoB/C;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,qBAAqB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,CAAC;IACpF,cAAc,EAAE,CAAC,EAAE,EA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