@sentry/junior 0.170.0 → 0.171.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 (65) hide show
  1. package/dist/{agent-hooks-IPUNCZPZ.js → agent-hooks-UXIRPATC.js} +15 -10
  2. package/dist/api.js +31 -30
  3. package/dist/app.js +32 -32
  4. package/dist/{catalog-runtime-E6XHWRPG.js → catalog-runtime-PQCGQUXA.js} +5 -5
  5. package/dist/chat/sandbox/snapshot/store.d.ts +28 -0
  6. package/dist/chat/workspaces/store.d.ts +1 -10
  7. package/dist/chat/workspaces/types.d.ts +14 -1
  8. package/dist/{chunk-B53NR3XY.js → chunk-2AYWP7PZ.js} +6 -270
  9. package/dist/{chunk-3SFZJVX5.js → chunk-3AX2WCFV.js} +2 -2
  10. package/dist/{chunk-T4SEUU7A.js → chunk-4TKPTFSO.js} +1 -1
  11. package/dist/{chunk-6W2UIZSA.js → chunk-5GF7HQOP.js} +70 -11
  12. package/dist/{chunk-KQCHIOME.js → chunk-5ML752HJ.js} +8 -8
  13. package/dist/{chunk-UD4BNNM2.js → chunk-5TZ2DKVU.js} +1 -1
  14. package/dist/{chunk-F3I6YFB4.js → chunk-62WK6FLT.js} +182 -68
  15. package/dist/{chunk-5EPG7PYS.js → chunk-6RRTVWAD.js} +1 -1
  16. package/dist/{chunk-YWX7D7BJ.js → chunk-AOAOBZJQ.js} +17 -17
  17. package/dist/chunk-CVHKLS7B.js +399 -0
  18. package/dist/{chunk-6GOKKLWF.js → chunk-CWTWZKWH.js} +6 -6
  19. package/dist/{chunk-NGL4XFT2.js → chunk-FI5A2RF6.js} +1 -1
  20. package/dist/{chunk-IX7VHMIJ.js → chunk-HKWEMKK4.js} +3 -3
  21. package/dist/{chunk-UHW5RAIB.js → chunk-HWXXFINO.js} +12 -12
  22. package/dist/{chunk-2XI6OLXA.js → chunk-IZSMYLCS.js} +9 -9
  23. package/dist/{chunk-47GJ7QRO.js → chunk-JNYIJHFF.js} +1 -1
  24. package/dist/{chunk-A22DGDXT.js → chunk-KUYIW4BD.js} +1 -1
  25. package/dist/{chunk-NFERKIUX.js → chunk-M5QJJMFK.js} +4 -4
  26. package/dist/{chunk-NESGW5HV.js → chunk-MFFU45QO.js} +1 -1
  27. package/dist/{chunk-TX553KXA.js → chunk-O2SUZKWU.js} +5 -5
  28. package/dist/{chunk-IF3OK4XO.js → chunk-POF7HORW.js} +6 -6
  29. package/dist/{chunk-FKOLWEMX.js → chunk-QHBHUCDS.js} +5 -5
  30. package/dist/{chunk-6E4WQV75.js → chunk-SIOO3CCL.js} +1 -1
  31. package/dist/{chunk-E7HKIHI5.js → chunk-UC35XHGT.js} +2 -2
  32. package/dist/{chunk-CA6JIB7S.js → chunk-UTG3IY2C.js} +21 -21
  33. package/dist/{chunk-IJTFG6AK.js → chunk-VGWC4KG2.js} +5 -9
  34. package/dist/{chunk-BW644E3V.js → chunk-WCWPRFHZ.js} +1 -1
  35. package/dist/{chunk-HZALSYOW.js → chunk-WIUGVE66.js} +5 -5
  36. package/dist/{chunk-4PSUCN4P.js → chunk-XHBYNJNZ.js} +1 -1
  37. package/dist/{chunk-7TVGQZOH.js → chunk-Y5RRKS67.js} +4 -4
  38. package/dist/{chunk-F4UM52UH.js → chunk-Y6DW6AVG.js} +1 -1
  39. package/dist/{chunk-74XMBKRI.js → chunk-YURMXTZF.js} +1 -1
  40. package/dist/cli/chat.js +30 -30
  41. package/dist/cli/check.js +6 -6
  42. package/dist/cli/plugins.js +13 -13
  43. package/dist/cli/snapshot-create.js +12 -11
  44. package/dist/cli/upgrade.js +7 -7
  45. package/dist/db/schema/snapshots.d.ts +254 -0
  46. package/dist/db/schema/workspaces.d.ts +0 -68
  47. package/dist/db/schema.d.ts +251 -69
  48. package/dist/{db-WMSEGSFM.js → db-EHCO5WGL.js} +7 -7
  49. package/dist/instrumentation.js +4 -4
  50. package/dist/nitro.js +2 -2
  51. package/dist/{oauth-callback-server-GBS47NTO.js → oauth-callback-server-O7CH6FOJ.js} +23 -23
  52. package/dist/{runner-V2A2Z7K3.js → runner-3D5AGGUD.js} +17 -13
  53. package/dist/{skills-Z35YXLUG.js → skills-6IW3DDW2.js} +6 -6
  54. package/dist/spawn-5LKOLABU.js +37 -0
  55. package/dist/{validation-EQCK4DA5.js → validation-RCLP4EU4.js} +6 -6
  56. package/dist/version.js +1 -1
  57. package/dist/{work-XIANCABO.js → work-L54N7O65.js} +18 -18
  58. package/dist/worker-VJCSXI5L.js +24 -0
  59. package/migrations/0032_workspace_snapshots_table.sql +69 -0
  60. package/migrations/meta/0032_snapshot.json +2892 -0
  61. package/migrations/meta/_journal.json +8 -1
  62. package/package.json +5 -5
  63. package/dist/chunk-BVREIWBD.js +0 -131
  64. package/dist/spawn-AKPJBUS2.js +0 -37
  65. package/dist/worker-YALLEN2Z.js +0 -24
