@sentry/junior 0.165.0 → 0.166.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 (68) hide show
  1. package/dist/{agent-hooks-GSNL33UA.js → agent-hooks-ZIPK2HUF.js} +9 -9
  2. package/dist/api/schema/workspace.d.ts +2 -0
  3. package/dist/api/schema.js +1 -1
  4. package/dist/api.js +40 -47
  5. package/dist/app.js +62 -63
  6. package/dist/{catalog-runtime-4ERDVI7V.js → catalog-runtime-GEZAHBUP.js} +5 -5
  7. package/dist/chat/pi/transcript.d.ts +10 -10
  8. package/dist/chat/sandbox/snapshot/resolve.d.ts +4 -0
  9. package/dist/chat/services/conversation-memory.d.ts +7 -0
  10. package/dist/chat/workspaces/store.d.ts +10 -1
  11. package/dist/chat/workspaces/types.d.ts +8 -0
  12. package/dist/{chunk-EA4UL5H2.js → chunk-22RO7IDD.js} +40 -11
  13. package/dist/{chunk-NPW6LM2X.js → chunk-2KV4BAAN.js} +12 -12
  14. package/dist/{chunk-SA5FVUWJ.js → chunk-2ZKFLHVP.js} +6 -6
  15. package/dist/{chunk-AQEBOQUC.js → chunk-3EZ5V7XQ.js} +9 -9
  16. package/dist/{chunk-T6BAHCT6.js → chunk-43KLUCAM.js} +17 -17
  17. package/dist/{chunk-BEC542E6.js → chunk-4CMORAHL.js} +2 -1
  18. package/dist/chunk-4DARCEZH.js +274 -0
  19. package/dist/{chunk-HZDLOFO4.js → chunk-4MDEQNSW.js} +5 -5
  20. package/dist/{chunk-IZHR2OES.js → chunk-65SNO3WK.js} +13 -2
  21. package/dist/{chunk-3V2EIQLT.js → chunk-ABNRESX6.js} +1 -1
  22. package/dist/{chunk-FMOFCEAA.js → chunk-AEKBVJMV.js} +2 -2
  23. package/dist/{chunk-5T6WPPEI.js → chunk-BKP3PVKR.js} +1 -1
  24. package/dist/{chunk-6RZ6MMEK.js → chunk-C3USHSIJ.js} +1 -1
  25. package/dist/{chunk-DKO4RRGJ.js → chunk-CDBTQQQ4.js} +1 -1
  26. package/dist/{chunk-VDNNVTX2.js → chunk-DTQAMME2.js} +5 -5
  27. package/dist/{chunk-65B3PDY7.js → chunk-EKBVHDZO.js} +1 -1
  28. package/dist/{chunk-7J26TW64.js → chunk-FEYQVP64.js} +5 -5
  29. package/dist/{chunk-XOINKFDJ.js → chunk-FFE3BMAT.js} +7 -7
  30. package/dist/{chunk-RQQTOF3H.js → chunk-JDTCQDRU.js} +3 -3
  31. package/dist/{chunk-32CCG4WP.js → chunk-JUFZR2LD.js} +1 -1
  32. package/dist/{chunk-ZUKU2Y3J.js → chunk-KQ5YZGDV.js} +1 -1
  33. package/dist/{chunk-G72LBEMZ.js → chunk-LGSGPWYH.js} +1 -1
  34. package/dist/{chunk-TCWPG5VL.js → chunk-MDW5YPXW.js} +2 -2
  35. package/dist/{chunk-AEBF6AO2.js → chunk-OCOGPNHA.js} +1 -1
  36. package/dist/{chunk-FXX4NHOM.js → chunk-OYN45QUQ.js} +6 -6
  37. package/dist/{chunk-N2BRRIQZ.js → chunk-P6UQMGM2.js} +1 -1
  38. package/dist/{chunk-BEHPIDVZ.js → chunk-Q2IPCX7J.js} +45 -283
  39. package/dist/{chunk-HPWZ4BJJ.js → chunk-SLWGX3G5.js} +72 -68
  40. package/dist/{chunk-FNNQCHOL.js → chunk-U2UCDSDF.js} +4 -4
  41. package/dist/{chunk-7S2JVUWS.js → chunk-VNPG55CU.js} +1 -1
  42. package/dist/{chunk-5WDDWMQ7.js → chunk-WX42YNDQ.js} +64 -7
  43. package/dist/{chunk-6OWVPXNO.js → chunk-YTIKGCPC.js} +1 -1
  44. package/dist/{chunk-6YXCG2XL.js → chunk-ZKJO4K6M.js} +4 -4
  45. package/dist/cli/chat.js +30 -29
  46. package/dist/cli/check.js +6 -6
  47. package/dist/cli/plugins.js +12 -12
  48. package/dist/cli/snapshot-create.js +12 -10
  49. package/dist/cli/upgrade.js +7 -7
  50. package/dist/db/schema/workspaces.d.ts +68 -0
  51. package/dist/db/schema.d.ts +68 -0
  52. package/dist/{db-5TTEPMTY.js → db-TGZBS2CP.js} +7 -7
  53. package/dist/instrumentation.js +4 -4
  54. package/dist/nitro.js +2 -2
  55. package/dist/{oauth-callback-server-IVFC5YHY.js → oauth-callback-server-Z54WUF5H.js} +22 -22
  56. package/dist/{runner-G76TSHWO.js → runner-PVFHKKK6.js} +12 -12
  57. package/dist/{skills-F6PSLVSG.js → skills-BYRH3QWD.js} +6 -6
  58. package/dist/spawn-RIPWK7EP.js +37 -0
  59. package/dist/{validation-56EJI6UQ.js → validation-VZIE4RHA.js} +6 -6
  60. package/dist/version.js +1 -1
  61. package/dist/{work-RNRQCP3Y.js → work-JTHAOPDQ.js} +17 -17
  62. package/dist/worker-APEVP56Y.js +24 -0
  63. package/migrations/0031_wild_phantom_reporter.sql +4 -0
  64. package/migrations/meta/0031_snapshot.json +2823 -0
  65. package/migrations/meta/_journal.json +7 -0
  66. package/package.json +5 -5
  67. package/dist/spawn-WMJPIAZL.js +0 -37
  68. package/dist/worker-FBR2WUI4.js +0 -24
