@sentry/junior 0.204.0 → 0.205.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 (50) hide show
  1. package/dist/{agent-CMyTD4DD.js → agent-D4nu8MQV.js} +46 -34
  2. package/dist/{agent-hooks-Bbcp9e33.js → agent-hooks-DXHpTJ4m.js} +10 -8
  3. package/dist/{agent-runner-DNb1A49M.js → agent-runner-C04colea.js} +5 -5
  4. package/dist/api/schema.d.ts +8 -0
  5. package/dist/api.js +15 -15
  6. package/dist/{app-B1TOqBI8.d.ts → app-Cb776lL8.d.ts} +1 -0
  7. package/dist/app.d.ts +1 -1
  8. package/dist/app.js +34 -32
  9. package/dist/{auth-pause-state-DosEalIG.js → auth-pause-state-C2P3guS1.js} +6 -6
  10. package/dist/{catalog-runtime-BReos-D4.js → catalog-runtime-CXw3asJD.js} +1 -1
  11. package/dist/{checkpoint-CNrPyRJN.js → checkpoint-CrViJ8Ps.js} +5 -5
  12. package/dist/cli/chat.js +12 -12
  13. package/dist/cli/check.js +3 -3
  14. package/dist/cli/plugins.js +3 -3
  15. package/dist/cli/snapshot-create.js +3 -3
  16. package/dist/cli/upgrade.js +3 -3
  17. package/dist/{config-nGCW1OTG.js → config-BOtJQ7Pc.js} +2 -2
  18. package/dist/{conversation-privacy-B4voFRSm.js → conversation-privacy-BZRA6Pes.js} +1 -1
  19. package/dist/{credential-sync-kXr1hvO1.js → credential-sync-Bep34IB_.js} +21 -20
  20. package/dist/{execution-stats-DWfSihcH.js → execution-stats-B6lgWxCK.js} +4 -4
  21. package/dist/{executor-DcMSlI5c.js → executor-BlUhFL7_.js} +1 -1
  22. package/dist/instrumentation.js +2 -2
  23. package/dist/{job-queue-Drn_LXlM.js → job-queue-DLMqIK74.js} +1 -1
  24. package/dist/{logging-BzAk1S_s.js → logging-BMJzdDlP.js} +1 -1
  25. package/dist/nitro.d.ts +1 -1
  26. package/dist/nitro.js +3 -3
  27. package/dist/{oauth-callback-server-JiftokvA.js → oauth-callback-server-WwG5_Zgm.js} +2 -2
  28. package/dist/{pending-auth-CWmSdZVg.js → pending-auth-CUbXq06G.js} +2 -2
  29. package/dist/{profile-CrT5nXbw.js → profile-T0tXE4zu.js} +3 -3
  30. package/dist/{registry-DH1xUo2N.js → registry-BA0__8ai.js} +1 -1
  31. package/dist/{resolve-CZHnfxaS.js → resolve-bvD1ORdv.js} +2 -2
  32. package/dist/{runner-CZV2sC46.js → runner-BXYxfIUL.js} +9 -9
  33. package/dist/{sandbox-egress-signals-bHZfmhbd.js → sandbox-egress-signals-ngEPjSEW.js} +1 -1
  34. package/dist/{skills-CIcDQSgM.js → skills-DJOlYdBs.js} +2 -2
  35. package/dist/{spawn-DdkUFRmq.js → spawn-h0R1bTEo.js} +2 -2
  36. package/dist/{stats-DTUbAb88.js → stats-3YZn-Swi.js} +26 -12
  37. package/dist/{task-queue-CJIR4RF7.js → task-queue-CoXwd2eq.js} +3 -3
  38. package/dist/{task-runner-D-O3A-Cp.js → task-runner-B2_mJZj0.js} +7 -7
  39. package/dist/{thread-state-CRc9jTJS.js → thread-state-CqZ1m-es.js} +5 -5
  40. package/dist/{turn-execution-BkinIdJF.js → turn-execution-fI6PZ0iI.js} +3 -3
  41. package/dist/{turn-lifecycle-DQV19VTW.js → turn-lifecycle-CcnwrOcp.js} +1 -1
  42. package/dist/{usage-D3EbSO7w.js → usage-B5SfMb3H.js} +2 -2
  43. package/dist/{validation-C2CR-OX3.js → validation-DfWcvhuS.js} +1 -1
  44. package/dist/{version-DxcWdoKa.js → version-oD-oPrbO.js} +1 -1
  45. package/dist/version.js +1 -1
  46. package/dist/{web-authorization-RMBxAR_t.js → web-authorization-Crbzlmzo.js} +1 -1
  47. package/dist/{web-input-3EPfpf55.js → web-input-BOuq3oKK.js} +6 -6
  48. package/dist/{work-fGofI7Op.js → work-B91LQKHr.js} +9 -9
  49. package/dist/{worker-CsOLq-mR.js → worker-BcRRTe6k.js} +4 -4
  50. package/package.json +5 -5
package/dist/cli/chat.js CHANGED
@@ -1,5 +1,5 @@
1
- import { t as executeAgentRun } from "../agent-CMyTD4DD.js";
2
- import { t as createAgentRunner } from "../agent-runner-DNb1A49M.js";
1
+ import { t as executeAgentRun } from "../agent-D4nu8MQV.js";
2
+ import { t as createAgentRunner } from "../agent-runner-C04colea.js";
3
3
  import { t as loadAppPluginSet } from "../plugin-module-BKGOXca2.js";
4
4
  import path from "node:path";
5
5
  import { createHash, randomUUID } from "node:crypto";
@@ -101,10 +101,10 @@ async function loadLocalPluginSet() {
101
101
  async function configureLocalChatPlugins(pluginSet) {
102
102
  const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
103
103
  import("../plugins-egKWjgue.js").then((n) => n.o),
104
- import("../agent-hooks-Bbcp9e33.js").then((n) => n.t),
105
- import("../catalog-runtime-BReos-D4.js").then((n) => n.t),
106
- import("../validation-C2CR-OX3.js").then((n) => n.r),
107
- import("../agent-hooks-Bbcp9e33.js").then((n) => n.St)
104
+ import("../agent-hooks-DXHpTJ4m.js").then((n) => n.t),
105
+ import("../catalog-runtime-CXw3asJD.js").then((n) => n.t),
106
+ import("../validation-DfWcvhuS.js").then((n) => n.r),
107
+ import("../agent-hooks-DXHpTJ4m.js").then((n) => n.St)
108
108
  ]);