@@ -0,0 +1,399 @@
1
+ import {
2
+ pluginCatalogRuntime
3
+ } from "./chunk-SIOO3CCL.js";
4
+
5
+ // src/chat/sandbox/paths.ts
6
+ function normalizeWorkspaceRoot(input) {
7
+ const candidate = (input ?? "").trim();
8
+ if (!candidate) {
9
+ return "/vercel/sandbox";
10
+ }
11
+ const normalized = candidate.replace(/\/+$/, "");
12
+ return normalized.startsWith("/") ? normalized : `/${normalized}`;
13
+ }
14
+ var SANDBOX_WORKSPACE_ROOT = normalizeWorkspaceRoot(
15
+ process.env.VERCEL_SANDBOX_WORKSPACE_DIR
16
+ );
17
+ var SANDBOX_REPOS_ROOT = `${SANDBOX_WORKSPACE_ROOT}/repos`;
18
+ var SANDBOX_SKILLS_ROOT = `${SANDBOX_WORKSPACE_ROOT}/skills`;
19
+ var SANDBOX_DATA_ROOT = `${SANDBOX_WORKSPACE_ROOT}/data`;
20
+ function sandboxSkillDir(skillName) {
21
+ return `${SANDBOX_SKILLS_ROOT}/${skillName}`;
22
+ }
23
+ function sandboxSkillFile(skillName) {
24
+ return `${sandboxSkillDir(skillName)}/SKILL.md`;
25
+ }
26
+ function sandboxSkillPathResolution(skillName) {
27
+ const skillDir = sandboxSkillDir(skillName);
28
+ return `Resolve relative paths in this skill against ${skillDir}. For bash commands from this skill, cd to ${skillDir} first or use absolute paths.`;
29
+ }
30
+
31
+ // src/chat/sandbox/noninteractive-command.ts
32
+ var NON_INTERACTIVE_ENV = {
33
+ CI: "1",
34
+ TERM: "dumb",
35
+ NO_COLOR: "1",
36
+ PAGER: "cat",
37
+ GIT_PAGER: "cat",
38
+ GH_PROMPT_DISABLED: "1",
39
+ GH_NO_UPDATE_NOTIFIER: "1",
40
+ GH_NO_EXTENSION_UPDATE_NOTIFIER: "1",
41
+ GH_SPINNER_DISABLED: "1",
42
+ GIT_TERMINAL_PROMPT: "0",
43
+ GCM_INTERACTIVE: "never",
44
+ DEBIAN_FRONTEND: "noninteractive",
45
+ // Git credential isolation: prevent git from sending its own auth so the
46
+ // sandbox egress proxy's header transforms are the sole credential source.
47
+ GIT_ASKPASS: "/bin/true",
48
+ GIT_CONFIG_NOSYSTEM: "1",
49
+ GIT_CONFIG_COUNT: "2",
50
+ GIT_CONFIG_KEY_0: "credential.helper",
51
+ GIT_CONFIG_VALUE_0: "",
52
+ GIT_CONFIG_KEY_1: "http.emptyAuth",
53
+ GIT_CONFIG_VALUE_1: "true"
54
+ };
55
+ function shellQuote(value) {
56
+ return `'${value.replace(/'/g, "'\\''")}'`;
57
+ }
58
+ function buildEnvExports(options) {
59
+ const lines = [];
60
+ if (options.pathPrefix) {
61
+ lines.push(`export PATH="${options.pathPrefix}"`);
62
+ }
63
+ for (const [key, value] of Object.entries(NON_INTERACTIVE_ENV)) {
64
+ lines.push(`export ${key}=${shellQuote(value)}`);
65
+ }
66
+ for (const [key, value] of Object.entries(options.env ?? {})) {
67
+ lines.push(`export ${key}=${shellQuote(value)}`);
68
+ }
69
+ return lines;
70
+ }
71
+ function buildCommandScript(input) {
72
+ return [shellQuote(input.cmd), ...(input.args ?? []).map(shellQuote)].join(
73
+ " "
74
+ );
75
+ }
76
+ function buildNonInteractiveShellScript(script, options = {}) {
77
+ return [...buildEnvExports(options), "exec </dev/null", script].join(" && ");
78
+ }
79
+ function buildNonInteractiveCommand(input) {
80
+ return {
81
+ cmd: "bash",
82
+ args: [
83
+ input.login ? "-lc" : "-c",
84
+ buildNonInteractiveShellScript(buildCommandScript(input), {
85
+ env: input.env,
86
+ pathPrefix: input.pathPrefix
87
+ })
88
+ ]
89
+ };
90
+ }
91
+ async function runNonInteractiveCommand(sandbox, input) {
92
+ const command = {
93
+ ...buildNonInteractiveCommand(input),
94
+ ...input.cwd ? { cwd: input.cwd } : {},
95
+ ...input.signal ? { signal: input.signal } : {},
96
+ ...input.sudo !== void 0 ? { sudo: input.sudo } : {}
97
+ };
98
+ return await sandbox.runCommand(command);
99
+ }
100
+
101
+ // src/chat/sandbox/snapshot/profile.ts
102
+ import { createHash } from "crypto";
103
+
104
+ // src/chat/sandbox/docker.ts
105
+ var DOCKER_DAEMON_JSON = `{
106
+ "storage-driver": "overlay2",
107
+ "live-restore": false
108
+ }
109
+ `;
110
+ var DOCKER_ENSURE_SCRIPT = `#!/bin/sh
111
+ set -eu
112
+
113
+ if [ "$(id -u)" -ne 0 ]; then
114
+ exec sudo -n "$0" "$@"
115
+ fi
116
+
117
+ SOCK=/var/run/docker.sock
118
+ PIDFILE=/var/run/docker.pid
119
+ LOG=/var/log/junior-dockerd.log
120
+
121
+ is_ready() {
122
+ [ -S "$SOCK" ] && /usr/bin/docker info >/dev/null 2>&1
123
+ }
124
+
125
+ if is_ready; then
126
+ chmod 666 "$SOCK" 2>/dev/null || true
127
+ exit 0
128
+ fi
129
+
130
+ mkdir -p /etc/docker /var/lib/docker /var/run /var/log
131
+ if [ ! -f /etc/docker/daemon.json ]; then
132
+ cat > /etc/docker/daemon.json <<'EOF'
133
+ {
134
+ "storage-driver": "overlay2",
135
+ "live-restore": false
136
+ }
137
+ EOF
138
+ fi
139
+
140
+ if [ -f "$PIDFILE" ]; then
141
+ oldpid="$(cat "$PIDFILE" 2>/dev/null || true)"
142
+ if [ -n "\${oldpid:-}" ] && ! kill -0 "$oldpid" 2>/dev/null; then
143
+ rm -f "$PIDFILE"
144
+ fi
145
+ fi
146
+
147
+ if [ ! -f "$PIDFILE" ] || ! kill -0 "$(cat "$PIDFILE" 2>/dev/null)" 2>/dev/null; then
148
+ # dockerd must outlive this helper; nohup + background is intentional.
149
+ nohup dockerd --host="unix://$SOCK" --pidfile="$PIDFILE" >"$LOG" 2>&1 &
150
+ fi
151
+
152
+ i=0
153
+ while [ "$i" -lt 50 ]; do
154
+ if is_ready; then
155
+ chmod 666 "$SOCK" 2>/dev/null || true
156
+ exit 0
157
+ fi
158
+ i=$((i + 1))
159
+ sleep 0.1
160
+ done
161
+
162
+ echo "junior-ensure-docker: dockerd failed to become ready" >&2
163
+ if [ -f "$LOG" ]; then
164
+ tail -n 50 "$LOG" >&2 || true
165
+ fi
166
+ exit 1
167
+ `;
168
+ var DOCKER_CLI_WRAPPER_SCRIPT = `#!/bin/sh
169
+ set -eu
170
+ if command -v junior-ensure-docker >/dev/null 2>&1; then
171
+ junior-ensure-docker
172
+ fi
173
+ exec /usr/bin/docker "$@"
174
+ `;
175
+ var DOCKER_COMPOSE_CLI_WRAPPER_SCRIPT = `#!/bin/sh
176
+ set -eu
177
+ if command -v junior-ensure-docker >/dev/null 2>&1; then
178
+ junior-ensure-docker
179
+ fi
180
+ exec /usr/local/libexec/junior-docker-compose "$@"
181
+ `;
182
+ async function ensureDockerDaemon(sandbox, signal) {
183
+ await runNonInteractiveCommand(sandbox, {
184
+ cmd: "sh",
185
+ args: [
186
+ "-c",
187
+ "command -v junior-ensure-docker >/dev/null 2>&1 && junior-ensure-docker || true"
188
+ ],
189
+ signal
190
+ });
191
+ }
192
+
193
+ // src/chat/sandbox/runtime-dependencies.ts
194
+ var GLOBAL_RUNTIME_DEPENDENCIES = [
195
+ { type: "system", package: "docker" },
196
+ { type: "system", package: "spal-release" },
197
+ { type: "system", package: "ripgrep" }
198
+ ];
199
+ function writeFileCommand(path, contents, mode = "0644") {
200
+ const payload = Buffer.from(contents, "utf8").toString("base64");
201
+ return [
202
+ `printf '%s' '${payload}' | base64 -d > ${path}`,
203
+ `chmod ${mode} ${path}`
204
+ ].join("\n");
205
+ }
206
+ function writeExecutableCommand(path, contents) {
207
+ return writeFileCommand(path, contents, "0755");
208
+ }
209
+ var GLOBAL_RUNTIME_POSTINSTALL = [
210
+ {
211
+ cmd: "sh",
212
+ args: [
213
+ "-c",
214
+ [
215
+ "set -eu",
216
+ 'case "$(uname -m)" in',
217
+ ' x86_64) asset="x86_64"; sha256="7af95166a730b87e172d4fc9aefea8725d3c6c7327d59149267b452114ddb7d4" ;;',
218
+ ' aarch64) asset="aarch64"; sha256="49082844b87f03cdcd5f5bbef1ba8c9c897b7a2dfb80cea18d61ec8ca6117e0c" ;;',
219
+ ' *) echo "unsupported Docker Compose architecture: $(uname -m)" >&2; exit 1 ;;',
220
+ "esac",
221
+ 'tmp="$(mktemp)"',
222
+ `trap 'rm -f "$tmp"' EXIT`,
223
+ 'curl --fail --location --silent --show-error "https://github.com/docker/compose/releases/download/v2.39.4/docker-compose-linux-${asset}" --output "$tmp"',
224
+ 'echo "${sha256} ${tmp}" | sha256sum --check --status',
225
+ // Keep the real Compose binary off PATH; the wrapper below starts dockerd.
226
+ 'install -D -m 0755 "$tmp" /usr/local/libexec/junior-docker-compose',
227
+ "mkdir -p /usr/local/lib/docker/cli-plugins /usr/local/libexec /etc/docker /usr/local/bin",
228
+ `mkdir -p ${SANDBOX_WORKSPACE_ROOT}/.junior/bin`,
229
+ writeFileCommand("/etc/docker/daemon.json", DOCKER_DAEMON_JSON),
230
+ writeExecutableCommand(
231
+ "/usr/local/bin/junior-ensure-docker",
232
+ DOCKER_ENSURE_SCRIPT
233
+ ),
234
+ // docker compose plugin delegates to the real Compose binary.
235
+ "ln -sfn /usr/local/libexec/junior-docker-compose /usr/local/lib/docker/cli-plugins/docker-compose",
236
+ // PATH wrappers auto-start dockerd for both CLI entrypoints.
237
+ writeExecutableCommand(
238
+ "/usr/local/bin/docker-compose",
239
+ DOCKER_COMPOSE_CLI_WRAPPER_SCRIPT
240
+ ),
241
+ writeExecutableCommand(
242
+ `${SANDBOX_WORKSPACE_ROOT}/.junior/bin/docker`,
243
+ DOCKER_CLI_WRAPPER_SCRIPT
244
+ ),
245
+ writeExecutableCommand(
246
+ `${SANDBOX_WORKSPACE_ROOT}/.junior/bin/docker-compose`,
247
+ DOCKER_COMPOSE_CLI_WRAPPER_SCRIPT
248
+ ),
249
+ // Prefer the wrapper over /usr/bin/docker for non-login shells too.
250
+ writeExecutableCommand(
251
+ "/usr/local/bin/docker",
252
+ DOCKER_CLI_WRAPPER_SCRIPT
253
+ )
254
+ ].join("\n")
255
+ ],
256
+ sudo: true
257
+ }
258
+ ];
259
+
260
+ // src/chat/sandbox/snapshot/profile.ts
261
+ var VERSION = 1;
262
+ var DEFAULT_FLOATING_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1e3;
263
+ function isExactNpmVersion(version) {
264
+ return /^\d+\.\d+\.\d+(?:[-+][a-z0-9.]+)?$/i.test(version.trim());
265
+ }
266
+ function isFloating(dep) {
267
+ return dep.type === "npm" && !isExactNpmVersion(dep.version);
268
+ }
269
+ function mergeDependencies(dependencies) {
270
+ const seen = /* @__PURE__ */ new Set();
271
+ const npmVersions = /* @__PURE__ */ new Map();
272
+ const merged = [];
273
+ for (const dependency of dependencies) {
274
+ const key = dependency.type === "npm" ? `${dependency.type}:${dependency.package}:${dependency.version}` : "package" in dependency ? `${dependency.type}:package:${dependency.package}` : `${dependency.type}:url:${dependency.url}:${dependency.sha256}`;
275
+ if (seen.has(key)) {
276
+ continue;
277
+ }
278
+ seen.add(key);
279
+ if (dependency.type === "npm") {
280
+ const version = npmVersions.get(dependency.package);
281
+ if (version !== void 0 && version !== dependency.version) {
282
+ throw new Error(
283
+ `Conflicting runtime dependency versions for ${dependency.package}: ${version} and ${dependency.version}`
284
+ );
285
+ }
286
+ npmVersions.set(dependency.package, dependency.version);
287
+ }
288
+ merged.push(dependency);
289
+ }
290
+ return merged;
291
+ }
292
+ function floatingMaxAgeMs() {
293
+ const raw = process.env.SANDBOX_SNAPSHOT_FLOATING_MAX_AGE_MS;
294
+ if (!raw?.trim()) {
295
+ return DEFAULT_FLOATING_MAX_AGE_MS;
296
+ }
297
+ const parsed = Number.parseInt(raw, 10);
298
+ return Number.isFinite(parsed) && parsed >= 0 ? parsed : DEFAULT_FLOATING_MAX_AGE_MS;
299
+ }
300
+ function compareCodePoints(left, right) {
301
+ if (left < right) return -1;
302
+ if (left > right) return 1;
303
+ return 0;
304
+ }
305
+ function workspaceRecipe(workspace) {
306
+ const repos = [...workspace.repos].map(({ provider, repo }) => ({
307
+ provider,
308
+ repo
309
+ })).sort((left, right) => {
310
+ const provider = compareCodePoints(left.provider, right.provider);
311
+ if (provider !== 0) return provider;
312
+ return compareCodePoints(left.repo, right.repo);
313
+ });
314
+ return {
315
+ id: workspace.id,
316
+ repos,
317
+ setupScript: workspace.setupScript
318
+ };
319
+ }
320
+ function create(runtime, workspace) {
321
+ const dependencies = mergeDependencies([
322
+ ...GLOBAL_RUNTIME_DEPENDENCIES,
323
+ ...pluginCatalogRuntime.getRuntimeDependencies()
324
+ ]);
325
+ const pluginPostinstall = pluginCatalogRuntime.getRuntimePostinstall();
326
+ const postinstall = [...GLOBAL_RUNTIME_POSTINSTALL, ...pluginPostinstall];
327
+ if (dependencies.length === 0 && postinstall.length === 0 && !workspace) {
328
+ return null;
329
+ }
330
+ const rebuildEpoch = process.env.SANDBOX_SNAPSHOT_REBUILD_EPOCH?.trim() ?? "";
331
+ const floating = dependencies.some((dependency) => isFloating(dependency)) || pluginPostinstall.length > 0 || Boolean(workspace);
332
+ const hash2 = createHash("sha256").update(
333
+ JSON.stringify({
334
+ version: VERSION,
335
+ runtime,
336
+ rebuildEpoch,
337
+ dependencies,
338
+ postinstall,
339
+ ...workspace ? { workspace: workspaceRecipe(workspace) } : {}
340
+ })
341
+ ).digest("hex");
342
+ return {
343
+ hash: hash2,
344
+ dependencyCount: dependencies.length,
345
+ floating,
346
+ dependencies,
347
+ postinstall
348
+ };
349
+ }
350
+ function hash(runtime, workspace) {
351
+ return create(runtime, workspace)?.hash;
352
+ }
353
+ function isStale(profile, createdAtMs) {
354
+ if (!profile.floating) {
355
+ return false;
356
+ }
357
+ const maxAgeMs = floatingMaxAgeMs();
358
+ return maxAgeMs === 0 || Date.now() - createdAtMs > maxAgeMs;
359
+ }
360
+
361
+ // src/chat/sleep.ts
362
+ function sleep(ms, signal) {
363
+ if (!signal) {
364
+ return new Promise((resolve) => setTimeout(resolve, ms));
365
+ }
366
+ return new Promise((resolve, reject) => {
367
+ if (signal.aborted) {
368
+ reject(signal.reason);
369
+ return;
370
+ }
371
+ const timeoutId = setTimeout(() => {
372
+ signal.removeEventListener("abort", onAbort);
373
+ resolve();
374
+ }, ms);
375
+ const onAbort = () => {
376
+ clearTimeout(timeoutId);
377
+ reject(signal.reason);
378
+ };
379
+ signal.addEventListener("abort", onAbort, { once: true });
380
+ });
381
+ }
382
+
383
+ export {
384
+ SANDBOX_WORKSPACE_ROOT,
385
+ SANDBOX_REPOS_ROOT,
386
+ SANDBOX_SKILLS_ROOT,
387
+ SANDBOX_DATA_ROOT,
388
+ sandboxSkillDir,
389
+ sandboxSkillFile,
390
+ sandboxSkillPathResolution,
391
+ sleep,
392
+ buildCommandScript,
393
+ buildNonInteractiveShellScript,
394
+ runNonInteractiveCommand,
395
+ ensureDockerDaemon,
396
+ create,
397
+ hash,
398
+ isStale
399
+ };
@@ -5,19 +5,19 @@ import {
5
5
  isDmChannel,
6
6
  normalizeSlackConversationId,
7
7
  withSlackRetries
8
- } from "./chunk-F3I6YFB4.js";
8
+ } from "./chunk-62WK6FLT.js";
9
9
  import {
10
10
  parseDestination
11
- } from "./chunk-IX7VHMIJ.js";
11
+ } from "./chunk-HKWEMKK4.js";
12
12
  import {
13
13
  getStateAdapter
14
- } from "./chunk-74XMBKRI.js";
14
+ } from "./chunk-YURMXTZF.js";
15
15
  import {
16
16
  normalizeSlackEmojiName
17
- } from "./chunk-E7HKIHI5.js";
17
+ } from "./chunk-UC35XHGT.js";
18
18
  import {
19
19
  pluginCatalogRuntime
20
- } from "./chunk-6E4WQV75.js";
20
+ } from "./chunk-SIOO3CCL.js";
21
21
  import {
22
22
  parseSlackMessageTs,
23
23
  parseSlackUserId
@@ -26,7 +26,7 @@ import {
26
26
  isRecord,
27
27
  logInfo,
28
28
  logWarn
29
- } from "./chunk-5EPG7PYS.js";
29
+ } from "./chunk-6RRTVWAD.js";
30
30
 
