@sentry/junior 0.223.0 → 0.225.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 (57) hide show
  1. package/dist/{agent-hooks-DZU5nsd1.js → agent-hooks-CRuRcOg9.js} +9 -9
  2. package/dist/{agent-Bzbf92vv.js → agent-runner-Cad1RtWn.js} +1016 -144
  3. package/dist/api/schema.js +2 -2
  4. package/dist/api.js +16 -16
  5. package/dist/app.js +1538 -71
  6. package/dist/{briefs-BJPfCrlT.js → briefs-BtnkPWT5.js} +5 -5
  7. package/dist/{catalog-runtime-BthunUDD.js → catalog-runtime-pv4grNNb.js} +1 -1
  8. package/dist/{checkpoint-Deu-OVb3.js → checkpoint-6fkAdB3g.js} +8 -8
  9. package/dist/cli/chat.js +14 -15
  10. package/dist/cli/check.js +3 -3
  11. package/dist/cli/main.js +1 -1
  12. package/dist/cli/plugins.js +3 -3
  13. package/dist/cli/snapshot-create.js +3 -3
  14. package/dist/cli/upgrade.js +3 -3
  15. package/dist/{client-DjC6-6iU.js → client-ihmkx60d.js} +2 -2
  16. package/dist/{config-CtoUVs72.js → config-DMg679BW.js} +11 -13
  17. package/dist/{conversation-1HUoZr2l.js → conversation-Bygi39Xj.js} +1 -1
  18. package/dist/{conversation-privacy-xS1t92xa.js → conversation-privacy-ZYy05Y3q.js} +1 -1
  19. package/dist/credential-sync-DCB2SwnQ.js +940 -0
  20. package/dist/{execution-stats-CrXs9vSH.js → execution-stats-CR9CYpyj.js} +3 -3
  21. package/dist/{executor-AOhG9X1t.js → executor-B9R4cHte.js} +1 -1
  22. package/dist/instrumentation.js +2 -2
  23. package/dist/{job-queue-CNd9cpIy.js → job-queue-D2SiTrnt.js} +1 -1
  24. package/dist/{logging-DiN3o3nB.js → logging-CcTvYQ8A.js} +2 -2
  25. package/dist/{model-profile-CZmVoGdX.js → model-profile-BwU8mqwD.js} +14 -1
  26. package/dist/nitro.js +3 -3
  27. package/dist/{pending-auth-D7vmttn_.js → oauth-authorization-BS4vPJmu.js} +6 -48
  28. package/dist/{oauth-callback-server-Ca0VLUEw.js → oauth-callback-server-DnlQsGBJ.js} +4 -4
  29. package/dist/{profile-BsNrw8lj.js → profile-CV97YuiL.js} +5 -9
  30. package/dist/{prompt-90miy8VV.js → prompt-CL8zxsmm.js} +1 -1
  31. package/dist/{registry-Dankt-Pl.js → registry-C8I4IejN.js} +3 -3
  32. package/dist/{resolve-B38CpJe2.js → resolve-DXVAzYa3.js} +2 -2
  33. package/dist/{runner-Ck5rEjCm.js → runner-Die1RJ_z.js} +9 -10
  34. package/dist/{sandbox-egress-signals-BOfFkvly.js → sandbox-egress-signals-BZepyVh1.js} +1 -1
  35. package/dist/{schema-RpbW5Od2.js → schema-BE4uso4i.js} +1 -1
  36. package/dist/{short-title-BHd_jUFX.js → short-title-3wYH3ipl.js} +11 -5
  37. package/dist/{skills-DbP4TDft.js → skills-DUcDEgDI.js} +2 -2
  38. package/dist/{spawn-DzXc_PKO.js → spawn-o15i3tJu.js} +2 -2
  39. package/dist/{stats-pNGp3G5q.js → stats-DawHjcTw.js} +6 -6
  40. package/dist/{task-queue-Cy9y1foT.js → task-queue-D3PLY59C.js} +3 -3
  41. package/dist/{task-runner-DI1FBJFJ.js → task-runner-BMl2aM2v.js} +9 -84
  42. package/dist/{thread-state-DXgxOYpZ.js → thread-state-CAR6gdAm.js} +5 -5
  43. package/dist/{auth-pause-state-Bn2vX4PA.js → turn-failure-response-CZyoUMkD.js} +74 -73
  44. package/dist/{turn-lifecycle-Bjf6y2GO.js → turn-lifecycle-DPDHKi2U.js} +1 -1
  45. package/dist/turn-session-routing-Jkmmxpp-.js +77 -0
  46. package/dist/{validation-D5CIslEu.js → validation-BcGGxOa6.js} +1 -1
  47. package/dist/{version-_ZQFlslB.js → version-DYcuOFQb.js} +1 -1
  48. package/dist/version.js +1 -1
  49. package/dist/{web-authorization-6mmfS_o-.js → web-authorization-B09B8A8R.js} +1 -1
  50. package/dist/{web-input-BJpWm6go.js → web-input-CGE58TpK.js} +7 -7
  51. package/dist/{work-DvIlJR3C.js → work-Bm90pR9P.js} +52 -10
  52. package/dist/{worker-D1qidg-Y.js → worker-BvHr6JhE.js} +5 -5
  53. package/package.json +4 -4
  54. package/dist/agent-runner-2VQ9WhkG.js +0 -679
  55. package/dist/credential-sync-CKdXEUDO.js +0 -2811
  56. package/dist/experimental-CIXf7Uye.js +0 -46
  57. package/dist/turn-execution-BNOXrZ-M.js +0 -47