109
109
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
110
110
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -156,14 +156,14 @@ async function prepareLocalChatRun(io, pluginSet) {
156
156
  await configureLocalChatPlugins(pluginSet);
157
157
  const { setExperimentalFeatures } = await import("../experimental-CIXf7Uye.js").then((n) => n.t);
158
158
  setExperimentalFeatures({ subagents: true });
159
- const { runLocalAgentTurn } = await import("../runner-CZV2sC46.js");
160
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-JiftokvA.js");
159
+ const { runLocalAgentTurn } = await import("../runner-BXYxfIUL.js");
160
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-WwG5_Zgm.js");
161
161
  const { createLocalOAuthState } = await import("../oauth-relay-CdCnu80W.js").then((n) => n.t);
162
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-bHZfmhbd.js");
163
- const { bindSpawnAgent } = await import("../spawn-DdkUFRmq.js").then((n) => n.n);
164
- const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-fGofI7Op.js").then((n) => n.a);
162
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-ngEPjSEW.js");
163
+ const { bindSpawnAgent } = await import("../spawn-h0R1bTEo.js").then((n) => n.n);
164
+ const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-B91LQKHr.js").then((n) => n.a);
165
165
  const { createLocalConversationWork } = await import("../conversation-work-C6y3T5Hx.js");
166
- const { processConversationWork } = await import("../worker-CsOLq-mR.js").then((n) => n.n);
166
+ const { processConversationWork } = await import("../worker-BcRRTe6k.js").then((n) => n.n);
167
167
  let agentRunner;
168
168
  const localConversationWork = createLocalConversationWork(async (message) => {
169
169
  if (!agentRunner) throw new Error("Local agent runner is not ready");
package/dist/cli/check.js CHANGED
@@ -1,6 +1,6 @@
1
- import { E as JUNIOR_HEARTBEAT_ROUTE, j as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, w as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-BzAk1S_s.js";
2
- import { d as parseInlinePluginManifest, f as parsePluginManifest } from "../registry-DH1xUo2N.js";
3
- import { i as parseSkillFile } from "../skills-CIcDQSgM.js";
1
+ import { E as JUNIOR_HEARTBEAT_ROUTE, j as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, w as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-BMJzdDlP.js";
2
+ import { d as parseInlinePluginManifest, f as parsePluginManifest } from "../registry-BA0__8ai.js";
3
+ import { i as parseSkillFile } from "../skills-DJOlYdBs.js";
4
4
  import { pathToFileURL } from "node:url";
5
5
  import path from "node:path";
6
6
  import fs from "node:fs/promises";
@@ -1,6 +1,6 @@
1
- import { Et as getDb, _t as createPluginLogger, d as setPlugins, f as validatePlugins } from "../agent-hooks-Bbcp9e33.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-BReos-D4.js";
3
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-C2CR-OX3.js";
1
+ import { Et as getDb, _t as createPluginLogger, d as setPlugins, f as validatePlugins } from "../agent-hooks-DXHpTJ4m.js";
2
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-CXw3asJD.js";
3
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DfWcvhuS.js";
4
4
  import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-egKWjgue.js";
5
5
  import { t as loadAppPluginSet } from "../plugin-module-BKGOXca2.js";
6
6
  import { stderr, stdout } from "node:process";
@@ -1,6 +1,6 @@
1
- import { n as pluginCatalogRuntime } from "../catalog-runtime-BReos-D4.js";
2
- import { S as disconnectStateAdapter, t as create } from "../profile-CrT5nXbw.js";
3
- import { r as resolve } from "../resolve-CZHnfxaS.js";
1
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-CXw3asJD.js";
2
+ import { S as disconnectStateAdapter, t as create } from "../profile-T0tXE4zu.js";
3
+ import { r as resolve } from "../resolve-bvD1ORdv.js";
4
4
  //#region src/cli/snapshot-create.ts
5
5
  const DEFAULT_RUNTIME = "node22";
6
6
  const DEFAULT_TIMEOUT_MS = 6e5;
@@ -1,6 +1,6 @@
1
- import { i as getChatConfig } from "../config-nGCW1OTG.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-DcMSlI5c.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-DH1xUo2N.js";
1
+ import { i as getChatConfig } from "../config-BOtJQ7Pc.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-BlUhFL7_.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-BA0__8ai.js";
4
4
  import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-egKWjgue.js";
5
5
  import { t as loadAppPluginSet } from "../plugin-module-BKGOXca2.js";
6
6
  import { fileURLToPath } from "node:url";
@@ -1,5 +1,5 @@
1
- import { C as withSpan, f as logWarn, h as serializeGenAiAttribute, i as extractGenAiUsageAttributes, p as normalizeGenAiFinishReason, u as logException } from "./logging-BzAk1S_s.js";
2
- import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-B4voFRSm.js";
1
+ import { C as withSpan, f as logWarn, h as serializeGenAiAttribute, i as extractGenAiUsageAttributes, p as normalizeGenAiFinishReason, u as logException } from "./logging-BMJzdDlP.js";
2
+ import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-BZRA6Pes.js";
3
3
  import { c as TURN_REASONING_LEVELS, l as parseTurnReasoningLevel, o as modelProfileSchema } from "./model-profile-CZmVoGdX.js";
4
4
  import { calculateCost, completeSimple, getEnvApiKey, getModel, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
5
5
  import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
@@ -1,4 +1,4 @@
1
- import { f as logWarn } from "./logging-BzAk1S_s.js";
1
+ import { f as logWarn } from "./logging-BMJzdDlP.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  //#region src/chat/conversation-privacy.ts
4
4
  const SAFE_METADATA_KEY_LIMIT = 20;
@@ -1,26 +1,26 @@
1
- import { N as getMcpProviderErrorAttributes, Q as createUserTokenStore, a as deleteMcpAuthSession, d as putMcpStoredOAuthCredentials, h as resolvePluginOAuthAccount, i as finalizeMcpAuthorization, l as getMcpAuthSession, u as getMcpStoredOAuthCredentials, y as lookupSlackUserProfile } from "./agent-CMyTD4DD.js";
2
- import { O as escapeXml, a as getRuntimeMetadata, i as getChatConfig, m as normalizeSlackEmojiName, n as botConfig } from "./config-nGCW1OTG.js";
3
- import { L as toOptionalString, S as withLogContext, d as logInfo, f as logWarn, m as runBestEffort, u as logException, y as setTags } from "./logging-BzAk1S_s.js";
1
+ import { N as getMcpProviderErrorAttributes, Q as createUserTokenStore, a as deleteMcpAuthSession, d as putMcpStoredOAuthCredentials, h as resolvePluginOAuthAccount, i as finalizeMcpAuthorization, l as getMcpAuthSession, u as getMcpStoredOAuthCredentials, y as lookupSlackUserProfile } from "./agent-D4nu8MQV.js";
2
+ import { O as escapeXml, a as getRuntimeMetadata, i as getChatConfig, m as normalizeSlackEmojiName, n as botConfig } from "./config-BOtJQ7Pc.js";
3
+ import { L as toOptionalString, S as withLogContext, d as logInfo, f as logWarn, m as runBestEffort, u as logException, y as setTags } from "./logging-BMJzdDlP.js";
4
4
  import { n as defaultModelId } from "./model-profile-CZmVoGdX.js";
5
5
  import { _ as parseSlackMessageTs, g as parseSlackUserId, l as isUserActor, s as createSlackResumeActor } from "./context-B45_WqVX.js";
6
- import { B as getSlackClient, Dt as getSqlExecutor, H as isDmChannel, I as SlackActionError, Lt as upsertIdentity, Rt as upsertLinkedIdentity, Tt as getConversationStore, U as normalizeSlackConversationId, Vt as requireSlackDestination, dt as getDashboardConversationLink, o as getPluginSlackConversationLink, z as getHeaderString } from "./agent-hooks-Bbcp9e33.js";
6
+ import { B as getSlackClient, Dt as getSqlExecutor, H as isDmChannel, I as SlackActionError, Lt as upsertIdentity, Rt as upsertLinkedIdentity, Tt as getConversationStore, U as normalizeSlackConversationId, Vt as requireSlackDestination, dt as getDashboardConversationLink, o as getPluginSlackConversationLink, z as getHeaderString } from "./agent-hooks-DXHpTJ4m.js";
7
7
  import { i as homeDir } from "./package-discovery-7a9YqLhE.js";
8
- import { l as hasRequiredOAuthScope, n as buildOAuthTokenRequest, r as parseOAuthTokenResponse } from "./registry-DH1xUo2N.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BReos-D4.js";
10
- import { t as discoverSkills } from "./skills-CIcDQSgM.js";
11
- import { P as commitAcceptedReply, Q as hydrateConversationMessages, R as loadProjection, U as recordAuthenticationLinked, W as recordAuthorizationCompleted, d as persistWithRetry, dt as recordDeliveredAssistantMessage, ft as turnHasReply, i as abandonTurnRecord, it as buildConversationContext, lt as markConversationMessage, m as buildTurnErrorResponse, n as loadTurnCheckpoint, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord, u as recordTurnSummary } from "./checkpoint-CNrPyRJN.js";
12
- import { E as acquireActiveLock, w as getStateAdapter } from "./profile-CrT5nXbw.js";
13
- import { Ct as ensureConversationWake, Nt as requestConversationWork, c as parseSlackThreadId, d as resolveSlackChannelIdFromThreadId, l as readSlackRawMessageContext, u as resolveSlackChannelIdFromMessage } from "./stats-DTUbAb88.js";
14
- import { a as isPendingAuthLatestRequest, f as CooperativeTurnYieldError, g as isCooperativeTurnYieldError, i as getConversationPendingAuth, r as clearPendingAuth, s as getAssistantReplyText, x as markTurnFailed } from "./pending-auth-CWmSdZVg.js";
15
- import { a as parseOAuthStatePayload, c as escapeSlackMrkdwnText, d as normalizeSlackStatusText, f as truncateStatusText, g as removeReactionFromMessage, h as postSlackMessage, i as formatProviderLabel, l as formatSlackLink, o as resolveBaseUrl, p as addReactionToMessage, u as normalizeSlackReplyMarkdown, v as RetryableDeliveryError } from "./agent-runner-DNb1A49M.js";
8
+ import { l as hasRequiredOAuthScope, n as buildOAuthTokenRequest, r as parseOAuthTokenResponse } from "./registry-BA0__8ai.js";
9
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-CXw3asJD.js";
10
+ import { t as discoverSkills } from "./skills-DJOlYdBs.js";
11
+ import { P as commitAcceptedReply, Q as hydrateConversationMessages, R as loadProjection, U as recordAuthenticationLinked, W as recordAuthorizationCompleted, d as persistWithRetry, dt as recordDeliveredAssistantMessage, ft as turnHasReply, i as abandonTurnRecord, it as buildConversationContext, lt as markConversationMessage, m as buildTurnErrorResponse, n as loadTurnCheckpoint, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord, u as recordTurnSummary } from "./checkpoint-CrViJ8Ps.js";
12
+ import { E as acquireActiveLock, w as getStateAdapter } from "./profile-T0tXE4zu.js";
13
+ import { Pt as requestConversationWork, c as parseSlackThreadId, d as resolveSlackChannelIdFromThreadId, l as readSlackRawMessageContext, u as resolveSlackChannelIdFromMessage, wt as ensureConversationWake } from "./stats-3YZn-Swi.js";
14
+ import { a as isPendingAuthLatestRequest, f as CooperativeTurnYieldError, g as isCooperativeTurnYieldError, i as getConversationPendingAuth, r as clearPendingAuth, s as getAssistantReplyText, x as markTurnFailed } from "./pending-auth-CUbXq06G.js";
15
+ import { a as parseOAuthStatePayload, c as escapeSlackMrkdwnText, d as normalizeSlackStatusText, f as truncateStatusText, g as removeReactionFromMessage, h as postSlackMessage, i as formatProviderLabel, l as formatSlackLink, o as resolveBaseUrl, p as addReactionToMessage, u as normalizeSlackReplyMarkdown, v as RetryableDeliveryError } from "./agent-runner-C04colea.js";
16
16
  import { t as getVercelConversationWorkQueue } from "./vercel-queue-DIkVcfK4.js";
17
- import { a as getTurnRequestDeadline } from "./job-queue-Drn_LXlM.js";
18
- import { i as resolveTurnSessionRouting, n as scheduleSessionCompletedPluginTasks } from "./task-runner-D-O3A-Cp.js";
19
- import { n as getTurnLifecycle } from "./turn-lifecycle-DQV19VTW.js";
20
- import { n as executeTurn, t as AgentRunError } from "./turn-execution-BkinIdJF.js";
21
- import { c as configValueSchema, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-CRc9jTJS.js";
22
- import { a as requireTurnFailureEventId, c as getTurnUserMessageId, d as buildDeliveredTurnStatePatch, l as getTurnUserReplyAttachmentContext, n as persistAuthPauseTurnState, o as getInterruptionMarker, r as finalizeFailedTurnReplyWithEvent, s as getTurnUserMessage, u as getTurnUserSlackMessageTs } from "./auth-pause-state-DosEalIG.js";
23
- import { i as buildSentryConversationUrl, n as deleteWebAuthorization } from "./web-authorization-RMBxAR_t.js";
17
+ import { a as getTurnRequestDeadline } from "./job-queue-DLMqIK74.js";
18
+ import { i as resolveTurnSessionRouting, n as scheduleSessionCompletedPluginTasks } from "./task-runner-B2_mJZj0.js";
19
+ import { n as getTurnLifecycle } from "./turn-lifecycle-CcnwrOcp.js";
20
+ import { n as executeTurn, t as AgentRunError } from "./turn-execution-fI6PZ0iI.js";
21
+ import { c as configValueSchema, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-CqZ1m-es.js";
22
+ import { a as requireTurnFailureEventId, c as getTurnUserMessageId, d as buildDeliveredTurnStatePatch, l as getTurnUserReplyAttachmentContext, n as persistAuthPauseTurnState, o as getInterruptionMarker, r as finalizeFailedTurnReplyWithEvent, s as getTurnUserMessage, u as getTurnUserSlackMessageTs } from "./auth-pause-state-C2P3guS1.js";
23
+ import { i as buildSentryConversationUrl, n as deleteWebAuthorization } from "./web-authorization-Crbzlmzo.js";
24
24
  import { n as relayLocalOAuthCallback } from "./oauth-relay-CdCnu80W.js";
25
25
  import path from "node:path";
26
26
  import { z } from "zod";
@@ -1110,7 +1110,8 @@ async function resumeSlackTurnInContext(args) {
1110
1110
  channelId: outcome.destination.channelId,
1111
1111
  conversationId: runArgs.conversationId,
1112
1112
  replyAttribution: runArgs.run?.dispatch?.replyAttribution,
1113
- text
1113
+ text,
1114
+ threadTs: outcome.destination.threadTs
1114
1115
  }));
1115
1116
  else slackMessageTs = await sendSlackReply({
1116
1117
  channelId: runArgs.channelId,
@@ -1,7 +1,7 @@
1
- import { f as logWarn } from "./logging-BzAk1S_s.js";
2
- import { Et as getDb } from "./agent-hooks-Bbcp9e33.js";
3
- import { C as juniorConversations, s as juniorTaskExecutions } from "./executor-DcMSlI5c.js";
4
- import { n as agentTurnCostUsd, r as agentTurnTotalTokens } from "./usage-D3EbSO7w.js";
1
+ import { f as logWarn } from "./logging-BMJzdDlP.js";
2
+ import { Et as getDb } from "./agent-hooks-DXHpTJ4m.js";
3
+ import { C as juniorConversations, s as juniorTaskExecutions } from "./executor-BlUhFL7_.js";
4
+ import { n as agentTurnCostUsd, r as agentTurnTotalTokens } from "./usage-B5SfMb3H.js";
5
5
  import { and, asc, count, desc, eq, gte, inArray, lte, max, or, sql } from "drizzle-orm";
6
6
  //#region src/api/conversations/aggregate.ts
7
7
  function usageTokenValue(source, field) {
@@ -1,4 +1,4 @@
1
- import "./config-nGCW1OTG.js";
1
+ import "./config-BOtJQ7Pc.js";
2
2
  import { n as juniorDestinations, r as timestamptz } from "./destinations-BeBiJeEM.js";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  import { getTableColumns, sql } from "drizzle-orm";
@@ -1,6 +1,6 @@
1
- import { M as getDeploymentServiceVersion, N as getDeploymentTelemetryAttributes } from "./logging-BzAk1S_s.js";
1
+ import { M as getDeploymentServiceVersion, N as getDeploymentTelemetryAttributes } from "./logging-BMJzdDlP.js";
2
2
  import { a as getClient, c as init, g as vercelAIIntegration, o as getGlobalScope, y as withStreamedSpan } from "./sentry-CD3SdJl-.js";
3
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-B4voFRSm.js";
3
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-BZRA6Pes.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 { i as getChatConfig } from "./config-nGCW1OTG.js";
1
+ import { i as getChatConfig } from "./config-BOtJQ7Pc.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, v as withScope } from "./sentry-CD3SdJl-.js";
2
- import { t as JUNIOR_VERSION } from "./version-DxcWdoKa.js";
2
+ import { t as JUNIOR_VERSION } from "./version-oD-oPrbO.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";
package/dist/nitro.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as JuniorDashboardOptions } from "./app-B1TOqBI8.js";
1
+ import { n as JuniorDashboardOptions } from "./app-Cb776lL8.js";
2
2
  import { n as JuniorPluginSet } from "./plugins-BI9A1vKA.js";
3
3
  //#region src/nitro.d.ts
4
4
  export type JuniorNitroDashboardOptions = JuniorDashboardOptions;
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-BzAk1S_s.js";
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-BMJzdDlP.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-Drn_LXlM.js";
4
+ import { t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-DLMqIK74.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-CJIR4RF7.js";
6
+ import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-CoXwd2eq.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,5 @@
1
- import { Q as createUserTokenStore } from "./agent-CMyTD4DD.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-kXr1hvO1.js";
1
+ import { Q as createUserTokenStore } from "./agent-D4nu8MQV.js";
2
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Bep34IB_.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;
@@ -1,5 +1,5 @@
1
- import { i as abandonTurnRecord, yt as extractAssistantText } from "./checkpoint-CNrPyRJN.js";
2
- import { Gt as buildDeterministicTurnId } from "./stats-DTUbAb88.js";
1
+ import { i as abandonTurnRecord, yt as extractAssistantText } from "./checkpoint-CrViJ8Ps.js";
2
+ import { Kt as buildDeterministicTurnId } from "./stats-3YZn-Swi.js";
3
3
  //#region src/chat/runtime/turn.ts
4
4
  /** Classified Slack turn failure carrying the owning Sentry capture outward. */
5
5
  var ConversationTurnBoundaryError = class extends Error {
@@ -1,6 +1,6 @@
1
- import { R as toOptionalTrimmed, i as getChatConfig } from "./config-nGCW1OTG.js";
2
- import { _ as setSpanAttributes, v as setSpanStatus } from "./logging-BzAk1S_s.js";
3
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BReos-D4.js";
1
+ import { R as toOptionalTrimmed, i as getChatConfig } from "./config-BOtJQ7Pc.js";
2
+ import { _ as setSpanAttributes, v as setSpanStatus } from "./logging-BMJzdDlP.js";
3
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-CXw3asJD.js";
4
4
  import { createHash } from "node:crypto";
5
5
  import { createMemoryState } from "@chat-adapter/state-memory";
6
6
  import { createRedisState } from "@chat-adapter/state-redis";
@@ -1,4 +1,4 @@
1
- import { _ as setSpanAttributes, d as logInfo, f as logWarn } from "./logging-BzAk1S_s.js";
1
+ import { _ as setSpanAttributes, d as logInfo, f as logWarn } from "./logging-BMJzdDlP.js";
2
2
  import { i as credentialUserSubjectId } from "./context-B45_WqVX.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";
@@ -1,5 +1,5 @@
1
- import { C as withSpan, _ as setSpanAttributes } from "./logging-BzAk1S_s.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-CrT5nXbw.js";
1
+ import { C as withSpan, _ as setSpanAttributes } from "./logging-BMJzdDlP.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-T0tXE4zu.js";
3
3
  import { z } from "zod";
4
4
  import { FileSystem, Sandbox } from "@vercel/sandbox";
5
5
  //#region src/chat/sandbox/resources.ts
@@ -1,13 +1,13 @@
1
- import { p as authorizationId } from "./agent-CMyTD4DD.js";
2
- import { S as withLogContext, u as logException, y as setTags } from "./logging-BzAk1S_s.js";
1
+ import { p as authorizationId } from "./agent-D4nu8MQV.js";
2
+ import { S as withLogContext, u as logException, y as setTags } from "./logging-BMJzdDlP.js";
3
3
  import { t as credentialContextForActor } from "./context-B45_WqVX.js";
4
- import { Ct as getConversationEventStore, Tt as getConversationStore } from "./agent-hooks-Bbcp9e33.js";
5
- import { $ as persistConversationMessages, P as commitAcceptedReply, Q as hydrateConversationMessages, R as loadProjection, W as recordAuthorizationCompleted, d as persistWithRetry, dt as recordDeliveredAssistantMessage, it as buildConversationContext, jt as stripRuntimeTurnContext, lt as markConversationMessage, pt as upsertConversationMessage, r as saveTurnCheckpoint, ut as normalizeConversationText } from "./checkpoint-CNrPyRJN.js";
6
- import { S as startActiveTurn, s as getAssistantReplyText, x as markTurnFailed } from "./pending-auth-CWmSdZVg.js";
7
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-D-O3A-Cp.js";
8
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DQV19VTW.js";
9
- import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CRc9jTJS.js";
10
- import { d as buildDeliveredTurnStatePatch, r as finalizeFailedTurnReplyWithEvent, t as completeAuthPauseTurn } from "./auth-pause-state-DosEalIG.js";
4
+ import { Ct as getConversationEventStore, Tt as getConversationStore } from "./agent-hooks-DXHpTJ4m.js";
5
+ import { $ as persistConversationMessages, P as commitAcceptedReply, Q as hydrateConversationMessages, R as loadProjection, W as recordAuthorizationCompleted, d as persistWithRetry, dt as recordDeliveredAssistantMessage, it as buildConversationContext, jt as stripRuntimeTurnContext, lt as markConversationMessage, pt as upsertConversationMessage, r as saveTurnCheckpoint, ut as normalizeConversationText } from "./checkpoint-CrViJ8Ps.js";
6
+ import { S as startActiveTurn, s as getAssistantReplyText, x as markTurnFailed } from "./pending-auth-CUbXq06G.js";
7
+ import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-B2_mJZj0.js";
8
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-CcnwrOcp.js";
9
+ import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CqZ1m-es.js";
10
+ import { d as buildDeliveredTurnStatePatch, r as finalizeFailedTurnReplyWithEvent, t as completeAuthPauseTurn } from "./auth-pause-state-C2P3guS1.js";
11
11
  import { randomUUID } from "node:crypto";
12
12
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
13
13
  //#region src/chat/local/runner.ts
@@ -1,4 +1,4 @@
1
- import { Z as sandboxEgressSignalsResponseSchema } from "./agent-CMyTD4DD.js";
1
+ import { Z as sandboxEgressSignalsResponseSchema } from "./agent-D4nu8MQV.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,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { f as logWarn } from "./logging-BzAk1S_s.js";
2
+ import { f as logWarn } from "./logging-BMJzdDlP.js";
3
3
  import { s as skillRoots } from "./package-discovery-7a9YqLhE.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BReos-D4.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-CXw3asJD.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-DNb1A49M.js";
3
- import { n as createAndEnqueueAgentInvocation } from "./work-fGofI7Op.js";
2
+ import { C as toolInvocationDestination, y as actorFromRun } from "./agent-runner-C04colea.js";
3
+ import { n as createAndEnqueueAgentInvocation } from "./work-B91LQKHr.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 { i as getChatConfig } from "./config-nGCW1OTG.js";
2
- import { F as isRecord$1, I as toOptionalNumber, L as toOptionalString } from "./logging-BzAk1S_s.js";
1
+ import { i as getChatConfig } from "./config-BOtJQ7Pc.js";
2
+ import { F as isRecord$1, I as toOptionalNumber, L as toOptionalString } from "./logging-BMJzdDlP.js";
3
3
  import { _ as parseSlackMessageTs, d as parseStoredSlackActor, h as parseSlackTeamId, p as parseSlackChannelId } from "./context-B45_WqVX.js";
4
- import { B as getSlackClient, Bt as parseDestination, Et as getDb, G as withSlackRetries, Ht as sameDestination, Tt as getConversationStore, u as getPlugins, ut as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-Bbcp9e33.js";
4
+ import { B as getSlackClient, Bt as parseDestination, Et as getDb, G as withSlackRetries, Ht as sameDestination, Tt as getConversationStore, u as getPlugins, ut as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-DXHpTJ4m.js";
5
5
  import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
6
- import { C as juniorConversations, a as juniorSchedulerRuns, c as juniorStats, l as juniorEventTasks, o as juniorSchedulerTasks, x as juniorAttachments } from "./executor-DcMSlI5c.js";
7
- import { o as ToolInputError } from "./usage-D3EbSO7w.js";
8
- import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-CrT5nXbw.js";
6
+ import { C as juniorConversations, a as juniorSchedulerRuns, c as juniorStats, l as juniorEventTasks, o as juniorSchedulerTasks, x as juniorAttachments } from "./executor-BlUhFL7_.js";
7
+ import { o as ToolInputError } from "./usage-B5SfMb3H.js";
8
+ import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-T0tXE4zu.js";
9
9
  import "./vercel-queue-DIkVcfK4.js";
10
10
  import { z } from "zod";
11
11
  import { createHash, randomUUID } from "node:crypto";
@@ -1830,7 +1830,7 @@ async function resolveTaskOutcomes(outcomes, currentDestination, creatorSlackUse
1830
1830
  if (outcome.destination.channelId !== currentDestination.channelId) throw new Error("Messages can only be sent to the current Slack conversation or the task creator.");
1831
1831
  resolved.push({
1832
1832
  action: "send_message",
1833
- destination: outcome.destination
1833
+ destination: currentDestination
1834
1834
  });
1835
1835
  continue;
1836
1836
  }
@@ -1849,12 +1849,25 @@ async function resolveTaskOutcomes(outcomes, currentDestination, creatorSlackUse
1849
1849
  }
1850
1850
  return resolved;
1851
1851
  }
1852
- /** Return stored outcomes, or preserve the legacy message Destination. */
1852
+ function outcomeTargetsDestination(outcome, destination) {
1853
+ return outcome.destination.teamId === destination.teamId && outcome.destination.channelId === destination.channelId && (!outcome.destination.threadTs || outcome.destination.threadTs === destination.threadTs);
1854
+ }
1855
+ /** Return outcomes with legacy same-channel messages bound to the task Destination. */
1853
1856
  function effectiveTaskOutcomes(outcomes, destination) {
1854
- return outcomes ?? [{
1857
+ return (outcomes ?? [{
1855
1858
  action: "send_message",
1856
1859
  destination
1857
- }];
1860
+ }]).map((outcome) => destination.threadTs && outcomeTargetsDestination(outcome, destination) ? {
1861
+ ...outcome,
1862
+ destination
1863
+ } : outcome);
1864
+ }
1865
+ /** Move outcomes that target the task Destination and keep other outcomes unchanged. */
1866
+ function moveTaskOutcomes(outcomes, currentDestination, nextDestination) {
1867
+ return effectiveTaskOutcomes(outcomes, currentDestination).map((outcome) => outcomeTargetsDestination(outcome, currentDestination) ? {
1868
+ ...outcome,
1869
+ destination: nextDestination
1870
+ } : outcome);
1858
1871
  }
1859
1872
  //#endregion
1860
1873
  //#region src/chat/event-tasks/tool-support.ts
@@ -1909,7 +1922,8 @@ function requireEventTaskSlackContext(context) {
1909
1922
  destination: {
1910
1923
  platform: "slack",
1911
1924
  teamId: context.source.teamId,
1912
- channelId: context.source.channelId
1925
+ channelId: context.source.channelId,
1926
+ threadTs: context.source.threadTs ?? context.source.messageTs
1913
1927
  },
1914
1928
  source: context.source
1915
1929
  };
@@ -2631,4 +2645,4 @@ async function readStats(start, end) {
2631
2645
  return await getDb().select().from(juniorStats).where(and(gte(juniorStats.date, start), lte(juniorStats.date, end))).orderBy(asc(juniorStats.date), asc(juniorStats.namespace), asc(juniorStats.metric), asc(juniorStats.name));
2632
2646
  }
2633
2647
  //#endregion
2634
- export { workspaceSnapshotWatch as $, eventTaskTriggerAvailable as A, releaseConversationWork as At, deleteEventTask as B, isInvalidConversationRecordError as Bt, SCHEDULED_TASK_SYSTEM_ACTOR as C, ensureConversationWake as Ct, eventTaskMatchesDestination as D, listActiveConversationIds as Dt, eventTaskListToolResultSchema as E, hasRunnableConversationWork as Et, effectiveTaskOutcomes as F, stopConversationWork as Ft, listEventTasksCreatedBy as G, buildDeterministicTurnId as Gt, findMatchingEventTasks as H, juniorToolOutputSchema as Ht, resolveTaskOutcomes as I, CONVERSATION_WORK_CHECK_IN_INTERVAL_MS as It, saveEventTask as J, listEventTasksForTeam as K, taskOutcomeInputSchema as L, CONVERSATION_WORK_STALE_ENQUEUE_MS as Lt, requireEventTaskSlackContext as M, requestAnotherSlice as Mt, requireSupportedEventTaskTrigger as N, requestConversationWork as Nt, eventTaskSuccess as O, recordAttemptFailure as Ot, writableEventTask as P, startConversationWork as Pt, workspaceSnapshotFinishedEvent as Q, collectEventTaskMatchKeys as R, hasRunnableConversationWork$1 as Rt, withScheduledTaskLock as S, drainConversationMailbox as St, compactEventTask as T, getConversationWorkState as Tt, getEventTask as U, makeStructuredToolOutput as Ut, eventTaskBelongsToUser as V, injectContinuationToolName as Vt, listDeletedEventTasksCreatedBy as W, buildDeterministicAssistantMessageId as Wt, WORKSPACE_SNAPSHOT_FAILED_EVENT as X, getResourceEventCatalog as Y, WORKSPACE_SNAPSHOT_READY_EVENT as Z, parseScheduledTaskRow as _, clearExpiredConversationLease as _t, requestAttachmentDeletion as a, registeredEventTypeSchema as at, saveScheduledTaskInLock as b, countPendingConversationMessages as bt, parseSlackThreadId as c, requireSupportedResourceEventMatch as ct, resolveSlackChannelIdFromThreadId as d, appendAndEnqueueExclusiveInboundMessage as dt, eventNamespaceSchema as et, createScheduledTask as f, appendAndEnqueueInboundMessage as ft, listScheduledTasksForTeam as g, clearConsumedConversationWake as gt, listScheduledTasks as h, checkInConversationWork as ht, readLiveAttachment as i, pluginSupportsEvent as it, registeredEventTaskTriggerSchema as j, removeActiveConversation as jt, eventTaskToolResultSchema as k, recordConversationRetry as kt, readSlackRawMessageContext as l, resourceEventGuidance as lt, listPublicScheduledTasksForTeams as m, cancelHumanFacingPendingMessages as mt, readStats as n, hasResourceEventCatalogEntries as nt, storeAttachment as o, registeredResourceEventMatchSchema as ot, isListedScheduledTask as p, beginConversationResume as pt, listPublicEventTasksForTeams as q, collectAttachmentGarbage as r, normalizeEventIdentifier as rt, storeAttachments as s, registeredResourceTypeSchema as st, incrementStat as t, hasPluginResourceEventCatalogEntries as tt, resolveSlackChannelIdFromMessage as u, ackMessages as ut, readScheduledTask as v, completeConversationStop as vt, scheduledRunSchema as w, getConversation as wt, scheduledRunId as x, deadLetterAttempt as xt, saveScheduledTask as y, completeConversationWork as yt, createEventTask as z, isFinalAttempt as zt };
2648
+ export { workspaceSnapshotFinishedEvent as $, eventTaskTriggerAvailable as A, recordConversationRetry as At, createEventTask as B, isFinalAttempt as Bt, SCHEDULED_TASK_SYSTEM_ACTOR as C, drainConversationMailbox as Ct, eventTaskMatchesDestination as D, hasRunnableConversationWork as Dt, eventTaskListToolResultSchema as E, getConversationWorkState as Et, effectiveTaskOutcomes as F, startConversationWork as Ft, listDeletedEventTasksCreatedBy as G, buildDeterministicAssistantMessageId as Gt, eventTaskBelongsToUser as H, injectContinuationToolName as Ht, moveTaskOutcomes as I, stopConversationWork as It, listPublicEventTasksForTeams as J, listEventTasksCreatedBy as K, buildDeterministicTurnId as Kt, resolveTaskOutcomes as L, CONVERSATION_WORK_CHECK_IN_INTERVAL_MS as Lt, requireEventTaskSlackContext as M, removeActiveConversation as Mt, requireSupportedEventTaskTrigger as N, requestAnotherSlice as Nt, eventTaskSuccess as O, listActiveConversationIds as Ot, writableEventTask as P, requestConversationWork as Pt, WORKSPACE_SNAPSHOT_READY_EVENT as Q, taskOutcomeInputSchema as R, CONVERSATION_WORK_STALE_ENQUEUE_MS as Rt, withScheduledTaskLock as S, deadLetterAttempt as St, compactEventTask as T, getConversation as Tt, findMatchingEventTasks as U, juniorToolOutputSchema as Ut, deleteEventTask as V, isInvalidConversationRecordError as Vt, getEventTask as W, makeStructuredToolOutput as Wt, getResourceEventCatalog as X, saveEventTask as Y, WORKSPACE_SNAPSHOT_FAILED_EVENT as Z, parseScheduledTaskRow as _, clearConsumedConversationWake as _t, requestAttachmentDeletion as a, pluginSupportsEvent as at, saveScheduledTaskInLock as b, completeConversationWork as bt, parseSlackThreadId as c, registeredResourceTypeSchema as ct, resolveSlackChannelIdFromThreadId as d, ackMessages as dt, workspaceSnapshotWatch as et, createScheduledTask as f, appendAndEnqueueExclusiveInboundMessage as ft, listScheduledTasksForTeam as g, checkInConversationWork as gt, listScheduledTasks as h, cancelHumanFacingPendingMessages as ht, readLiveAttachment as i, normalizeEventIdentifier as it, registeredEventTaskTriggerSchema as j, releaseConversationWork as jt, eventTaskToolResultSchema as k, recordAttemptFailure as kt, readSlackRawMessageContext as l, requireSupportedResourceEventMatch as lt, listPublicScheduledTasksForTeams as m, beginConversationResume as mt, readStats as n, hasPluginResourceEventCatalogEntries as nt, storeAttachment as o, registeredEventTypeSchema as ot, isListedScheduledTask as p, appendAndEnqueueInboundMessage as pt, listEventTasksForTeam as q, collectAttachmentGarbage as r, hasResourceEventCatalogEntries as rt, storeAttachments as s, registeredResourceEventMatchSchema as st, incrementStat as t, eventNamespaceSchema as tt, resolveSlackChannelIdFromMessage as u, resourceEventGuidance as ut, readScheduledTask as v, clearExpiredConversationLease as vt, scheduledRunSchema as w, ensureConversationWake as wt, scheduledRunId as x, countPendingConversationMessages as xt, saveScheduledTask as y, completeConversationStop as yt, collectEventTaskMatchKeys as z, hasRunnableConversationWork$1 as zt };
@@ -1,6 +1,6 @@
1
- import { f as logWarn } from "./logging-BzAk1S_s.js";
1
+ import { f as logWarn } from "./logging-BMJzdDlP.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-Drn_LXlM.js";
3
+ import { o as runWithTurnRequestDeadline } from "./job-queue-DLMqIK74.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-D-O3A-Cp.js").then((n) => n.r);
113
+ const { processPluginTask } = await import("./task-runner-B2_mJZj0.js").then((n) => n.r);
114
114
  await processPluginTask(message);
115
115
  },
116
116
  topic: PLUGIN_TASK_QUEUE_TOPIC,
@@ -1,12 +1,12 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
2
  import { _ as parseSlackMessageTs, r as credentialSubjectSchema } from "./context-B45_WqVX.js";
3
- import { Et as getDb, Tt as getConversationStore, Y as readActorIdentity, _t as createPluginLogger, gt as createPluginModel, ht as createPluginEmbedder, mt as createPluginState, u as getPlugins, ut as JUNIOR_THREAD_STATE_TTL_MS, vt as createPluginConversationEvents } from "./agent-hooks-Bbcp9e33.js";
3
+ import { Et as getDb, Tt as getConversationStore, Y as readActorIdentity, _t as createPluginLogger, gt as createPluginModel, ht as createPluginEmbedder, mt as createPluginState, u as getPlugins, ut as JUNIOR_THREAD_STATE_TTL_MS, vt as createPluginConversationEvents } from "./agent-hooks-DXHpTJ4m.js";
4
4
  import { f as sameActorIdentity } from "./history-CqTuSAdI.js";
5
- import { Dt as isToolResultError, Ot as isToolResultMessage, Q as hydrateConversationMessages, bt as getPiMessageRole, jt as stripRuntimeTurnContext, kt as normalizeToolNameFromResult, s as getTurnRecord, wt as instructionTextForProjection } from "./checkpoint-CNrPyRJN.js";
6
- import { w as getStateAdapter } from "./profile-CrT5nXbw.js";
7
- import { u as recordTaskExecution } from "./execution-stats-DWfSihcH.js";
8
- import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CRc9jTJS.js";
9
- import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-CJIR4RF7.js";
5
+ import { Dt as isToolResultError, Ot as isToolResultMessage, Q as hydrateConversationMessages, bt as getPiMessageRole, jt as stripRuntimeTurnContext, kt as normalizeToolNameFromResult, s as getTurnRecord, wt as instructionTextForProjection } from "./checkpoint-CrViJ8Ps.js";
6
+ import { w as getStateAdapter } from "./profile-T0tXE4zu.js";
7
+ import { u as recordTaskExecution } from "./execution-stats-B6lgWxCK.js";
8
+ import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CqZ1m-es.js";
9
+ import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-CoXwd2eq.js";
10
10
  import { z } from "zod";
11
11
  import { createHash } from "node:crypto";
12
12
  import { destinationSchema, destinationVisibilitySchema, isSlackDestination, pluginRunContextSchema, replyAttributionSchema, sourceSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
@@ -345,7 +345,7 @@ function slackSourceForDestination(args) {
345
345
  * Reads parent Conversations when this Conversation has no Destination.
346
346
  */
347
347
  async function resolveConversationRouting(args) {
348
- const conversationStore = args.conversationStore ?? (await import("./agent-hooks-Bbcp9e33.js").then((n) => n.St)).getConversationStore();
348
+ const conversationStore = args.conversationStore ?? (await import("./agent-hooks-DXHpTJ4m.js").then((n) => n.St)).getConversationStore();
349
349
  const chain = await loadConversationChain(args.conversationId, conversationStore);
350
350
  let destination;
351
351
  let source;
@@ -1,9 +1,9 @@
1
- import { F as isRecord, I as toOptionalNumber, L as toOptionalString } from "./logging-BzAk1S_s.js";
2
- import { Et as getDb, ut as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-Bbcp9e33.js";
1
+ import { F as isRecord, I as toOptionalNumber, L as toOptionalString } from "./logging-BMJzdDlP.js";
2
+ import { Et as getDb, ut as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-DXHpTJ4m.js";
3
3
  import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
4
- import { u as juniorLocationConfigurations } from "./executor-DcMSlI5c.js";
5
- import { $ as persistConversationMessages } from "./checkpoint-CNrPyRJN.js";
6
- import { w as getStateAdapter } from "./profile-CrT5nXbw.js";
4
+ import { u as juniorLocationConfigurations } from "./executor-BlUhFL7_.js";
5
+ import { $ as persistConversationMessages } from "./checkpoint-CrViJ8Ps.js";
6
+ import { w as getStateAdapter } from "./profile-T0tXE4zu.js";
7
7
  import { z } from "zod";
8
8
  import { randomUUID } from "node:crypto";
9
9
  import { and, eq, sql } from "drizzle-orm";
@@ -1,6 +1,6 @@
1
- import { Ct as getConversationEventStore } from "./agent-hooks-Bbcp9e33.js";
2
- import { n as runAgentWithTimeout } from "./agent-runner-DNb1A49M.js";
3
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DQV19VTW.js";
1
+ import { Ct as getConversationEventStore } from "./agent-hooks-DXHpTJ4m.js";
2
+ import { n as runAgentWithTimeout } from "./agent-runner-C04colea.js";
3
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-CcnwrOcp.js";
4
4
  //#region src/chat/runtime/turn-execution.ts
5
5
  /** An error thrown while the agent advances a Run. */
6
6
  var AgentRunError = class extends Error {
@@ -1,4 +1,4 @@
1
- import { Ct as getConversationEventStore } from "./agent-hooks-Bbcp9e33.js";
1
+ import { Ct as getConversationEventStore } from "./agent-hooks-DXHpTJ4m.js";
2
2
  //#region src/chat/conversations/turn-lifecycle.ts
3
3
  /** Persist correlated turn lifecycle facts with retry-safe terminal exclusion. */
4
4
  var ConversationTurnLifecycleService = class {
@@ -1,5 +1,5 @@
1
- import { n as botConfig } from "./config-nGCW1OTG.js";
2
- import { f as logWarn } from "./logging-BzAk1S_s.js";
1
+ import { n as botConfig } from "./config-BOtJQ7Pc.js";
2
+ import { f as logWarn } from "./logging-BMJzdDlP.js";
3
3
  import { t as usageSchema } from "./usage-schema-CKaDkH_j.js";
4
4
  import { z } from "zod";
5
5
  import { conversationEventPresentationSchema, defineConversationEvent } from "@sentry/junior-plugin-api";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BReos-D4.js";
2
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-CXw3asJD.js";
3
3
  import { isDeepStrictEqual } from "node:util";
4
4
  //#region src/chat/plugins/validation.ts
5
5
  var validation_exports = /* @__PURE__ */ __exportAll({
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "0.204.0";
2
+ var version = "0.205.0";
3
3
  //#endregion
4
4
  //#region src/version.ts
5
5
  /** Installed Junior package version, or `unknown` when package metadata is unavailable. */
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as JUNIOR_VERSION } from "./version-DxcWdoKa.js";
1
+ import { t as JUNIOR_VERSION } from "./version-oD-oPrbO.js";
2
2
  export { JUNIOR_VERSION };
@@ -1,5 +1,5 @@
1
1
  import { a as getClient } from "./sentry-CD3SdJl-.js";
2
- import { w as getStateAdapter } from "./profile-CrT5nXbw.js";
2
+ import { w as getStateAdapter } from "./profile-T0tXE4zu.js";
3
3
  import { randomUUID } from "node:crypto";
4
4
  //#region src/chat/sentry-links.ts
5
5
  function getSentryOrgSlug() {
@@ -1,11 +1,11 @@
1
- import { o as getSlackBotToken } from "./config-nGCW1OTG.js";
2
- import { f as logWarn } from "./logging-BzAk1S_s.js";
3
- import { t as canExposeConversationPayload } from "./conversation-privacy-B4voFRSm.js";
1
+ import { o as getSlackBotToken } from "./config-BOtJQ7Pc.js";
2
+ import { f as logWarn } from "./logging-BMJzdDlP.js";
3
+ import { t as canExposeConversationPayload } from "./conversation-privacy-BZRA6Pes.js";
4
4
  import "./context-B45_WqVX.js";
5
- import { Et as getDb, Tt as getConversationStore, U as normalizeSlackConversationId } from "./agent-hooks-Bbcp9e33.js";
5
+ import { Et as getDb, Tt as getConversationStore, U as normalizeSlackConversationId } from "./agent-hooks-DXHpTJ4m.js";
6
6
  import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
7
- import { C as juniorConversations, T as juniorUsers, m as juniorConversationParticipants, w as juniorIdentities } from "./executor-DcMSlI5c.js";
8
- import { Gt as buildDeterministicTurnId, c as parseSlackThreadId, dt as appendAndEnqueueExclusiveInboundMessage, ft as appendAndEnqueueInboundMessage } from "./stats-DTUbAb88.js";
7
+ import { C as juniorConversations, T as juniorUsers, m as juniorConversationParticipants, w as juniorIdentities } from "./executor-BlUhFL7_.js";
8
+ import { Kt as buildDeterministicTurnId, c as parseSlackThreadId, ft as appendAndEnqueueExclusiveInboundMessage, pt as appendAndEnqueueInboundMessage } from "./stats-3YZn-Swi.js";
9
9
  import { t as healthReportSchema } from "./reporting-schema-DosTN__Q.js";
10
10
  import { z } from "zod";
11
11
  import { createHash } from "node:crypto";