31
31
  // src/chat/slack/outbound.ts
32
32
  var MAX_SLACK_MESSAGE_TEXT_CHARS = 4e4;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logWarn
3
- } from "./chunk-5EPG7PYS.js";
3
+ } from "./chunk-6RRTVWAD.js";
4
4
 
5
5
  // src/chat/conversation-privacy.ts
6
6
  import { AsyncLocalStorage } from "async_hooks";
@@ -7,12 +7,12 @@ import {
7
7
  juniorConversations,
8
8
  juniorIdentities,
9
9
  juniorUsers
10
- } from "./chunk-6W2UIZSA.js";
10
+ } from "./chunk-5GF7HQOP.js";
11
11
  import {
12
12
  TURN_REASONING_LEVELS,
13
13
  getChatConfig,
14
14
  modelProfileSchema
15
- } from "./chunk-E7HKIHI5.js";
15
+ } from "./chunk-UC35XHGT.js";
16
16
  import {
17
17
  juniorDestinations
18
18
  } from "./chunk-VFUK3X5B.js";
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-M63DETLL.js";
24
24
  import {
25
25
  normalizeIdentityEmail
26
- } from "./chunk-5EPG7PYS.js";
26
+ } from "./chunk-6RRTVWAD.js";
27
27
 
28
28
  // src/chat/conversations/sql/store.ts