@@ -1,6 +1,6 @@
1
- import { f as logWarn } from "./logging-DiN3o3nB.js";
2
- import { in as agentTurnTotalTokens, qt as getDb, rn as agentTurnCostUsd } from "./agent-hooks-DZU5nsd1.js";
3
- import { E as juniorConversations, s as juniorAutomationExecutions } from "./executor-AOhG9X1t.js";
1
+ import { p as logWarn } from "./logging-CcTvYQ8A.js";
2
+ import { in as agentTurnTotalTokens, qt as getDb, rn as agentTurnCostUsd } from "./agent-hooks-CRuRcOg9.js";
3
+ import { E as juniorConversations, s as juniorAutomationExecutions } from "./executor-B9R4cHte.js";
4
4
  import { and, asc, count, desc, eq, gte, inArray, lte, max, or, sql } from "drizzle-orm";
5
5
  //#region src/api/conversations/aggregate.ts
6
6
  function usageTokenValue(source, field) {
@@ -1,5 +1,5 @@
1
1
  import { g as startSpanManual } from "./sentry-CgWZM_kV.js";
2
- import "./config-CtoUVs72.js";
2
+ import "./config-DMg679BW.js";
3
3
  import { n as juniorDestinations, r as timestamptz } from "./destinations-BeBiJeEM.js";
4
4
  import { AsyncLocalStorage } from "node:async_hooks";
5
5
  import { getTableColumns, sql } from "drizzle-orm";
@@ -1,6 +1,6 @@
1
- import { M as getDeploymentServiceVersion, N as getDeploymentTelemetryAttributes } from "./logging-DiN3o3nB.js";
1
+ import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-CcTvYQ8A.js";
2
2
  import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-CgWZM_kV.js";
3
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-xS1t92xa.js";
3
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-ZYy05Y3q.js";
4
4
  import { t as consumePrivateTraceResultMarker } from "./private-trace-result-BLvBjy_e.js";
5
5
  //#region src/chat/sentry-payload-filter.ts
6
6
  const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
@@ -1,4 +1,4 @@
1
- import { a as getChatConfig } from "./config-CtoUVs72.js";
1
+ import { a as getChatConfig } from "./config-DMg679BW.js";
2
2
  import { a as signQueueMessage, i as QUEUE_SIGNATURE_MAX_AGE_MS, o as verifyQueueMessage, s as createVercelQueueClient } from "./vercel-queue-DIkVcfK4.js";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  import { z } from "zod";
@@ -1,5 +1,5 @@
1
1
  import { d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException, y as withScope } from "./sentry-CgWZM_kV.js";
2
- import { t as JUNIOR_VERSION } from "./version-_ZQFlslB.js";
2
+ import { t as JUNIOR_VERSION } from "./version-DYcuOFQb.js";
3
3
  import path from "node:path";
4
4
  import { styleText } from "node:util";
5
5
  import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
@@ -1207,4 +1207,4 @@ function extractGenAiUsageAttributes(...sources) {
1207
1207
  };
1208
1208
  }
1209
1209
  //#endregion