@@ -0,0 +1,274 @@
1
+ import {
2
+ SANDBOX_WORKSPACE_ROOT,
3
+ runNonInteractiveCommand
4
+ } from "./chunk-BVREIWBD.js";
5
+ import {
6
+ pluginCatalogRuntime
7
+ } from "./chunk-VNPG55CU.js";
8
+
9
+ // src/chat/sandbox/snapshot/profile.ts
10
+ import { createHash } from "crypto";
11
+
12
+ // src/chat/sandbox/docker.ts
13
+ var DOCKER_DAEMON_JSON = `{
14
+ "storage-driver": "overlay2",
15
+ "live-restore": false
16
+ }
17
+ `;
18
+ var DOCKER_ENSURE_SCRIPT = `#!/bin/sh
19
+ set -eu
20
+
21
+ if [ "$(id -u)" -ne 0 ]; then
22
+ exec sudo -n "$0" "$@"
23
+ fi
24
+
25
+ SOCK=/var/run/docker.sock
26
+ PIDFILE=/var/run/docker.pid
27
+ LOG=/var/log/junior-dockerd.log
28
+
29
+ is_ready() {
30
+ [ -S "$SOCK" ] && /usr/bin/docker info >/dev/null 2>&1
31
+ }
32
+
33
+ if is_ready; then
34
+ chmod 666 "$SOCK" 2>/dev/null || true
35
+ exit 0
36
+ fi
37
+
38
+ mkdir -p /etc/docker /var/lib/docker /var/run /var/log
39
+ if [ ! -f /etc/docker/daemon.json ]; then
40
+ cat > /etc/docker/daemon.json <<'EOF'
41
+ {
42
+ "storage-driver": "overlay2",
43
+ "live-restore": false
44
+ }
45
+ EOF
46
+ fi
47
+
48
+ if [ -f "$PIDFILE" ]; then
49
+ oldpid="$(cat "$PIDFILE" 2>/dev/null || true)"
50
+ if [ -n "\${oldpid:-}" ] && ! kill -0 "$oldpid" 2>/dev/null; then
51
+ rm -f "$PIDFILE"
52
+ fi
53
+ fi
54
+
55
+ if [ ! -f "$PIDFILE" ] || ! kill -0 "$(cat "$PIDFILE" 2>/dev/null)" 2>/dev/null; then
56
+ # dockerd must outlive this helper; nohup + background is intentional.
57
+ nohup dockerd --host="unix://$SOCK" --pidfile="$PIDFILE" >"$LOG" 2>&1 &
58
+ fi
59
+
60
+ i=0
61
+ while [ "$i" -lt 50 ]; do
62
+ if is_ready; then
63
+ chmod 666 "$SOCK" 2>/dev/null || true
64
+ exit 0
65
+ fi
66
+ i=$((i + 1))
67
+ sleep 0.1
68
+ done
69
+
70
+ echo "junior-ensure-docker: dockerd failed to become ready" >&2
71
+ if [ -f "$LOG" ]; then
72
+ tail -n 50 "$LOG" >&2 || true
73
+ fi
74
+ exit 1
75
+ `;
76
+ var DOCKER_CLI_WRAPPER_SCRIPT = `#!/bin/sh
77
+ set -eu
78
+ if command -v junior-ensure-docker >/dev/null 2>&1; then
79
+ junior-ensure-docker
80
+ fi
81
+ exec /usr/bin/docker "$@"
82
+ `;
83
+ var DOCKER_COMPOSE_CLI_WRAPPER_SCRIPT = `#!/bin/sh
84
+ set -eu
85
+ if command -v junior-ensure-docker >/dev/null 2>&1; then
86
+ junior-ensure-docker
87
+ fi
88
+ exec /usr/local/libexec/junior-docker-compose "$@"
89
+ `;
90
+ async function ensureDockerDaemon(sandbox, signal) {
91
+ await runNonInteractiveCommand(sandbox, {
92
+ cmd: "sh",
93
+ args: [
94
+ "-c",
95
+ "command -v junior-ensure-docker >/dev/null 2>&1 && junior-ensure-docker || true"
96
+ ],
97
+ signal
98
+ });
99
+ }
100
+
101
+ // src/chat/sandbox/runtime-dependencies.ts
102
+ var GLOBAL_RUNTIME_DEPENDENCIES = [
103
+ { type: "system", package: "docker" },
104
+ { type: "system", package: "spal-release" },
105
+ { type: "system", package: "ripgrep" }
106
+ ];
107
+ function writeFileCommand(path, contents, mode = "0644") {
108
+ const payload = Buffer.from(contents, "utf8").toString("base64");
109
+ return [
110
+ `printf '%s' '${payload}' | base64 -d > ${path}`,
111
+ `chmod ${mode} ${path}`
112
+ ].join("\n");
113
+ }
114
+ function writeExecutableCommand(path, contents) {
115
+ return writeFileCommand(path, contents, "0755");
116
+ }
117
+ var GLOBAL_RUNTIME_POSTINSTALL = [
118
+ {
119
+ cmd: "sh",
120
+ args: [
121
+ "-c",
122
+ [
123
+ "set -eu",
124
+ 'case "$(uname -m)" in',
125
+ ' x86_64) asset="x86_64"; sha256="7af95166a730b87e172d4fc9aefea8725d3c6c7327d59149267b452114ddb7d4" ;;',
126
+ ' aarch64) asset="aarch64"; sha256="49082844b87f03cdcd5f5bbef1ba8c9c897b7a2dfb80cea18d61ec8ca6117e0c" ;;',
127
+ ' *) echo "unsupported Docker Compose architecture: $(uname -m)" >&2; exit 1 ;;',
128
+ "esac",
129
+ 'tmp="$(mktemp)"',
130
+ `trap 'rm -f "$tmp"' EXIT`,
131
+ 'curl --fail --location --silent --show-error "https://github.com/docker/compose/releases/download/v2.39.4/docker-compose-linux-${asset}" --output "$tmp"',
132
+ 'echo "${sha256} ${tmp}" | sha256sum --check --status',
133
+ // Keep the real Compose binary off PATH; the wrapper below starts dockerd.
134
+ 'install -D -m 0755 "$tmp" /usr/local/libexec/junior-docker-compose',
135
+ "mkdir -p /usr/local/lib/docker/cli-plugins /usr/local/libexec /etc/docker /usr/local/bin",
136
+ `mkdir -p ${SANDBOX_WORKSPACE_ROOT}/.junior/bin`,
137
+ writeFileCommand("/etc/docker/daemon.json", DOCKER_DAEMON_JSON),
138
+ writeExecutableCommand(
139
+ "/usr/local/bin/junior-ensure-docker",
140
+ DOCKER_ENSURE_SCRIPT
141
+ ),
142
+ // docker compose plugin delegates to the real Compose binary.
143
+ "ln -sfn /usr/local/libexec/junior-docker-compose /usr/local/lib/docker/cli-plugins/docker-compose",
144
+ // PATH wrappers auto-start dockerd for both CLI entrypoints.
145
+ writeExecutableCommand(
146
+ "/usr/local/bin/docker-compose",
147
+ DOCKER_COMPOSE_CLI_WRAPPER_SCRIPT
148
+ ),
149
+ writeExecutableCommand(
150
+ `${SANDBOX_WORKSPACE_ROOT}/.junior/bin/docker`,
151
+ DOCKER_CLI_WRAPPER_SCRIPT
152
+ ),
153
+ writeExecutableCommand(
154
+ `${SANDBOX_WORKSPACE_ROOT}/.junior/bin/docker-compose`,
155
+ DOCKER_COMPOSE_CLI_WRAPPER_SCRIPT
156
+ ),
157
+ // Prefer the wrapper over /usr/bin/docker for non-login shells too.
158
+ writeExecutableCommand(
159
+ "/usr/local/bin/docker",
160
+ DOCKER_CLI_WRAPPER_SCRIPT
161
+ )
162
+ ].join("\n")
163
+ ],
164
+ sudo: true
165
+ }
166
+ ];
167
+
168
+ // src/chat/sandbox/snapshot/profile.ts
169
+ var VERSION = 1;
170
+ var DEFAULT_FLOATING_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1e3;
171
+ function isExactNpmVersion(version) {
172
+ return /^\d+\.\d+\.\d+(?:[-+][a-z0-9.]+)?$/i.test(version.trim());
173
+ }
174
+ function isFloating(dep) {
175
+ return dep.type === "npm" && !isExactNpmVersion(dep.version);
176
+ }
177
+ function mergeDependencies(dependencies) {
178
+ const seen = /* @__PURE__ */ new Set();
179
+ const npmVersions = /* @__PURE__ */ new Map();
180
+ const merged = [];
181
+ for (const dependency of dependencies) {
182
+ 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}`;
183
+ if (seen.has(key)) {
184
+ continue;
185
+ }
186
+ seen.add(key);
187
+ if (dependency.type === "npm") {
188
+ const version = npmVersions.get(dependency.package);
189
+ if (version !== void 0 && version !== dependency.version) {
190
+ throw new Error(
191
+ `Conflicting runtime dependency versions for ${dependency.package}: ${version} and ${dependency.version}`
192
+ );
193
+ }
194
+ npmVersions.set(dependency.package, dependency.version);
195
+ }
196
+ merged.push(dependency);
197
+ }
198
+ return merged;
199
+ }
200
+ function floatingMaxAgeMs() {
201
+ const raw = process.env.SANDBOX_SNAPSHOT_FLOATING_MAX_AGE_MS;
202
+ if (!raw?.trim()) {
203
+ return DEFAULT_FLOATING_MAX_AGE_MS;
204
+ }
205
+ const parsed = Number.parseInt(raw, 10);
206
+ return Number.isFinite(parsed) && parsed >= 0 ? parsed : DEFAULT_FLOATING_MAX_AGE_MS;
207
+ }
208
+ function compareCodePoints(left, right) {
209
+ if (left < right) return -1;
210
+ if (left > right) return 1;
211
+ return 0;
212
+ }
213
+ function workspaceRecipe(workspace) {
214
+ const repos = [...workspace.repos].map(({ provider, repo }) => ({
215
+ provider,
216
+ repo
217
+ })).sort((left, right) => {
218
+ const provider = compareCodePoints(left.provider, right.provider);
219
+ if (provider !== 0) return provider;
220
+ return compareCodePoints(left.repo, right.repo);
221
+ });
222
+ return {
223
+ id: workspace.id,
224
+ repos,
225
+ setupScript: workspace.setupScript
226
+ };
227
+ }
228
+ function create(runtime, workspace) {
229
+ const dependencies = mergeDependencies([
230
+ ...GLOBAL_RUNTIME_DEPENDENCIES,
231
+ ...pluginCatalogRuntime.getRuntimeDependencies()
232
+ ]);
233
+ const pluginPostinstall = pluginCatalogRuntime.getRuntimePostinstall();
234
+ const postinstall = [...GLOBAL_RUNTIME_POSTINSTALL, ...pluginPostinstall];
235
+ if (dependencies.length === 0 && postinstall.length === 0 && !workspace) {
236
+ return null;
237
+ }
238
+ const rebuildEpoch = process.env.SANDBOX_SNAPSHOT_REBUILD_EPOCH?.trim() ?? "";
239
+ const floating = dependencies.some((dependency) => isFloating(dependency)) || pluginPostinstall.length > 0 || Boolean(workspace);
240
+ const hash2 = createHash("sha256").update(
241
+ JSON.stringify({
242
+ version: VERSION,
243
+ runtime,
244
+ rebuildEpoch,
245
+ dependencies,
246
+ postinstall,
247
+ ...workspace ? { workspace: workspaceRecipe(workspace) } : {}
248
+ })
249
+ ).digest("hex");
250
+ return {
251
+ hash: hash2,
252
+ dependencyCount: dependencies.length,
253
+ floating,
254
+ dependencies,
255
+ postinstall
256
+ };
257
+ }
258
+ function hash(runtime, workspace) {
259
+ return create(runtime, workspace)?.hash;
260
+ }
261
+ function isStale(profile, createdAtMs) {
262
+ if (!profile.floating) {
263
+ return false;
264
+ }
265
+ const maxAgeMs = floatingMaxAgeMs();
266
+ return maxAgeMs === 0 || Date.now() - createdAtMs > maxAgeMs;
267
+ }
268
+
269
+ export {
270
+ ensureDockerDaemon,
271
+ create,
272
+ hash,
273
+ isStale
274
+ };
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  ToolInputError
3
- } from "./chunk-EA4UL5H2.js";
3
+ } from "./chunk-22RO7IDD.js";
4
4
  import {
5
5
  canRouteResourceEvents,
6
6
  getPlugins
7
- } from "./chunk-5WDDWMQ7.js";
7
+ } from "./chunk-WX42YNDQ.js";
8
8
  import {
9
9
  getDb
10
- } from "./chunk-RQQTOF3H.js";
10
+ } from "./chunk-JDTCQDRU.js";
11
11
  import {
12
12
  juniorAttachments,
13
13
  juniorConversations,
@@ -15,13 +15,13 @@ import {
15
15
  juniorSchedulerRuns,
16
16
  juniorSchedulerTasks,
17
17
  juniorStats
18
- } from "./chunk-IZHR2OES.js";
18
+ } from "./chunk-65SNO3WK.js";
19
19
  import {
20
20
  juniorDestinations
21
21
  } from "./chunk-VFUK3X5B.js";
22
22
  import {
23
23
  logInfo
24
- } from "./chunk-32CCG4WP.js";
24
+ } from "./chunk-JUFZR2LD.js";
25
25
 
26
26
  // src/chat/sandbox/snapshot/runtime.ts
27
27
  var SANDBOX_RUNTIME = "node22";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SQL_STATEMENT_TIMEOUT_MS
3
- } from "./chunk-FMOFCEAA.js";
3
+ } from "./chunk-AEKBVJMV.js";
4
4
  import {
5
5
  juniorDestinations,
6
6
  timestamptz
@@ -646,13 +646,24 @@ var juniorSchedulerRuns = pgTable16(
646
646
  );
647
647
 
648
648
  // src/db/schema/workspaces.ts
649
- import { pgTable as pgTable17, primaryKey as primaryKey9, text as text17, uniqueIndex as uniqueIndex7 } from "drizzle-orm/pg-core";
649
+ import {
650
+ integer as integer6,
651
+ pgTable as pgTable17,
652
+ primaryKey as primaryKey9,
653
+ text as text17,
654
+ uniqueIndex as uniqueIndex7
655
+ } from "drizzle-orm/pg-core";
650
656
  var juniorWorkspaces = pgTable17(
651
657
  "junior_workspaces",
652
658
  {
653
659
  id: text17("id").primaryKey(),
654
660
  name: text17("name").notNull(),
655
661
  setupScript: text17("setup_script").notNull().default(""),
662
+ // Last successful Workspace snapshot for the dashboard. Resolve still uses Redis.
663
+ snapshotId: text17("snapshot_id"),
664
+ snapshotGeneratedAt: timestamptz("snapshot_generated_at"),
665
+ snapshotBuildDurationMs: integer6("snapshot_build_duration_ms"),
666
+ snapshotProfileHash: text17("snapshot_profile_hash"),
656
667
  createdAt: timestamptz("created_at").notNull(),
657
668
  updatedAt: timestamptz("updated_at").notNull()
658
669
  },
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-V7YE4WCP.js";
6
6
  import {
7
7
  toOptionalString
8
- } from "./chunk-32CCG4WP.js";
8
+ } from "./chunk-JUFZR2LD.js";
9
9
 
10
10
  // src/chat/slack/context.ts
11
11
  import { z } from "zod";
@@ -3,7 +3,7 @@ import {
3
3
  toCanonicalInputMessage,
4
4
  toCanonicalOutputMessage,
5
5
  toGenAiMessagesTraceAttributes
6
- } from "./chunk-ZUKU2Y3J.js";
6
+ } from "./chunk-KQ5YZGDV.js";
7
7
  import {
8
8
  extractGenAiUsageAttributes,
9
9
  logException,
@@ -11,7 +11,7 @@ import {
11
11
  normalizeGenAiFinishReason,
12
12
  serializeGenAiAttribute,
13
13
  withSpan
14
- } from "./chunk-32CCG4WP.js";
14
+ } from "./chunk-JUFZR2LD.js";
15
15
 
16
16
  // src/chat/services/provider-error.ts
17
17
  var ProviderError = class extends Error {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  JUNIOR_VERSION
3
- } from "./chunk-6OWVPXNO.js";
3
+ } from "./chunk-YTIKGCPC.js";
4
4
 
5
5
  // src/deployment.ts
6
6
  var JUNIOR_HEARTBEAT_ROUTE = "/api/internal/heartbeat";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createAndEnqueueAgentInvocation
3
- } from "./chunk-SA5FVUWJ.js";
3
+ } from "./chunk-2ZKFLHVP.js";
4
4
  import {
5
5
  actorFromRun,
6
6
  toolInvocationDestination
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FUNCTION_TIMEOUT_BUFFER_SECONDS,
3
3
  getChatConfig
4
- } from "./chunk-FMOFCEAA.js";
4
+ } from "./chunk-AEKBVJMV.js";
5
5
 
6
6
  // src/chat/runtime/request-deadline.ts
7
7
  import { AsyncLocalStorage } from "async_hooks";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  persistConversationMessages
3
- } from "./chunk-EA4UL5H2.js";
3
+ } from "./chunk-22RO7IDD.js";
4
4
  import {
5
5
  JUNIOR_THREAD_STATE_TTL_MS
6
6
  } from "./chunk-3Y47VMHV.js";
7
7
  import {
8
8
  getDb
9
- } from "./chunk-RQQTOF3H.js";
9
+ } from "./chunk-JDTCQDRU.js";
10
10
  import {
11
11
  juniorLocationConfigurations
12
- } from "./chunk-IZHR2OES.js";
12
+ } from "./chunk-65SNO3WK.js";
13
13
  import {
14
14
  getStateAdapter
15
- } from "./chunk-65B3PDY7.js";
15
+ } from "./chunk-EKBVHDZO.js";
16
16
  import {
17
17
  juniorDestinations
18
18
  } from "./chunk-VFUK3X5B.js";
@@ -20,7 +20,7 @@ import {
20
20
  isRecord,
21
21
  toOptionalNumber,
22
22
  toOptionalString
23
- } from "./chunk-32CCG4WP.js";
23
+ } from "./chunk-JUFZR2LD.js";
24
24
 
25
25
  // src/chat/conversations/turn-lifecycle.ts
26
26
  var ConversationTurnLifecycleService = class {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getChatConfig
3
- } from "./chunk-FMOFCEAA.js";
3
+ } from "./chunk-AEKBVJMV.js";
4
4
 
5
5
  // src/chat/state/adapter.ts
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  formatProviderLabel,
6
6
  startOAuthFlow
7
- } from "./chunk-FXX4NHOM.js";
7
+ } from "./chunk-OYN45QUQ.js";
8
8
  import {
9
9
  parseSandboxEgressAuthRequiredSignal
10
10
  } from "./chunk-7MA4HV4W.js";
@@ -12,16 +12,16 @@ import {
12
12
  abandonReplacedPendingAuth,
13
13
  canReusePendingAuthLink,
14
14
  recordAuthorizationRequested
15
- } from "./chunk-EA4UL5H2.js";
15
+ } from "./chunk-22RO7IDD.js";
16
16
  import {
17
17
  AGENT_INVOCATION_MAILBOX_STATUSES
18
- } from "./chunk-IZHR2OES.js";
18
+ } from "./chunk-65SNO3WK.js";
19
19
  import {
20
20
  TURN_REASONING_LEVELS
21
- } from "./chunk-FMOFCEAA.js";
21
+ } from "./chunk-AEKBVJMV.js";
22
22
  import {
23
23
  pluginCatalogRuntime
24
- } from "./chunk-7S2JVUWS.js";
24
+ } from "./chunk-VNPG55CU.js";
25
25
  import {
26
26
  credentialContextSchema
27
27
  } from "./chunk-BDUENQD3.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RF6J3DIO.js";
4
4
  import {
5
5
  resolveBaseUrl
6
- } from "./chunk-FXX4NHOM.js";
6
+ } from "./chunk-OYN45QUQ.js";
7
7
  import {
8
8
  isExperimentalFeatureEnabled
9
9
  } from "./chunk-VRS6WDK5.js";
@@ -12,27 +12,27 @@ import {
12
12
  getPlugins,
13
13
  getSlackClient,
14
14
  withSlackRetries
15
- } from "./chunk-5WDDWMQ7.js";
15
+ } from "./chunk-WX42YNDQ.js";
16
16
  import {
17
17
  getDb,
18
18
  parseDestination
19
- } from "./chunk-RQQTOF3H.js";
19
+ } from "./chunk-JDTCQDRU.js";
20
20
  import {
21
21
  sleep
22
22
  } from "./chunk-BVREIWBD.js";
23
23
  import {
24
24
  acquireActiveLock,
25
25
  getStateAdapter
26
- } from "./chunk-65B3PDY7.js";
26
+ } from "./chunk-EKBVHDZO.js";
27
27
  import {
28
28
  pluginCatalogRuntime
29
- } from "./chunk-7S2JVUWS.js";
29
+ } from "./chunk-VNPG55CU.js";
30
30
  import {
31
31
  fetchWithBoundedOAuthErrorBodies
32
- } from "./chunk-N2BRRIQZ.js";
32
+ } from "./chunk-P6UQMGM2.js";
33
33
  import {
34
34
  isRecord
35
- } from "./chunk-32CCG4WP.js";
35
+ } from "./chunk-JUFZR2LD.js";
36
36
 
37
37
  // src/chat/capabilities/router.ts
38
38
  var ProviderCredentialRouter = class {
@@ -7,12 +7,12 @@ import {
7
7
  juniorConversations,
8
8
  juniorIdentities,
9
9
  juniorUsers
10
- } from "./chunk-IZHR2OES.js";
10
+ } from "./chunk-65SNO3WK.js";
11
11
  import {
12
12
  TURN_REASONING_LEVELS,
13
13
  getChatConfig,
14
14
  modelProfileSchema
15
- } from "./chunk-FMOFCEAA.js";
15
+ } from "./chunk-AEKBVJMV.js";
16
16
  import {
17
17
  juniorDestinations
18
18
  } from "./chunk-VFUK3X5B.js";
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-V7YE4WCP.js";
24
24
  import {
25
25
  normalizeIdentityEmail
26
- } from "./chunk-32CCG4WP.js";
26
+ } from "./chunk-JUFZR2LD.js";
27
27
 
28
28
  // src/chat/conversations/sql/store.ts
29
29
  import { randomUUID as randomUUID2 } from "crypto";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-6GWA276C.js";
10
10
  import {
11
11
  getDeploymentTelemetryAttributes
12
- } from "./chunk-5T6WPPEI.js";
12
+ } from "./chunk-BKP3PVKR.js";
13
13
 
14
14
  // src/chat/logging.ts
15
15
  import path from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logWarn
3
- } from "./chunk-32CCG4WP.js";
3
+ } from "./chunk-JUFZR2LD.js";
4
4
 
5
5
  // src/chat/conversation-privacy.ts
6
6
  import { AsyncLocalStorage } from "async_hooks";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-7S2JVUWS.js";
3
+ } from "./chunk-VNPG55CU.js";
4
4
 
5
5
  // src/chat/plugins/validation.ts
6
6
  import { isDeepStrictEqual } from "util";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-7S2JVUWS.js";
3
+ } from "./chunk-VNPG55CU.js";
4
4
  import {
5
5
  logWarn
6
- } from "./chunk-32CCG4WP.js";
6
+ } from "./chunk-JUFZR2LD.js";
7
7
  import {
8
8
  skillRoots
9
9
  } from "./chunk-H4HBKISO.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getStateAdapter
3
- } from "./chunk-65B3PDY7.js";
3
+ } from "./chunk-EKBVHDZO.js";
4
4
  import {
5
5
  getClient
6
6
  } from "./chunk-6GWA276C.js";
@@ -5,19 +5,19 @@ import {
5
5
  isDmChannel,
6
6
  normalizeSlackConversationId,
7
7
  withSlackRetries
8
- } from "./chunk-5WDDWMQ7.js";
8
+ } from "./chunk-WX42YNDQ.js";
9
9
  import {
10
10
  parseDestination
11
- } from "./chunk-RQQTOF3H.js";
11
+ } from "./chunk-JDTCQDRU.js";
12
12
  import {
13
13
  getStateAdapter
14
- } from "./chunk-65B3PDY7.js";
14
+ } from "./chunk-EKBVHDZO.js";
15
15
  import {
16
16
  normalizeSlackEmojiName
17
- } from "./chunk-FMOFCEAA.js";
17
+ } from "./chunk-AEKBVJMV.js";
18
18
  import {
19
19
  pluginCatalogRuntime
20
- } from "./chunk-7S2JVUWS.js";
20
+ } from "./chunk-VNPG55CU.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-32CCG4WP.js";
29
+ } from "./chunk-JUFZR2LD.js";
30
30
 
31
31
  // src/chat/slack/outbound.ts
32
32
  var MAX_SLACK_MESSAGE_TEXT_CHARS = 4e4;
@@ -5,7 +5,7 @@ import {
5
5
  logInfo,
6
6
  logWarn,
7
7
  setSpanAttributes
8
- } from "./chunk-32CCG4WP.js";
8
+ } from "./chunk-JUFZR2LD.js";
9
9
  import {
10
10
  discoverInstalledPluginPackageContent,
11
11
  normalizePluginPackageNames