29
29
  import { randomUUID as randomUUID2 } from "crypto";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createWebAuthorization,
3
3
  deleteWebAuthorization
4
- } from "./chunk-NESGW5HV.js";
4
+ } from "./chunk-MFFU45QO.js";
5
5
  import {
6
6
  appendAndEnqueueInboundMessage
7
- } from "./chunk-7TVGQZOH.js";
7
+ } from "./chunk-Y5RRKS67.js";
8
8
  import {
9
9
  buildDeliveredTurnStatePatch,
10
10
  completeAuthPauseTurn,
@@ -12,20 +12,20 @@ import {
12
12
  getTurnUserMessage,
13
13
  processPluginTask,
14
14
  scheduleSessionCompletedPluginTasks
15
- } from "./chunk-2XI6OLXA.js";
15
+ } from "./chunk-IZSMYLCS.js";
16
16
  import {
17
17
  ConversationTurnLifecycleService,
18
18
  coerceThreadConversationState,
19
19
  getPersistedSandboxState,
20
20
  getPersistedThreadState,
21
21
  persistThreadStateById
22
- } from "./chunk-TX553KXA.js";
22
+ } from "./chunk-O2SUZKWU.js";
23
23
  import {
24
24
  healthReportSchema
25
25
  } from "./chunk-UTL3MHPC.js";