1210
- export { JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE as A, withSpan as C, JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE as D, JUNIOR_HEARTBEAT_ROUTE as E, isRecord as F, toOptionalNumber as I, toOptionalString as L, getDeploymentServiceVersion as M, getDeploymentTelemetryAttributes as N, JUNIOR_RETENTION_CRON_SCHEDULE as O, normalizeIdentityEmail as P, withLogContext as S, JUNIOR_HEARTBEAT_CRON_SCHEDULE as T, setSpanAttributes as _, extractGenAiUsageSummary as a, summarizeMessageText as b, getTracePropagationHeaders as c, logInfo as d, logWarn as f, setSentryUser as g, serializeGenAiAttribute as h, extractGenAiUsageAttributes as i, LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION as j, JUNIOR_RETENTION_ROUTE as k, logError as l, runBestEffort as m, createChatSdkLogger as n, getActiveTraceId as o, normalizeGenAiFinishReason as p, createRequestContext as r, getLogContextAttributesForSpan as s, buildTurnFailureResponse as t, logException as u, setSpanStatus as v, JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE as w, withContext as x, setTags as y };
1210
+ export { JUNIOR_RETENTION_ROUTE as A, withLogContext as C, JUNIOR_HEARTBEAT_ROUTE as D, JUNIOR_HEARTBEAT_CRON_SCHEDULE as E, normalizeIdentityEmail as F, isRecord as I, toOptionalNumber as L, LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION as M, getDeploymentServiceVersion as N, JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE as O, getDeploymentTelemetryAttributes as P, toOptionalString as R, withContext as S, JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE as T, setSentryUser as _, extractGenAiUsageSummary as a, setTags as b, getLogContextAttributesForSpan as c, logException as d, logInfo as f, serializeGenAiAttribute as g, runBestEffort as h, extractGenAiUsageAttributes as i, JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE as j, JUNIOR_RETENTION_CRON_SCHEDULE as k, getTracePropagationHeaders as l, normalizeGenAiFinishReason as m, createChatSdkLogger as n, getActiveTraceId as o, logWarn as p, createRequestContext as r, getLogContextAttributes as s, buildTurnFailureResponse as t, logError as u, setSpanAttributes as v, withSpan as w, summarizeMessageText as x, setSpanStatus as y };
@@ -15,6 +15,19 @@ function parseTurnReasoningLevel(value) {
15
15
  //#region src/chat/model-profile.ts
16
16
  /** Keep durable profile names stable and safe to expose in tool schemas. */
17
17
  const modelProfileSchema = z.string().regex(/^[a-z][a-z0-9_-]*$/);
18
+ /** Shared model profiles used when the app does not configure its own. */
19
+ const DEFAULT_MODEL_PROFILES = {
20
+ standard: {
21
+ modelId: "openai/gpt-6-luna",
22
+ description: "Use for lookups, explanations, summaries, routine tool use, and focused source checks, including reading a single code file. Avoid for implementation, debugging, code review, architecture decisions, or research across several systems.",
23
+ reasoningLevel: "high"
24
+ },
25
+ handoff: {
26
+ modelId: "anthropic/claude-opus-5.5",
27
+ description: "Use for implementation, debugging, code review, architecture decisions, and research across several systems. Include verification of unfinished work. Avoid for routine lookups, short explanations, or a new routine request after completed work.",
28
+ reasoningLevel: "high"
29
+ }
30
+ };
18
31
  /** Format one profile and its task-fit description. */
19
32
  function formatModelProfile(profile, description) {
20
33
  const text = description?.trim();
@@ -46,4 +59,4 @@ function profileConfig(config, profile) {
46
59
  return profileConfig;
47
60
  }
48
61
  //#endregion
49
- export { modelIdForProfile as a, TURN_REASONING_LEVELS as c, formatModelProfiles as i, parseTurnReasoningLevel as l, defaultModelId as n, modelProfileSchema as o, formatModelProfile as r, profileConfig as s, ModelProfileNotConfiguredError as t };
62
+ export { formatModelProfiles as a, profileConfig as c, formatModelProfile as i, TURN_REASONING_LEVELS as l, ModelProfileNotConfiguredError as n, modelIdForProfile as o, defaultModelId as r, modelProfileSchema as s, DEFAULT_MODEL_PROFILES as t, parseTurnReasoningLevel as u };
package/dist/nitro.js CHANGED
@@ -1,9 +1,9 @@
1
- import { A as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, D as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, E as JUNIOR_HEARTBEAT_ROUTE, O as JUNIOR_RETENTION_CRON_SCHEDULE, T as JUNIOR_HEARTBEAT_CRON_SCHEDULE, k as JUNIOR_RETENTION_ROUTE, w as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "./logging-DiN3o3nB.js";
1
+ import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-CcTvYQ8A.js";
2
2
  import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-7a9YqLhE.js";
3
3
  import { n as resolveConversationWorkQueueTopic } from "./vercel-queue-DIkVcfK4.js";
4
- import { t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-CNd9cpIy.js";
4
+ import { t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-D2SiTrnt.js";
5
5
  import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-egKWjgue.js";
6
- import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-Cy9y1foT.js";
6
+ import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-D3PLY59C.js";
7
7
  import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-BKGOXca2.js";
8
8
  import path from "node:path";
9
9
  import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
@@ -1,5 +1,4 @@
1
- import { g as extractAssistantText, i as abandonTurnRecord } from "./checkpoint-Deu-OVb3.js";
2
- import { qt as buildDeterministicTurnId } from "./stats-pNGp3G5q.js";
1
+ import { h as extractAssistantText } from "./checkpoint-6fkAdB3g.js";
3
2
  //#region src/chat/runtime/turn.ts
4
3
  /** Classified Slack turn failure carrying the owning Sentry capture outward. */
5
4
  var ConversationTurnBoundaryError = class extends Error {
@@ -135,51 +134,10 @@ function getAssistantReplyText(message) {
135
134
  return decision.kind === "deliver" ? decision.text : void 0;
136
135
  }
137
136
  //#endregion
138
- //#region src/chat/services/pending-auth.ts
139
- const AUTH_LINK_REUSE_WINDOW_MS = 6e5;
140
- const NON_REQUEST_SKIPPED_REASON_PREFIXES = ["directed_to_other_party:", "side_conversation:"];
141
- function isSkippedNonRequest(reason) {
142
- return NON_REQUEST_SKIPPED_REASON_PREFIXES.some((prefix) => reason?.startsWith(prefix));
143
- }
144
- /** Decide whether the same agent-run session can reuse its fresh auth link. */
145
- function canReusePendingAuthLink(args) {
146
- const { pendingAuth } = args;
147
- if (!pendingAuth) return false;
148
- return pendingAuth.kind === args.kind && pendingAuth.provider === args.provider && pendingAuth.actorId === args.actorId && pendingAuth.scope === args.scope && pendingAuth.sessionId === args.sessionId && pendingAuth.linkSentAtMs + AUTH_LINK_REUSE_WINDOW_MS > (args.nowMs ?? Date.now());
149
- }
150
- function getConversationPendingAuth(args) {
151
- const pendingAuth = args.conversation.processing.pendingAuth;
152
- if (!pendingAuth) return;
153
- if (pendingAuth.kind !== args.kind || pendingAuth.provider !== args.provider || pendingAuth.actorId !== args.actorId || pendingAuth.scope !== args.scope) return;
154
- return pendingAuth;
155
- }
156
- function clearPendingAuth(conversation, sessionId) {
157
- if (!conversation.processing.pendingAuth) return;
158
- if (sessionId && conversation.processing.pendingAuth.sessionId !== sessionId) return;
159
- conversation.processing.pendingAuth = void 0;
160
- }
161
- /** Mark the prior blocked turn abandoned after a new auth attempt replaces it. */
162
- async function abandonReplacedPendingAuth(args) {
163
- if (args.previousPendingAuth && args.previousPendingAuth.sessionId !== args.nextPendingAuth.sessionId && args.conversationId) await abandonTurnRecord({
164
- conversationId: args.conversationId,
165
- turnId: args.previousPendingAuth.sessionId,
166
- errorMessage: "Abandoned by a newer auth-blocked request in the same conversation."
167
- });
168
- }
169
- /**
170
- * Decide whether an auth callback still belongs to the latest real human
171
- * request, ignoring bot-authored and passive bystander rows while treating
172
- * failed human turns and opt-outs as newer freshness blockers.
173
- */
174
- function isPendingAuthLatestRequest(conversation, pendingAuth) {
175
- for (let index = conversation.messages.length - 1; index >= 0; index -= 1) {
176
- const message = conversation.messages[index];
177
- if (message?.role !== "user") continue;
178
- if (message.author?.isBot) continue;
179
- if (isSkippedNonRequest(message.meta?.skippedReason)) continue;
180
- return buildDeterministicTurnId(message.id) === pendingAuth.sessionId;
181
- }
182
- return false;
137
+ //#region src/chat/oauth-authorization.ts
138
+ /** Build the stable event identity shared by authorization request and completion. */
139
+ function authorizationId(args) {
140
+ return `${args.sessionId}:${args.kind}:${args.provider}`;
183
141
  }
184
142
  //#endregion
185
- export { startActiveTurn as S, isTurnInputCommitLostError as _, isPendingAuthLatestRequest as a, markTurnCompleted as b, sanitizeAssistantText as c, ConversationTurnBoundaryError as d, CooperativeTurnYieldError as f, isCooperativeTurnYieldError as g, getConversationTurnBoundaryError as h, getConversationPendingAuth as i, NO_REPLY_MARKER as l, TurnInputDeferredError as m, canReusePendingAuthLink as n, decideReply as o, TurnInputCommitLostError as p, clearPendingAuth as r, getAssistantReplyText as s, abandonReplacedPendingAuth as t, isNoReplyMarker as u, isTurnInputDeferredError as v, markTurnFailed as x, markTurnClosed as y };
143
+ export { markTurnFailed as _, NO_REPLY_MARKER as a, CooperativeTurnYieldError as c, getConversationTurnBoundaryError as d, isCooperativeTurnYieldError as f, markTurnCompleted as g, markTurnClosed as h, sanitizeAssistantText as i, TurnInputCommitLostError as l, isTurnInputDeferredError as m, decideReply as n, isNoReplyMarker as o, isTurnInputCommitLostError as p, getAssistantReplyText as r, ConversationTurnBoundaryError as s, authorizationId as t, TurnInputDeferredError as u, startActiveTurn as v };
@@ -1,5 +1,5 @@
1
- import { X as createUserTokenStore } from "./agent-Bzbf92vv.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-CKdXEUDO.js";
1
+ import { vt as createUserTokenStore } from "./agent-runner-Cad1RtWn.js";
2
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DCB2SwnQ.js";
3
3
  import { createServer } from "node:http";
4
4
  //#region src/chat/local/oauth-callback-server.ts
5
5
  const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
@@ -14,7 +14,7 @@ function decodeProvider(value) {
14
14
  }
15
15
  }
16
16
  /** Start the loopback callback that completes OAuth in the local CLI process. */
17
- async function startLocalOAuthCallbackServer(agentRunner) {
17
+ async function startLocalOAuthCallbackServer() {
18
18
  let pendingAuthorization;
19
19
  const completeAuthorization = (authorization, result) => {
20
20
  if (authorization.settled) return;
@@ -61,7 +61,7 @@ async function startLocalOAuthCallbackServer(agentRunner) {
61
61
  };
62
62
  try {
63
63
  const request = new Request(requestUrl, { method: "GET" });
64
- const response = mcpMatch ? await GET(request, provider, waitUntil, { agentRunner }) : await GET$1(request, provider, waitUntil, { agentRunner });
64
+ const response = mcpMatch ? await GET(request, provider, waitUntil, {}) : await GET$1(request, provider, waitUntil, {});
65
65
  const body = Buffer.from(await response.arrayBuffer());
66
66
  await Promise.all(backgroundTasks);
67
67
  if (response.ok) {
@@ -1,7 +1,7 @@
1
- import { w as toOptionalTrimmed } from "./client-DjC6-6iU.js";
2
- import { _ as setSpanAttributes, v as setSpanStatus } from "./logging-DiN3o3nB.js";
3
- import { a as getChatConfig } from "./config-CtoUVs72.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BthunUDD.js";
1
+ import { w as toOptionalTrimmed } from "./client-ihmkx60d.js";
2
+ import { v as setSpanAttributes, y as setSpanStatus } from "./logging-CcTvYQ8A.js";
3
+ import { a as getChatConfig } from "./config-DMg679BW.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-pv4grNNb.js";
5
5
  import { createHash } from "node:crypto";
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
7
7
  import { createRedisState } from "@chat-adapter/state-redis";
@@ -98,10 +98,6 @@ async function withLock(state, key, run, options = {}) {
98
98
  async function fenceLock(state, lock, ttlMs = MUTATION_LOCK_TTL_MS) {
99
99
  if (!await state.extendLock(lock, ttlMs)) throw new Error(`Lock ownership was lost before write for ${lock.threadId}`);
100
100
  }
101
- /** Run work under the active lock, reporting contention without ambiguity. */
102
- async function withActiveLock(state, key, run) {
103
- return await withLock(state, key, run);
104
- }
105
101
  //#endregion
106
102
  //#region src/chat/state/adapter.ts
107
103
  const ACTIVE_LOCK_HEARTBEAT_MS = 3e4;
@@ -859,4 +855,4 @@ function isStale(profile, createdAtMs) {
859
855
  return maxAgeMs === 0 || Date.now() - createdAtMs > maxAgeMs;
860
856
  }
861
857
  //#endregion
862
- export { sleep as A, getDefaultRedisStateAdapterFor as C, fenceLock as D, acquireActiveLock as E, sandboxSkillDir as F, sandboxSkillFile as I, sandboxSkillPathResolution as L, SANDBOX_REPOS_ROOT as M, SANDBOX_SKILLS_ROOT as N, withActiveLock as O, SANDBOX_WORKSPACE_ROOT as P, disconnectStateAdapter as S, MUTATION_LOCK_TTL_MS as T, workspaceSnapshotNotReadyUserMessage as _, isAbortError as a, buildNonInteractiveShellScript as b, isSandboxCommandStreamInterruptedError as c, isSnapshottingError as d, throwSandboxOperationError as f, isWorkspaceSnapshotNotReadyError as g, getWorkspaceSnapshotNotReadyError as h, ensureDockerDaemon as i, SANDBOX_DATA_ROOT as j, withLock as k, isSandboxMissingError as l, WorkspaceSnapshotNotReadyError as m, hash as n, isAlreadyExistsError as o, wrapSandboxSetupError as p, isStale as r, isSandboxApiTransientError as s, create as t, isSandboxUnavailableError as u, getVercelSandboxCredentials as v, getStateAdapter as w, runNonInteractiveCommand as x, buildCommandScript as y };
858
+ export { SANDBOX_DATA_ROOT as A, getDefaultRedisStateAdapterFor as C, fenceLock as D, acquireActiveLock as E, sandboxSkillFile as F, sandboxSkillPathResolution as I, SANDBOX_SKILLS_ROOT as M, SANDBOX_WORKSPACE_ROOT as N, withLock as O, sandboxSkillDir as P, disconnectStateAdapter as S, MUTATION_LOCK_TTL_MS as T, workspaceSnapshotNotReadyUserMessage as _, isAbortError as a, buildNonInteractiveShellScript as b, isSandboxCommandStreamInterruptedError as c, isSnapshottingError as d, throwSandboxOperationError as f, isWorkspaceSnapshotNotReadyError as g, getWorkspaceSnapshotNotReadyError as h, ensureDockerDaemon as i, SANDBOX_REPOS_ROOT as j, sleep as k, isSandboxMissingError as l, WorkspaceSnapshotNotReadyError as m, hash as n, isAlreadyExistsError as o, wrapSandboxSetupError as p, isStale as r, isSandboxApiTransientError as s, create as t, isSandboxUnavailableError as u, getVercelSandboxCredentials as v, getStateAdapter as w, runNonInteractiveCommand as x, buildCommandScript as y };
@@ -1,4 +1,4 @@
1
- import { I as briefOutcomeStatusSchema, L as conversationBriefSchema, R as parseBriefInput } from "./conversation-1HUoZr2l.js";
1
+ import { I as briefOutcomeStatusSchema, L as conversationBriefSchema, R as parseBriefInput } from "./conversation-Bygi39Xj.js";
2
2
  import { z } from "zod";
3
3
  //#region src/chat/briefs/generate.ts
4
4
  const MAX_INPUT_CHARS = 6e4;
@@ -1,4 +1,4 @@
1
- import { _ as setSpanAttributes, d as logInfo, f as logWarn } from "./logging-DiN3o3nB.js";
1
+ import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-CcTvYQ8A.js";
2
2
  import { i as credentialUserSubjectId } from "./context-Bplcgypl.js";
3
3
  import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-7a9YqLhE.js";
4
4
  import path from "node:path";
@@ -1246,8 +1246,8 @@ function registerInlineManifests(state, source, config) {
1246
1246
  const migrationOwners = /* @__PURE__ */ new Map();
1247
1247
  for (const definition of source.inlineManifests) {
1248
1248
  const pkg = definition.packageName ? packageContentByName(source.packagedContent, definition.packageName) : void 0;
1249
- const dir = pkg?.dir ?? process.cwd();
1250
- const skillsDir = pkg?.hasSkillsDir ? path.join(pkg.dir, "skills") : void 0;
1249
+ const dir = pkg?.dir ?? definition.dir ?? process.cwd();
1250
+ const skillsDir = pkg?.hasSkillsDir || definition.dir && statSync(path.join(dir, "skills"), { throwIfNoEntry: false })?.isDirectory() ? path.join(dir, "skills") : void 0;
1251
1251
  const migrationsDir = pkg?.hasMigrationsDir && statSync(path.join(pkg.dir, "migrations"), { throwIfNoEntry: false })?.isDirectory() ? path.join(pkg.dir, "migrations") : void 0;
1252
1252
  const manifest = parseInlinePluginManifest(definition.manifest, dir, config);
1253
1253
  if (migrationsDir) {
@@ -1,5 +1,5 @@
1
- import { C as withSpan, _ as setSpanAttributes } from "./logging-DiN3o3nB.js";
2
- import { A as sleep, P as SANDBOX_WORKSPACE_ROOT, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-BsNrw8lj.js";
1
+ import { v as setSpanAttributes, w as withSpan } from "./logging-CcTvYQ8A.js";
2
+ import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-CV97YuiL.js";
3
3
  import { z } from "zod";
4
4
  import { FileSystem, Sandbox } from "@vercel/sandbox";
5
5
  //#region src/chat/sandbox/resources.ts
@@ -1,14 +1,13 @@
1
- import { p as authorizationId } from "./agent-Bzbf92vv.js";
2
- import { S as withLogContext, u as logException, y as setTags } from "./logging-DiN3o3nB.js";
1
+ import { C as withLogContext, b as setTags, d as logException } from "./logging-CcTvYQ8A.js";
3
2
  import { t as credentialContextForActor } from "./context-Bplcgypl.js";
4
- import { Kt as getConversationStore, Wt as getConversationEventStore } from "./agent-hooks-DZU5nsd1.js";
5
- import { M as messageCardText } from "./conversation-1HUoZr2l.js";
6
- import { F as loadProjection, V as recordAuthorizationCompleted, X as persistConversationMessages, Y as hydrateConversationMessages, ct as recordDeliveredAssistantMessage, d as persistWithRetry, j as commitAcceptedReply, ot as markConversationMessage, r as saveTurnCheckpoint, st as normalizeConversationText, tt as buildConversationContext, ut as upsertConversationMessage } from "./checkpoint-Deu-OVb3.js";
7
- import { S as startActiveTurn, s as getAssistantReplyText, x as markTurnFailed } from "./pending-auth-D7vmttn_.js";
8
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-DI1FBJFJ.js";
9
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-Bjf6y2GO.js";
10
- import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DXgxOYpZ.js";
11
- import { f as buildDeliveredTurnStatePatch, r as finalizeFailedTurnReplyWithEvent, s as loadPendingMessageCards, t as completeAuthPauseTurn } from "./auth-pause-state-Bn2vX4PA.js";
3
+ import { Kt as getConversationStore, Wt as getConversationEventStore } from "./agent-hooks-CRuRcOg9.js";
4
+ import { M as messageCardText } from "./conversation-Bygi39Xj.js";
5
+ import { A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, P as loadProjection, Y as persistConversationMessages, at as markConversationMessage, et as buildConversationContext, lt as upsertConversationMessage, ot as normalizeConversationText, r as saveTurnCheckpoint, st as recordDeliveredAssistantMessage, u as persistWithRetry } from "./checkpoint-6fkAdB3g.js";
6
+ import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-BS4vPJmu.js";
7
+ import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-BMl2aM2v.js";
8
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DPDHKi2U.js";
9
+ import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CAR6gdAm.js";
10
+ import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-CZyoUMkD.js";
12
11
  import { randomUUID } from "node:crypto";
13
12
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
14
13
  //#region src/chat/local/runner.ts
@@ -1,4 +1,4 @@
1
- import { Y as sandboxEgressSignalsResponseSchema } from "./agent-Bzbf92vv.js";
1
+ import { rt as sandboxEgressSignalsResponseSchema } from "./agent-runner-Cad1RtWn.js";
2
2
  //#region src/chat/local/sandbox-egress-signals.ts
3
3
  const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
4
4
  const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
@@ -1,5 +1,5 @@
1
1
  import { t as juniorDestinationKindSchema } from "./destinations-BeBiJeEM.js";
2
- import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-1HUoZr2l.js";
2
+ import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-Bygi39Xj.js";
3
3
  import { i as fillUtcHours, r as fillUtcDays, s as sumUtcHoursIntoSixHours } from "./reporting-window-DbUqng0P.js";
4
4
  import { z } from "zod";
5
5
  import { codeChangeStateSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
@@ -1,5 +1,5 @@
1
- import { f as logWarn } from "./logging-DiN3o3nB.js";
2
- import { n as botConfig } from "./config-CtoUVs72.js";
1
+ import { p as logWarn } from "./logging-CcTvYQ8A.js";
2
+ import { n as botConfig } from "./config-DMg679BW.js";
3
3
  const TITLE_PROMPTS = {
4
4
  conversation: [
5
5
  "Generate a concise 5-8 word conversation title from the first user message below.",
@@ -25,10 +25,12 @@ function fallbackShortTitle(sourceText, fallback = "Untitled") {
25
25
  }
26
26
  /** Generate a short title with the fast model, or return undefined on failure. */
27
27
  async function generateShortTitle(args) {
28
+ args.signal?.throwIfAborted();
28
29
  const sourceText = args.sourceText.trim();
29
30
  if (!sourceText) return void 0;
30
31
  try {
31
- return normalizeShortTitle((await args.completeText({
32
+ const result = await args.completeText({
33
+ signal: args.signal,
32
34
  modelId: botConfig.fastModelId,
33
35
  temperature: 0,
34
36
  promptName: `junior.${args.kind}_title`,
@@ -42,8 +44,11 @@ async function generateShortTitle(args) {
42
44
  timestamp: Date.now()
43
45
  }],
44
46
  metadata: { modelId: botConfig.fastModelId }
45
- })).text) || void 0;
47
+ });
48
+ args.signal?.throwIfAborted();
49
+ return normalizeShortTitle(result.text) || void 0;
46
50
  } catch (error) {
51
+ args.signal?.throwIfAborted();
47
52
  logWarn(`${args.kind}.title.generation.failed`, { "exception.message": error instanceof Error ? error.message : String(error) });
48
53
  return;
49
54
  }
@@ -58,7 +63,8 @@ async function resolveTaskTitle(args) {
58
63
  return generateShortTitle({
59
64
  completeText: args.completeText,
60
65
  kind: "task",
61
- sourceText: args.instruction
66
+ sourceText: args.instruction,
67
+ signal: args.signal
62
68
  });
63
69
  }
64
70
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { f as logWarn } from "./logging-DiN3o3nB.js";
2
+ import { p as logWarn } from "./logging-CcTvYQ8A.js";
3
3
  import { s as skillRoots } from "./package-discovery-7a9YqLhE.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BthunUDD.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-pv4grNNb.js";
5
5
  import path from "node:path";
6
6
  import { z } from "zod";
7
7
  import fs from "node:fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { C as toolInvocationDestination, y as actorFromRun } from "./agent-runner-2VQ9WhkG.js";
3
- import { n as createAndEnqueueAgentInvocation } from "./work-DvIlJR3C.js";
2
+ import { Ct as toolInvocationDestination, St as actorFromRun } from "./agent-runner-Cad1RtWn.js";
3
+ import { n as createAndEnqueueAgentInvocation } from "./work-Bm90pR9P.js";
4
4
  //#region src/chat/agent-invocations/spawn.ts
5
5
  var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
6
6
  /** Bind a Run's Actor and credentials to new Agent invocations. */
@@ -1,11 +1,11 @@
1
- import { F as isRecord$1, I as toOptionalNumber, L as toOptionalString } from "./logging-DiN3o3nB.js";
2
- import { a as getChatConfig } from "./config-CtoUVs72.js";
1
+ import { I as isRecord$1, L as toOptionalNumber, R as toOptionalString } from "./logging-CcTvYQ8A.js";
2
+ import { a as getChatConfig } from "./config-DMg679BW.js";
3
3
  import { _ as parseSlackMessageTs, d as parseStoredSlackActor, h as parseSlackTeamId, p as parseSlackChannelId } from "./context-Bplcgypl.js";
4
- import { Ft as saveObjectAnnotations, J as withSlackRetries, Kt as getConversationStore, U as getSlackClient, fn as parseDestination, ht as getDashboardTaskLink, mn as sameDestination, pt as JUNIOR_THREAD_STATE_TTL_MS, qt as getDb, u as getPlugins } from "./agent-hooks-DZU5nsd1.js";
4
+ import { Ft as saveObjectAnnotations, J as withSlackRetries, Kt as getConversationStore, U as getSlackClient, fn as parseDestination, ht as getDashboardTaskLink, mn as sameDestination, pt as JUNIOR_THREAD_STATE_TTL_MS, qt as getDb, u as getPlugins } from "./agent-hooks-CRuRcOg9.js";
5
5
  import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
6
- import { E as juniorConversations, a as juniorSchedulerRuns, c as juniorStats, l as juniorEventAutomations, o as juniorSchedulerTasks, w as juniorAttachments } from "./executor-AOhG9X1t.js";
7
- import { t as fallbackShortTitle } from "./short-title-BHd_jUFX.js";
8
- import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-BsNrw8lj.js";
6
+ import { E as juniorConversations, a as juniorSchedulerRuns, c as juniorStats, l as juniorEventAutomations, o as juniorSchedulerTasks, w as juniorAttachments } from "./executor-B9R4cHte.js";
7
+ import { t as fallbackShortTitle } from "./short-title-3wYH3ipl.js";
8
+ import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-CV97YuiL.js";
9
9
  import "./vercel-queue-DIkVcfK4.js";
10
10
  import { z } from "zod";
11
11
  import { createHash, randomUUID } from "node:crypto";
@@ -1,6 +1,6 @@
1
- import { f as logWarn } from "./logging-DiN3o3nB.js";
1
+ import { p as logWarn } from "./logging-CcTvYQ8A.js";
2
2
  import { a as signQueueMessage, i as QUEUE_SIGNATURE_MAX_AGE_MS, o as verifyQueueMessage, s as createVercelQueueClient } from "./vercel-queue-DIkVcfK4.js";
3
- import { o as runWithTurnRequestDeadline } from "./job-queue-CNd9cpIy.js";
3
+ import { o as runWithTurnRequestDeadline } from "./job-queue-D2SiTrnt.js";
4
4
  import { z } from "zod";
5
5
  import { createHash } from "node:crypto";
6
6
  import { handleCallback, registerDevConsumer } from "@vercel/queue";
@@ -110,7 +110,7 @@ function pluginTaskCallback() {
110
110
  maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
111
111
  onRejected: logPluginTaskQueueMessageRejected,
112
112
  run: async (message) => {
113
- const { processPluginTask } = await import("./task-runner-DI1FBJFJ.js").then((n) => n.r);
113
+ const { processPluginTask } = await import("./task-runner-BMl2aM2v.js").then((n) => n.r);
114
114
  await processPluginTask(message);
115
115
  },
116
116
  topic: PLUGIN_TASK_QUEUE_TOPIC,
@@ -1,12 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
2
  import { _ as parseSlackMessageTs, r as credentialSubjectSchema } from "./context-Bplcgypl.js";
3
- import { At as createPluginConversationEvents, Kt as getConversationStore, Q as readActorIdentity, _t as createPluginState, bt as createPluginLogger, p as coreTaskRegistrations, pt as JUNIOR_THREAD_STATE_TTL_MS, qt as getDb, u as getPlugins, vt as createPluginEmbedder, yt as createPluginModel } from "./agent-hooks-DZU5nsd1.js";
4
- import { X as sameActorIdentity } from "./conversation-1HUoZr2l.js";
5
- import { E as normalizeToolNameFromResult, O as stripRuntimeTurnContext, T as isToolResultMessage, Y as hydrateConversationMessages, _ as getPiMessageRole, s as getTurnRecord, w as isToolResultError, x as instructionTextForProjection } from "./checkpoint-Deu-OVb3.js";
6
- import { w as getStateAdapter } from "./profile-BsNrw8lj.js";
7
- import { u as recordAutomationExecution } from "./execution-stats-CrXs9vSH.js";
8
- import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DXgxOYpZ.js";
9
- import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-Cy9y1foT.js";
3
+ import { At as createPluginConversationEvents, Kt as getConversationStore, Q as readActorIdentity, _t as createPluginState, bt as createPluginLogger, p as coreTaskRegistrations, pt as JUNIOR_THREAD_STATE_TTL_MS, qt as getDb, u as getPlugins, vt as createPluginEmbedder, yt as createPluginModel } from "./agent-hooks-CRuRcOg9.js";
4
+ import { X as sameActorIdentity } from "./conversation-Bygi39Xj.js";
5
+ import { C as isToolResultError, D as stripRuntimeTurnContext, J as hydrateConversationMessages, T as normalizeToolNameFromResult, b as instructionTextForProjection, g as getPiMessageRole, s as getTurnRecord, w as isToolResultMessage } from "./checkpoint-6fkAdB3g.js";
6
+ import { w as getStateAdapter } from "./profile-CV97YuiL.js";
7
+ import { u as recordAutomationExecution } from "./execution-stats-CR9CYpyj.js";
8
+ import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CAR6gdAm.js";
9
+ import { t as resolveConversationRouting } from "./turn-session-routing-Jkmmxpp-.js";
10
+ import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-D3PLY59C.js";
10
11
  import { z } from "zod";
11
12
  import { createHash } from "node:crypto";
12
13
  import { destinationSchema, destinationVisibilitySchema, isSlackDestination, pluginRunContextSchema, replyAttributionSchema, sourceSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
@@ -309,82 +310,6 @@ async function getPluginDispatchProjection(args) {
309
310
  return toDispatchProjection(record);
310
311
  }
311
312
  //#endregion
312
- //#region src/chat/services/turn-session-routing.ts
313
- async function loadConversationChain(conversationId, conversationStore) {
314
- const chain = [];
315
- const seen = /* @__PURE__ */ new Set();
316
- let cursor = conversationId;
317
- while (cursor && !seen.has(cursor)) {
318
- seen.add(cursor);
319
- const conversation = await conversationStore.get({ conversationId: cursor });
320
- if (!conversation) break;
321
- chain.push(conversation);
322
- cursor = conversation.parentConversationId;
323
- }
324
- return chain;
325
- }
326
- /**
327
- * Normalize a stored Slack session source against the conversation destination.
328
- *
329
- * Does not create channel or thread values from the conversation id.
330
- */
331
- function slackSourceForDestination(args) {
332
- if (args.source?.kind !== "slack" || args.source.channelId !== args.destination.channelId) return;
333
- const threadTs = args.source.threadTs?.trim();
334
- return {
335
- kind: "slack",
336
- visibility: args.source.visibility ?? "public",
337
- teamId: args.source.teamId?.trim() || args.destination.teamId,
338
- channelId: args.source.channelId,
339
- ...threadTs ? { threadTs } : void 0
340
- };
341
- }
342
- /**
343
- * Resolve the Conversation Location, Destination, and session Source.
344
- *
345
- * Reads parent Conversations when this Conversation has no Destination.
346
- */
347
- async function resolveConversationRouting(args) {
348
- const conversationStore = args.conversationStore ?? (await import("./agent-hooks-DZU5nsd1.js").then((n) => n.Ut)).getConversationStore();
349
- const chain = await loadConversationChain(args.conversationId, conversationStore);
350
- let destination;
351
- let source;
352
- let location;
353
- for (const conversation of chain) {
354
- destination ??= conversation.destination;
355
- source ??= conversation.sessionSource;
356
- location ??= conversation.location;
357
- if (destination && source) break;
358
- }
359
- if (!destination) return;
360
- if (destination.platform === "slack") {
361
- const slackSource = slackSourceForDestination({
362
- destination,
363
- source
364
- });
365
- return {
366
- destination,
367
- ...location ? { location } : void 0,
368
- ...slackSource ? { source: slackSource } : void 0
369
- };
370
- }
371
- return {
372
- destination,
373
- ...location ? { location } : void 0,
374
- ...source ? { source } : void 0
375
- };
376
- }
377
- /** Require the Conversation Destination and Source from SQL. */
378
- async function resolveTurnSessionRouting(args) {
379
- const routing = await resolveConversationRouting(args);
380
- if (!routing?.destination || !routing.source) throw new Error(`Conversation ${args.conversationId} is missing durable routing metadata`);
381
- return {
382
- destination: routing.destination,
383
- ...routing.location ? { location: routing.location } : void 0,
384
- source: routing.source
385
- };
386
- }
387
- //#endregion
388
313
  //#region src/chat/plugins/task-runner.ts
389
314
  var task_runner_exports = /* @__PURE__ */ __exportAll({
390
315
  processPluginTask: () => processPluginTask,
@@ -636,4 +561,4 @@ async function processPluginTask(message, options = {}) {
636
561
  });
637
562
  }
638
563
  //#endregion
639
- export { markDispatchCompleted as _, claimDispatchMailboxAppend as a, getDispatchConversationId as c, getDispatchTurnId as d, getPluginDispatchProjection as f, markDispatchBlocked as g, markDispatchAwaitingResume as h, resolveTurnSessionRouting as i, getDispatchInputMessageId as l, listPendingDispatchMailboxAppends as m, scheduleSessionCompletedPluginTasks as n, confirmDispatchMailboxAppend as o, isTerminalDispatchStatus as p, task_runner_exports as r, createOrGetDispatch as s, processPluginTask as t, getDispatchRecord as u, markDispatchFailed as v, markDispatchRunning as y };
564
+ export { markDispatchFailed as _, confirmDispatchMailboxAppend as a, getDispatchInputMessageId as c, getPluginDispatchProjection as d, isTerminalDispatchStatus as f, markDispatchCompleted as g, markDispatchBlocked as h, claimDispatchMailboxAppend as i, getDispatchRecord as l, markDispatchAwaitingResume as m, scheduleSessionCompletedPluginTasks as n, createOrGetDispatch as o, listPendingDispatchMailboxAppends as p, task_runner_exports as r, getDispatchConversationId as s, processPluginTask as t, getDispatchTurnId as u, markDispatchRunning as v };
@@ -1,9 +1,9 @@
1
- import { F as isRecord, I as toOptionalNumber, L as toOptionalString } from "./logging-DiN3o3nB.js";
2
- import { pt as JUNIOR_THREAD_STATE_TTL_MS, qt as getDb } from "./agent-hooks-DZU5nsd1.js";
1
+ import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-CcTvYQ8A.js";
2
+ import { pt as JUNIOR_THREAD_STATE_TTL_MS, qt as getDb } from "./agent-hooks-CRuRcOg9.js";
3
3
  import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
4
- import { u as juniorLocationConfigurations } from "./executor-AOhG9X1t.js";
5
- import { X as persistConversationMessages } from "./checkpoint-Deu-OVb3.js";
6
- import { w as getStateAdapter } from "./profile-BsNrw8lj.js";
4
+ import { u as juniorLocationConfigurations } from "./executor-B9R4cHte.js";
5
+ import { Y as persistConversationMessages } from "./checkpoint-6fkAdB3g.js";
6
+ import { w as getStateAdapter } from "./profile-CV97YuiL.js";
7
7
  import { z } from "zod";
8
8
  import { randomUUID } from "node:crypto";
9
9
  import { and, eq, sql } from "drizzle-orm";