26
26
  import {
27
27
  parseSlackThreadId
28
- } from "./chunk-4PSUCN4P.js";
28
+ } from "./chunk-XHBYNJNZ.js";
29
29
  import {
30
30
  TurnInputCommitLostError,
31
31
  abandonTurnRecord,
@@ -49,31 +49,31 @@ import {
49
49
  saveTurnCheckpoint,
50
50
  startActiveTurn,
51
51
  upsertConversationMessage
52
- } from "./chunk-HZALSYOW.js";
52
+ } from "./chunk-WIUGVE66.js";
53
53
  import {
54
54
  normalizeSlackConversationId
55
- } from "./chunk-F3I6YFB4.js";
55
+ } from "./chunk-62WK6FLT.js";
56
56
  import {
57
57
  getConversationEventStore,
58
58
  getConversationStore,
59
59
  getDb
60
- } from "./chunk-IX7VHMIJ.js";
60
+ } from "./chunk-HKWEMKK4.js";
61
61
  import {
62
62
  juniorApiTokens,
63
63
  juniorConversationParticipants,
64
64
  juniorConversations,
65
65
  juniorIdentities,
66
66
  juniorUsers
67
- } from "./chunk-6W2UIZSA.js";
67
+ } from "./chunk-5GF7HQOP.js";
68
68
  import {
69
69
  getSlackBotToken
70
- } from "./chunk-E7HKIHI5.js";
70
+ } from "./chunk-UC35XHGT.js";
71
71
  import {
72
72
  juniorDestinations
73
73
  } from "./chunk-VFUK3X5B.js";
74
74
  import {
75
75
  canExposeConversationPayload
76
- } from "./chunk-NGL4XFT2.js";
76
+ } from "./chunk-FI5A2RF6.js";
77
77
  import {
78
78
  credentialContextForActor
79
79
  } from "./chunk-CGA4ERJ5.js";
@@ -82,7 +82,7 @@ import {
82
82
  logWarn,
83
83
  setTags,
84
84
  withLogContext
85
- } from "./chunk-5EPG7PYS.js";
85
+ } from "./chunk-6RRTVWAD.js";
86
86
 
87
87
  // src/handlers/health.ts
88
88
  function readHealthReport() {
@@ -2,7 +2,7 @@ import {
2
2
  coerceThreadConversationState,
3
3
  getPersistedThreadState,
4
4
  persistThreadStateById
5
- } from "./chunk-TX553KXA.js";
5
+ } from "./chunk-O2SUZKWU.js";
6
6
  import {
7
7
  pluginTaskId,
8
8
  pluginTaskParamsSchema,
@@ -22,7 +22,7 @@ import {
22
22
  markTurnCompleted,
23
23
  normalizeToolNameFromResult,
24
24
  stripRuntimeTurnContext
25
- } from "./chunk-HZALSYOW.js";
25
+ } from "./chunk-WIUGVE66.js";
26
26
  import {
27
27
  JUNIOR_THREAD_STATE_TTL_MS
28
28
  } from "./chunk-3Y47VMHV.js";
@@ -33,25 +33,25 @@ import {
33
33
  createPluginModel,
34
34
  createPluginState,
35
35
  getPlugins
36
- } from "./chunk-F3I6YFB4.js";
36
+ } from "./chunk-62WK6FLT.js";
37
37
  import {
38
38
  getConversationStore,
39
39
  getDb,
40
40
  sameActorIdentity
41
- } from "./chunk-IX7VHMIJ.js";
41
+ } from "./chunk-HKWEMKK4.js";
42
42
  import {
43
43
  juniorConversations,
44
44
  juniorTaskExecutions
45
- } from "./chunk-6W2UIZSA.js";
45
+ } from "./chunk-5GF7HQOP.js";
46
46
  import {
47
47
  getStateAdapter
48
- } from "./chunk-74XMBKRI.js";
48
+ } from "./chunk-YURMXTZF.js";
49
49
  import {
50
50
  ProviderError,
51
51
  findProviderError,
52
52
  getProviderErrorAttributes,
53
53
  getProviderErrorUserMessage
54
- } from "./chunk-E7HKIHI5.js";
54
+ } from "./chunk-UC35XHGT.js";
55
55
  import {
56
56
  credentialSubjectSchema
57
57
  } from "./chunk-CGA4ERJ5.js";
@@ -61,7 +61,7 @@ import {
61
61
  import {
62
62
  buildTurnFailureResponse,
63
63
  logWarn
64
- } from "./chunk-5EPG7PYS.js";
64
+ } from "./chunk-6RRTVWAD.js";
65
65
 
66
66
  // src/chat/runtime/delivered-turn-state.ts
67
67
  function buildDeliveredTurnStatePatch(args) {
@@ -87,7 +87,7 @@ import { pluginRunContextSchema } from "@sentry/junior-plugin-api";
87
87
 
88
88
  // src/chat/services/turn-session-routing.ts
89
89
  async function resolveTurnSessionRouting(args) {
90
- const conversationStore = args.conversationStore ?? (await import("./db-WMSEGSFM.js")).getConversationStore();
90
+ const conversationStore = args.conversationStore ?? (await import("./db-EHCO5WGL.js")).getConversationStore();
91
91
  const conversation = await conversationStore.get({
92
92
  conversationId: args.conversationId
93
93
  });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-6E4WQV75.js";
3
+ } from "./chunk-SIOO3CCL.js";
4
4
 
5
5
  // src/chat/plugins/validation.ts
6
6
  import { isDeepStrictEqual } from "util";
@@ -5,7 +5,7 @@ import {
5
5
  logInfo,
6
6
  logWarn,
7
7
  setSpanAttributes
8
- } from "./chunk-5EPG7PYS.js";
8
+ } from "./chunk-6RRTVWAD.js";
9
9
  import {
10
10
  discoverInstalledPluginPackageContent,
11
11
  normalizePluginPackageNames
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTurnRequestDeadline
3
- } from "./chunk-T4SEUU7A.js";
3
+ } from "./chunk-4TKPTFSO.js";
4
4
  import {
5
5
  CONVERSATION_WORK_CHECK_IN_INTERVAL_MS,
6
6
  CONVERSATION_WORK_MAX_RETRIES,
@@ -21,20 +21,20 @@ import {
21
21
  releaseConversationWork,
22
22
  requestAnotherSlice,
23
23
  startConversationWork
24
- } from "./chunk-7TVGQZOH.js";
24
+ } from "./chunk-Y5RRKS67.js";
25
25
  import {
26
26
  ConversationQueueMessageRejectedError
27
27
  } from "./chunk-JAL3CH4G.js";
28
28
  import {
29
29
  getChatConfig,
30
30
  isProviderRetryError
31
- } from "./chunk-E7HKIHI5.js";
31
+ } from "./chunk-UC35XHGT.js";
32
32
  import {
33
33
  logException,
34
34
  logInfo,
35
35
  logWarn,
36
36
  withLogContext
37
- } from "./chunk-5EPG7PYS.js";
37
+ } from "./chunk-6RRTVWAD.js";
38
38
 
39
39
  // src/chat/task-execution/worker.ts
40
40
  var CONVERSATION_WORK_DEFER_DELAY_MS = 15e3;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getStateAdapter
3
- } from "./chunk-74XMBKRI.js";
3
+ } from "./chunk-YURMXTZF.js";
4
4
  import {
5
5
  getClient
6
6
  } from "./chunk-6GWA276C.js";