@sentry/junior 0.219.0 → 0.221.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-DFeJ0yVy.js → agent-CFrfUdN5.js} +65 -71
  2. package/dist/{agent-hooks-CKaIOT4I.js → agent-hooks-kjLDY-Aa.js} +8 -8
  3. package/dist/{agent-runner-DifJddqY.js → agent-runner-DMMa36Zl.js} +5 -5
  4. package/dist/api/schema.d.ts +30 -0
  5. package/dist/api/schema.js +2 -2
  6. package/dist/api.js +80 -19
  7. package/dist/app.js +33 -160
  8. package/dist/{auth-pause-state-nAyuKldT.js → auth-pause-state-TdhAyYM4.js} +6 -6
  9. package/dist/{briefs-D2iu2JPg.js → briefs-CIN2DMSo.js} +4 -4
  10. package/dist/{catalog-runtime-v3x4peOv.js → catalog-runtime-D1v0KsgY.js} +1 -1
  11. package/dist/{checkpoint-Cc7ba7dw.js → checkpoint-B2-uc-1h.js} +7 -7
  12. package/dist/cli/chat.js +13 -13
  13. package/dist/cli/check.js +3 -3
  14. package/dist/cli/main.js +1 -1
  15. package/dist/cli/plugins.js +3 -3
  16. package/dist/cli/snapshot-create.js +3 -3
  17. package/dist/cli/upgrade.js +3 -3
  18. package/dist/{client-DVKLZG01.js → client-DIe9JhwF.js} +2 -2
  19. package/dist/{config-BXIOxlCK.js → config-0_JixokJ.js} +2 -2
  20. package/dist/{conversation-BpqLg4MM.js → conversation-BSRGzJmY.js} +1 -0
  21. package/dist/{conversation-privacy-8-WR4KBo.js → conversation-privacy-6NLCEkzx.js} +1 -1
  22. package/dist/{credential-sync-BOcckr3l.js → credential-sync-Dqg2o90r.js} +21 -21
  23. package/dist/{execution-stats-G61-pwq6.js → execution-stats-vnXVMVeu.js} +3 -3
  24. package/dist/{executor-D_aAfzGp.js → executor-CmZKtNpH.js} +1 -1
  25. package/dist/instrumentation.js +8 -6
  26. package/dist/{job-queue-DjgMEeqJ.js → job-queue-B1k3woMW.js} +1 -1
  27. package/dist/{logging-1iHJtqBM.js → logging-D2YJv_PA.js} +1 -1
  28. package/dist/nitro.js +3 -3
  29. package/dist/{oauth-callback-server-wwYSbTaU.js → oauth-callback-server-BQtO5l5M.js} +2 -2
  30. package/dist/{pending-auth-B2qOCIx1.js → pending-auth-DuSNoTpn.js} +2 -2
  31. package/dist/{profile-B4e6XN37.js → profile-C3TEFAVI.js} +4 -4
  32. package/dist/{prompt-DAoaq0CT.js → prompt-BkaHwBW0.js} +1 -1
  33. package/dist/{registry-C0DT9wqc.js → registry-Bp0kd2xe.js} +1 -1
  34. package/dist/{resolve-DugfbPdI.js → resolve-BABNNBLL.js} +2 -2
  35. package/dist/{runner-RE9Lp-M8.js → runner-Bvn90ijl.js} +10 -10
  36. package/dist/{sandbox-egress-signals-BqkV7azF.js → sandbox-egress-signals-DLfYAOiO.js} +1 -1
  37. package/dist/{schema-BMG8MJPJ.js → schema-YPJXVcOW.js} +1 -1
  38. package/dist/{short-title-C7tWtQQy.js → short-title-C2fM-ERl.js} +2 -2
  39. package/dist/{skills-B6OcxCOp.js → skills-D1otDVYp.js} +2 -2
  40. package/dist/{spawn-BmZvmNYc.js → spawn-C-fAS-Rk.js} +2 -2
  41. package/dist/{stats-BtMLD1n8.js → stats-BfUFTUrM.js} +33 -8
  42. package/dist/{task-queue-a2aXjkx2.js → task-queue-VdYCCwO0.js} +3 -3
  43. package/dist/{task-runner-Bg2trvKT.js → task-runner-6tzKHNbM.js} +8 -8
  44. package/dist/{thread-state-D4zlHEq1.js → thread-state-CD_fsyrM.js} +5 -5
  45. package/dist/{turn-execution-CgCTt4YP.js → turn-execution-eVhqozjK.js} +3 -3
  46. package/dist/{turn-lifecycle-ClF1kY55.js → turn-lifecycle-CxAtVANu.js} +1 -1
  47. package/dist/{validation-CGkLLzS9.js → validation-CMERqrCD.js} +1 -1
  48. package/dist/{version-CZfM8Kly.js → version-C8XFxpkQ.js} +1 -1
  49. package/dist/version.js +1 -1
  50. package/dist/{web-authorization-DCSwmiua.js → web-authorization-Dq2NDhY0.js} +1 -1
  51. package/dist/{web-input-CQrFGEv9.js → web-input-Bdh_rCZ7.js} +4 -4
  52. package/dist/{work-lRFwhKJe.js → work-DCwaUeWu.js} +9 -9
  53. package/dist/{worker-BV4FekSX.js → worker-grswNVoc.js} +5 -5
  54. package/migrations/0043_scheduled_automation_channel_destinations.sql +36 -0
  55. package/migrations/meta/0043_snapshot.json +3610 -0
  56. package/migrations/meta/_journal.json +8 -1
  57. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
- import { Gt as getDb, bt as createPluginLogger, d as setPlugins, f as validatePlugins } from "../agent-hooks-CKaIOT4I.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-v3x4peOv.js";
3
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-CGkLLzS9.js";
1
+ import { Gt as getDb, bt as createPluginLogger, d as setPlugins, f as validatePlugins } from "../agent-hooks-kjLDY-Aa.js";
2
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-D1v0KsgY.js";
3
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-CMERqrCD.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-v3x4peOv.js";
2
- import { S as disconnectStateAdapter, t as create } from "../profile-B4e6XN37.js";
3
- import { r as resolve } from "../resolve-DugfbPdI.js";
1
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-D1v0KsgY.js";
2
+ import { S as disconnectStateAdapter, t as create } from "../profile-C3TEFAVI.js";
3
+ import { r as resolve } from "../resolve-BABNNBLL.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 { a as getChatConfig } from "../config-BXIOxlCK.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-D_aAfzGp.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-C0DT9wqc.js";
1
+ import { a as getChatConfig } from "../config-0_JixokJ.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-CmZKtNpH.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-Bp0kd2xe.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-1iHJtqBM.js";
2
- import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-8-WR4KBo.js";
1
+ import { C as withSpan, f as logWarn, h as serializeGenAiAttribute, i as extractGenAiUsageAttributes, p as normalizeGenAiFinishReason, u as logException } from "./logging-D2YJv_PA.js";
2
+ import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-6NLCEkzx.js";
3
3
  import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
4
4
  import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
5
5
  import { createGatewayProvider } from "@ai-sdk/gateway";
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { o as resolveGatewayModel, w as toOptionalTrimmed } from "./client-DVKLZG01.js";
3
- import { f as logWarn } from "./logging-1iHJtqBM.js";
2
+ import { o as resolveGatewayModel, w as toOptionalTrimmed } from "./client-DIe9JhwF.js";
3
+ import { f as logWarn } from "./logging-D2YJv_PA.js";
4
4
  import { c as TURN_REASONING_LEVELS, l as parseTurnReasoningLevel, o as modelProfileSchema } from "./model-profile-CZmVoGdX.js";
5
5
  import { getModel } from "@earendil-works/pi-ai/compat";
6
6
  //#region src/chat/slack/emoji.ts
@@ -722,6 +722,7 @@ const conversationSummaryReportSchema = z.object({
722
722
  lastProgressAt: z.string(),
723
723
  surface: conversationSurfaceSchema,
724
724
  actorIdentity: actorIdentitySchema.optional(),
725
+ participants: z.array(actorIdentitySchema).optional(),
725
726
  archivedAt: z.string().datetime().nullable().optional(),
726
727
  channel: z.string().optional(),
727
728
  channelName: z.string().optional(),
@@ -1,4 +1,4 @@
1
- import { f as logWarn } from "./logging-1iHJtqBM.js";
1
+ import { f as logWarn } from "./logging-D2YJv_PA.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,28 +1,28 @@
1
- import { N as getMcpProviderErrorAttributes, X 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-DFeJ0yVy.js";
2
- import { m as escapeXml } from "./client-DVKLZG01.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-1iHJtqBM.js";
4
- import { a as getChatConfig, h as normalizeSlackEmojiName, n as botConfig, o as getRuntimeMetadata } from "./config-BXIOxlCK.js";
1
+ import { N as getMcpProviderErrorAttributes, X 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-CFrfUdN5.js";
2
+ import { m as escapeXml } from "./client-DIe9JhwF.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-D2YJv_PA.js";
4
+ import { a as getChatConfig, h as normalizeSlackEmojiName, n as botConfig, o as getRuntimeMetadata } from "./config-0_JixokJ.js";
5
5
  import { n as defaultModelId } from "./model-profile-CZmVoGdX.js";
6
6
  import { _ as parseSlackMessageTs, g as parseSlackUserId, l as isUserActor, s as createSlackResumeActor } from "./context-Bplcgypl.js";
7
- import { G as isDmChannel, H as getHeaderString, K as normalizeSlackConversationId, Kt as getSqlExecutor, Nt as buildSentryConversationUrl, U as getSlackClient, Wt as getConversationStore, cn as upsertLinkedIdentity, dn as requireSlackDestination, mt as getDashboardConversationLink, o as getPluginSlackConversationLink, sn as upsertIdentity, z as SlackActionError } from "./agent-hooks-CKaIOT4I.js";
7
+ import { G as isDmChannel, H as getHeaderString, K as normalizeSlackConversationId, Kt as getSqlExecutor, Nt as buildSentryConversationUrl, U as getSlackClient, Wt as getConversationStore, cn as upsertLinkedIdentity, dn as requireSlackDestination, mt as getDashboardConversationLink, o as getPluginSlackConversationLink, sn as upsertIdentity, z as SlackActionError } from "./agent-hooks-kjLDY-Aa.js";
8
8
  import { i as homeDir } from "./package-discovery-7a9YqLhE.js";
9
- import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-C0DT9wqc.js";
10
- import { n as pluginCatalogRuntime } from "./catalog-runtime-v3x4peOv.js";
11
- import { t as discoverSkills } from "./skills-B6OcxCOp.js";
12
- import { B as recordAuthenticationLinked, F as loadProjection, V as recordAuthorizationCompleted, Y as hydrateConversationMessages, ct as recordDeliveredAssistantMessage, d as persistWithRetry, i as abandonTurnRecord, j as commitAcceptedReply, lt as turnHasReply, m as buildTurnErrorResponse, n as loadTurnCheckpoint, o as failTurnRecord, ot as markConversationMessage, r as saveTurnCheckpoint, s as getTurnRecord, tt as buildConversationContext, u as recordTurnSummary } from "./checkpoint-Cc7ba7dw.js";
13
- import { E as acquireActiveLock, w as getStateAdapter } from "./profile-B4e6XN37.js";
14
- import { Pt as requestConversationWork, c as parseSlackThreadId, d as resolveSlackChannelIdFromThreadId, l as readSlackRawMessageContext, u as resolveSlackChannelIdFromMessage, wt as ensureConversationWake } from "./stats-BtMLD1n8.js";
15
- 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-B2qOCIx1.js";
16
- 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-DifJddqY.js";
9
+ import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-Bp0kd2xe.js";
10
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-D1v0KsgY.js";
11
+ import { t as discoverSkills } from "./skills-D1otDVYp.js";
12
+ import { B as recordAuthenticationLinked, F as loadProjection, V as recordAuthorizationCompleted, Y as hydrateConversationMessages, ct as recordDeliveredAssistantMessage, d as persistWithRetry, i as abandonTurnRecord, j as commitAcceptedReply, lt as turnHasReply, m as buildTurnErrorResponse, n as loadTurnCheckpoint, o as failTurnRecord, ot as markConversationMessage, r as saveTurnCheckpoint, s as getTurnRecord, tt as buildConversationContext, u as recordTurnSummary } from "./checkpoint-B2-uc-1h.js";
13
+ import { E as acquireActiveLock, w as getStateAdapter } from "./profile-C3TEFAVI.js";
14
+ import { Pt as requestConversationWork, c as parseSlackThreadId, d as resolveSlackChannelIdFromThreadId, l as readSlackRawMessageContext, u as resolveSlackChannelIdFromMessage, wt as ensureConversationWake } from "./stats-BfUFTUrM.js";
15
+ 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-DuSNoTpn.js";
16
+ 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-DMMa36Zl.js";
17
17
  import { t as getVercelConversationWorkQueue } from "./vercel-queue-DIkVcfK4.js";
18
- import { a as getTurnRequestDeadline } from "./job-queue-DjgMEeqJ.js";
19
- import { i as resolveTurnSessionRouting, n as scheduleSessionCompletedPluginTasks } from "./task-runner-Bg2trvKT.js";
20
- import { n as getTurnLifecycle } from "./turn-lifecycle-ClF1kY55.js";
21
- import { n as executeTurn, t as AgentRunError } from "./turn-execution-CgCTt4YP.js";
22
- import { c as configValueSchema, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-D4zlHEq1.js";
23
- 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-nAyuKldT.js";
18
+ import { a as getTurnRequestDeadline } from "./job-queue-B1k3woMW.js";
19
+ import { i as resolveTurnSessionRouting, n as scheduleSessionCompletedPluginTasks } from "./task-runner-6tzKHNbM.js";
20
+ import { n as getTurnLifecycle } from "./turn-lifecycle-CxAtVANu.js";
21
+ import { n as executeTurn, t as AgentRunError } from "./turn-execution-eVhqozjK.js";
22
+ import { c as configValueSchema, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-CD_fsyrM.js";
23
+ 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-TdhAyYM4.js";
24
24
  import { n as relayLocalOAuthCallback } from "./oauth-relay-CdCnu80W.js";
25
- import { n as deleteWebAuthorization } from "./web-authorization-DCSwmiua.js";
25
+ import { n as deleteWebAuthorization } from "./web-authorization-Dq2NDhY0.js";
26
26
  import path from "node:path";
27
27
  import { z } from "zod";
28
28
  import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
@@ -1152,7 +1152,7 @@ async function resumeSlackTurnInContext(args) {
1152
1152
  })) } : void 0
1153
1153
  }));
1154
1154
  } catch (error) {
1155
- logException(/* @__PURE__ */ new Error("Accepted assistant message persistence failed"), "slack.resume.assistant_message_post_delivery_persist.failed", { "error.type": error instanceof Error ? error.name : typeof error });
1155
+ logException(error, "slack.resume.assistant_message_post_delivery_persist.failed");
1156
1156
  }
1157
1157
  const dispatchId = savedRun.dispatch?.id;
1158
1158
  if (messageTs && dispatchId) try {
@@ -1,6 +1,6 @@
1
- import { f as logWarn } from "./logging-1iHJtqBM.js";
2
- import { Gt as getDb, nn as agentTurnTotalTokens, tn as agentTurnCostUsd } from "./agent-hooks-CKaIOT4I.js";
3
- import { E as juniorConversations, s as juniorAutomationExecutions } from "./executor-D_aAfzGp.js";
1
+ import { f as logWarn } from "./logging-D2YJv_PA.js";
2
+ import { Gt as getDb, nn as agentTurnTotalTokens, tn as agentTurnCostUsd } from "./agent-hooks-kjLDY-Aa.js";
3
+ import { E as juniorConversations, s as juniorAutomationExecutions } from "./executor-CmZKtNpH.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-BXIOxlCK.js";
2
+ import "./config-0_JixokJ.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-1iHJtqBM.js";
1
+ import { M as getDeploymentServiceVersion, N as getDeploymentTelemetryAttributes } from "./logging-D2YJv_PA.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-8-WR4KBo.js";
3
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-6NLCEkzx.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([
@@ -151,10 +151,12 @@ function initSentry() {
151
151
  beforeSendLog: scrubPrivateSentryLog,
152
152
  beforeSendSpan: withStreamedSpan(scrubPrivateSentrySpan),
153
153
  beforeSendTransaction: scrubPrivateSentryTransaction,
154
- integrations: [vercelAIIntegration({
155
- recordInputs: true,
156
- recordOutputs: true
157
- })]
154
+ integrations(defaultIntegrations) {
155
+ return [...defaultIntegrations, vercelAIIntegration({
156
+ recordInputs: true,
157
+ recordOutputs: true
158
+ })];
159
+ }
158
160
  });
159
161
  getGlobalScope().setAttributes(deploymentSpanAttributes);
160
162
  }
@@ -1,4 +1,4 @@
1
- import { a as getChatConfig } from "./config-BXIOxlCK.js";
1
+ import { a as getChatConfig } from "./config-0_JixokJ.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-CZfM8Kly.js";
2
+ import { t as JUNIOR_VERSION } from "./version-C8XFxpkQ.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.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-1iHJtqBM.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-D2YJv_PA.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-DjgMEeqJ.js";
4
+ import { t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-B1k3woMW.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-a2aXjkx2.js";
6
+ import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-VdYCCwO0.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 { X as createUserTokenStore } from "./agent-DFeJ0yVy.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-BOcckr3l.js";
1
+ import { X as createUserTokenStore } from "./agent-CFrfUdN5.js";
2
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Dqg2o90r.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 { g as extractAssistantText, i as abandonTurnRecord } from "./checkpoint-Cc7ba7dw.js";
2
- import { qt as buildDeterministicTurnId } from "./stats-BtMLD1n8.js";
1
+ import { g as extractAssistantText, i as abandonTurnRecord } from "./checkpoint-B2-uc-1h.js";
2
+ import { qt as buildDeterministicTurnId } from "./stats-BfUFTUrM.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,7 +1,7 @@
1
- import { w as toOptionalTrimmed } from "./client-DVKLZG01.js";
2
- import { _ as setSpanAttributes, v as setSpanStatus } from "./logging-1iHJtqBM.js";
3
- import { a as getChatConfig } from "./config-BXIOxlCK.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-v3x4peOv.js";
1
+ import { w as toOptionalTrimmed } from "./client-DIe9JhwF.js";
2
+ import { _ as setSpanAttributes, v as setSpanStatus } from "./logging-D2YJv_PA.js";
3
+ import { a as getChatConfig } from "./config-0_JixokJ.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-D1v0KsgY.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";
@@ -1,4 +1,4 @@
1
- import { M as conversationBriefSchema, N as parseBriefInput, j as briefOutcomeStatusSchema } from "./conversation-BpqLg4MM.js";
1
+ import { M as conversationBriefSchema, N as parseBriefInput, j as briefOutcomeStatusSchema } from "./conversation-BSRGzJmY.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-1iHJtqBM.js";
1
+ import { _ as setSpanAttributes, d as logInfo, f as logWarn } from "./logging-D2YJv_PA.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";
@@ -1,5 +1,5 @@
1
- import { C as withSpan, _ as setSpanAttributes } from "./logging-1iHJtqBM.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-B4e6XN37.js";
1
+ import { C as withSpan, _ as setSpanAttributes } from "./logging-D2YJv_PA.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-C3TEFAVI.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-DFeJ0yVy.js";
2
- import { S as withLogContext, u as logException, y as setTags } from "./logging-1iHJtqBM.js";
1
+ import { p as authorizationId } from "./agent-CFrfUdN5.js";
2
+ import { S as withLogContext, u as logException, y as setTags } from "./logging-D2YJv_PA.js";
3
3
  import { t as credentialContextForActor } from "./context-Bplcgypl.js";
4
- import { Ht as getConversationEventStore, Wt as getConversationStore } from "./agent-hooks-CKaIOT4I.js";
5
- 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-Cc7ba7dw.js";
6
- import { S as startActiveTurn, s as getAssistantReplyText, x as markTurnFailed } from "./pending-auth-B2qOCIx1.js";
7
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-Bg2trvKT.js";
8
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-ClF1kY55.js";
9
- import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-D4zlHEq1.js";
10
- import { d as buildDeliveredTurnStatePatch, r as finalizeFailedTurnReplyWithEvent, t as completeAuthPauseTurn } from "./auth-pause-state-nAyuKldT.js";
4
+ import { Ht as getConversationEventStore, Wt as getConversationStore } from "./agent-hooks-kjLDY-Aa.js";
5
+ 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-B2-uc-1h.js";
6
+ import { S as startActiveTurn, s as getAssistantReplyText, x as markTurnFailed } from "./pending-auth-DuSNoTpn.js";
7
+ import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-6tzKHNbM.js";
8
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-CxAtVANu.js";
9
+ import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CD_fsyrM.js";
10
+ import { d as buildDeliveredTurnStatePatch, r as finalizeFailedTurnReplyWithEvent, t as completeAuthPauseTurn } from "./auth-pause-state-TdhAyYM4.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
@@ -151,7 +151,7 @@ async function runLocalAgentTurnInContext(input, deps) {
151
151
  conversationId: input.conversationId
152
152
  }));
153
153
  } catch (error) {
154
- logException(/* @__PURE__ */ new Error("Accepted assistant message persistence failed"), "local.assistant.message_post_delivery_persist.failed", { "error.type": error instanceof Error ? error.name : typeof error });
154
+ logException(error, "local.assistant.message_post_delivery_persist.failed");
155
155
  }
156
156
  failureCode = "agent_run_failed";
157
157
  };
@@ -1,4 +1,4 @@
1
- import { Y as sandboxEgressSignalsResponseSchema } from "./agent-DFeJ0yVy.js";
1
+ import { Y as sandboxEgressSignalsResponseSchema } from "./agent-CFrfUdN5.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-BpqLg4MM.js";
2
+ import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-BSRGzJmY.js";
3
3
  import "./reporting-schema-DosTN__Q.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-1iHJtqBM.js";
2
- import { n as botConfig } from "./config-BXIOxlCK.js";
1
+ import { f as logWarn } from "./logging-D2YJv_PA.js";
2
+ import { n as botConfig } from "./config-0_JixokJ.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.",
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { f as logWarn } from "./logging-1iHJtqBM.js";
2
+ import { f as logWarn } from "./logging-D2YJv_PA.js";
3
3
  import { s as skillRoots } from "./package-discovery-7a9YqLhE.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-v3x4peOv.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-D1v0KsgY.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-DifJddqY.js";
3
- import { n as createAndEnqueueAgentInvocation } from "./work-lRFwhKJe.js";
2
+ import { C as toolInvocationDestination, y as actorFromRun } from "./agent-runner-DMMa36Zl.js";
3
+ import { n as createAndEnqueueAgentInvocation } from "./work-DCwaUeWu.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,10 +1,10 @@
1
- import { F as isRecord$1, I as toOptionalNumber, L as toOptionalString } from "./logging-1iHJtqBM.js";
2
- import { a as getChatConfig } from "./config-BXIOxlCK.js";
1
+ import { F as isRecord$1, I as toOptionalNumber, L as toOptionalString } from "./logging-D2YJv_PA.js";
2
+ import { a as getChatConfig } from "./config-0_JixokJ.js";
3
3
  import { _ as parseSlackMessageTs, d as parseStoredSlackActor, h as parseSlackTeamId, p as parseSlackChannelId } from "./context-Bplcgypl.js";
4
- import { Gt as getDb, J as withSlackRetries, U as getSlackClient, Wt as getConversationStore, fn as sameDestination, pt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, un as parseDestination } from "./agent-hooks-CKaIOT4I.js";
4
+ import { Gt as getDb, J as withSlackRetries, U as getSlackClient, Wt as getConversationStore, fn as sameDestination, pt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, un as parseDestination } from "./agent-hooks-kjLDY-Aa.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-D_aAfzGp.js";
7
- import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-B4e6XN37.js";
6
+ import { E as juniorConversations, a as juniorSchedulerRuns, c as juniorStats, l as juniorEventAutomations, o as juniorSchedulerTasks, w as juniorAttachments } from "./executor-CmZKtNpH.js";
7
+ import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-C3TEFAVI.js";
8
8
  import "./vercel-queue-DIkVcfK4.js";
9
9
  import { z } from "zod";
10
10
  import { createHash, randomUUID } from "node:crypto";
@@ -2060,6 +2060,12 @@ const scheduledAutomationExecutionActorSchema = z.object({
2060
2060
  platform: z.literal("system"),
2061
2061
  name: z.string()
2062
2062
  }).strict();
2063
+ /** Scheduled automations target a Slack conversation, never one message thread. */
2064
+ const scheduledAutomationDestinationSchema = slackDestinationSchema.omit({ threadTs: true });
2065
+ const scheduledAutomationOutcomeSchema = z.object({
2066
+ action: z.literal("send_message"),
2067
+ destination: scheduledAutomationDestinationSchema
2068
+ }).strict();
2063
2069
  /** Validate the current scheduled-automation domain shape. */
2064
2070
  const scheduledAutomationSchema = z.object({
2065
2071
  id: z.string(),
@@ -2077,7 +2083,7 @@ const scheduledAutomationSchema = z.object({
2077
2083
  creatorIdentityId: z.string(),
2078
2084
  /** Selects system credentials or task-bound creator credential delegation. */
2079
2085
  credentialMode: scheduledAutomationCredentialModeSchema,
2080
- destination: slackDestinationSchema,
2086
+ destination: scheduledAutomationDestinationSchema,
2081
2087
  executionActor: scheduledAutomationExecutionActorSchema.optional(),
2082
2088
  lastRunAtMs: z.number().optional(),
2083
2089
  nextRunAtMs: z.number().optional(),
@@ -2087,7 +2093,7 @@ const scheduledAutomationSchema = z.object({
2087
2093
  status: scheduledAutomationStatusSchema,
2088
2094
  statusReason: z.string().optional(),
2089
2095
  /** Explicit visible effects after successful work. An empty list is silent. */
2090
- outcomes: z.array(taskOutcomeSchema).max(5),
2096
+ outcomes: z.array(scheduledAutomationOutcomeSchema).max(5),
2091
2097
  task: z.object({ text: z.string() }).strict(),
2092
2098
  /** SQL-backed short display title generated from the task instruction. */
2093
2099
  title: z.string().optional(),
@@ -2118,6 +2124,8 @@ const retainedScheduledAutomationSchema = scheduledAutomationSchema.omit({
2118
2124
  creatorIdentityId: true,
2119
2125
  title: true
2120
2126
  }).extend({
2127
+ destination: slackDestinationSchema,
2128
+ outcomes: z.array(taskOutcomeSchema).max(5),
2121
2129
  status: z.enum([
2122
2130
  "active",
2123
2131
  "blocked",
@@ -2141,7 +2149,24 @@ function parseScheduledAutomationRow(row) {
2141
2149
  } : retained;
2142
2150
  const parsed = retainedScheduledAutomationSchema.safeParse(current);
2143
2151
  if (!parsed.success) return void 0;
2144
- const { status, version: _version, ...task } = parsed.data;
2152
+ const { status, version: _version, ...retainedTask } = parsed.data;
2153
+ const destination = {
2154
+ platform: "slack",
2155
+ teamId: retainedTask.destination.teamId,
2156
+ channelId: retainedTask.destination.channelId
2157
+ };
2158
+ const task = {
2159
+ ...retainedTask,
2160
+ destination,
2161
+ outcomes: retainedTask.outcomes.map((outcome) => ({
2162
+ ...outcome,
2163
+ destination: {
2164
+ platform: "slack",
2165
+ teamId: outcome.destination.teamId,
2166
+ channelId: outcome.destination.channelId
2167
+ }
2168
+ }))
2169
+ };
2145
2170
  const fallbackIdentity = row.creatorIdentityId === null ? z.string().safeParse(legacyCreatorIdentityId) : void 0;
2146
2171
  const creatorIdentityId = row.creatorIdentityId ?? (fallbackIdentity?.success ? fallbackIdentity.data : void 0);
2147
2172
  if (creatorIdentityId === void 0) return void 0;
@@ -1,6 +1,6 @@
1
- import { f as logWarn } from "./logging-1iHJtqBM.js";
1
+ import { f as logWarn } from "./logging-D2YJv_PA.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-DjgMEeqJ.js";
3
+ import { o as runWithTurnRequestDeadline } from "./job-queue-B1k3woMW.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-Bg2trvKT.js").then((n) => n.r);
113
+ const { processPluginTask } = await import("./task-runner-6tzKHNbM.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-Bplcgypl.js";
3
- import { At as createPluginConversationEvents, Gt as getDb, Q as readActorIdentity, Wt as getConversationStore, _t as createPluginState, bt as createPluginLogger, p as coreTaskRegistrations, pt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, vt as createPluginEmbedder, yt as createPluginModel } from "./agent-hooks-CKaIOT4I.js";
4
- import { G as sameActorIdentity } from "./conversation-BpqLg4MM.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-Cc7ba7dw.js";
6
- import { w as getStateAdapter } from "./profile-B4e6XN37.js";
7
- import { u as recordAutomationExecution } from "./execution-stats-G61-pwq6.js";
8
- import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-D4zlHEq1.js";
9
- import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-a2aXjkx2.js";
3
+ import { At as createPluginConversationEvents, Gt as getDb, Q as readActorIdentity, Wt as getConversationStore, _t as createPluginState, bt as createPluginLogger, p as coreTaskRegistrations, pt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, vt as createPluginEmbedder, yt as createPluginModel } from "./agent-hooks-kjLDY-Aa.js";
4
+ import { G as sameActorIdentity } from "./conversation-BSRGzJmY.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-B2-uc-1h.js";
6
+ import { w as getStateAdapter } from "./profile-C3TEFAVI.js";
7
+ import { u as recordAutomationExecution } from "./execution-stats-vnXVMVeu.js";
8
+ import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CD_fsyrM.js";
9
+ import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-VdYCCwO0.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-CKaIOT4I.js").then((n) => n.Vt)).getConversationStore();
348
+ const conversationStore = args.conversationStore ?? (await import("./agent-hooks-kjLDY-Aa.js").then((n) => n.Vt)).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-1iHJtqBM.js";
2
- import { Gt as getDb, pt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-CKaIOT4I.js";
1
+ import { F as isRecord, I as toOptionalNumber, L as toOptionalString } from "./logging-D2YJv_PA.js";
2
+ import { Gt as getDb, pt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-kjLDY-Aa.js";
3
3
  import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
4
- import { u as juniorLocationConfigurations } from "./executor-D_aAfzGp.js";
5
- import { X as persistConversationMessages } from "./checkpoint-Cc7ba7dw.js";
6
- import { w as getStateAdapter } from "./profile-B4e6XN37.js";
4
+ import { u as juniorLocationConfigurations } from "./executor-CmZKtNpH.js";
5
+ import { X as persistConversationMessages } from "./checkpoint-B2-uc-1h.js";
6
+ import { w as getStateAdapter } from "./profile-C3TEFAVI.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 { Ht as getConversationEventStore } from "./agent-hooks-CKaIOT4I.js";
2
- import { n as runAgentWithTimeout } from "./agent-runner-DifJddqY.js";
3
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-ClF1kY55.js";
1
+ import { Ht as getConversationEventStore } from "./agent-hooks-kjLDY-Aa.js";
2
+ import { n as runAgentWithTimeout } from "./agent-runner-DMMa36Zl.js";
3
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-CxAtVANu.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 { Ht as getConversationEventStore } from "./agent-hooks-CKaIOT4I.js";
1
+ import { Ht as getConversationEventStore } from "./agent-hooks-kjLDY-Aa.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
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { n as pluginCatalogRuntime } from "./catalog-runtime-v3x4peOv.js";
2
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-D1v0KsgY.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.219.0";
2
+ var version = "0.221.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-CZfM8Kly.js";
1
+ import { t as JUNIOR_VERSION } from "./version-C8XFxpkQ.js";
2
2
  export { JUNIOR_VERSION };
@@ -1,4 +1,4 @@
1
- import { w as getStateAdapter } from "./profile-B4e6XN37.js";
1
+ import { w as getStateAdapter } from "./profile-C3TEFAVI.js";
2
2
  import { randomUUID } from "node:crypto";
3
3
  //#region src/chat/conversations/web-authorization.ts
4
4
  const WEB_AUTHORIZATION_PREFIX = "junior:web_authorization:v1";
@@ -1,8 +1,8 @@
1
- import { f as logWarn } from "./logging-1iHJtqBM.js";
2
- import { s as getSlackBotToken } from "./config-BXIOxlCK.js";
1
+ import { f as logWarn } from "./logging-D2YJv_PA.js";
2
+ import { s as getSlackBotToken } from "./config-0_JixokJ.js";
3
3
  import "./context-Bplcgypl.js";
4
- import { K as normalizeSlackConversationId, Wt as getConversationStore } from "./agent-hooks-CKaIOT4I.js";
5
- import { c as parseSlackThreadId, ft as appendAndEnqueueExclusiveInboundMessage, pt as appendAndEnqueueInboundMessage, qt as buildDeterministicTurnId } from "./stats-BtMLD1n8.js";
4
+ import { K as normalizeSlackConversationId, Wt as getConversationStore } from "./agent-hooks-kjLDY-Aa.js";
5
+ import { c as parseSlackThreadId, ft as appendAndEnqueueExclusiveInboundMessage, pt as appendAndEnqueueInboundMessage, qt as buildDeterministicTurnId } from "./stats-BfUFTUrM.js";
6
6
  import { t as healthReportSchema } from "./reporting-schema-DosTN__Q.js";
7
7
  import { z } from "zod";
8
8
  import { createHash } from "node:crypto";
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { $ as AuthorizationFlowDisabledError, A as createAgentInvocationSchema, M as AgentInvocationLimitError, O as agentBindingSchema, f as PluginCredentialFailureError, j as AgentInvocationBusyError, k as agentInvocationSchema } from "./agent-DFeJ0yVy.js";
3
- import { Ht as getConversationEventStore, Kt as getSqlExecutor, Wt as getConversationStore } from "./agent-hooks-CKaIOT4I.js";
4
- import { f as juniorAgentBindings, p as juniorAgentInvocations } from "./executor-D_aAfzGp.js";
5
- import { L as openConversationProjection, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord, v as getTerminalAssistantMessages } from "./checkpoint-Cc7ba7dw.js";
6
- import { pt as appendAndEnqueueInboundMessage } from "./stats-BtMLD1n8.js";
7
- import { _ as isTurnInputCommitLostError, h as getConversationTurnBoundaryError, p as TurnInputCommitLostError, s as getAssistantReplyText } from "./pending-auth-B2qOCIx1.js";
8
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-ClF1kY55.js";
9
- import { n as executeTurn, t as AgentRunError } from "./turn-execution-CgCTt4YP.js";
10
- import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-D4zlHEq1.js";
2
+ import { $ as AuthorizationFlowDisabledError, A as createAgentInvocationSchema, M as AgentInvocationLimitError, O as agentBindingSchema, f as PluginCredentialFailureError, j as AgentInvocationBusyError, k as agentInvocationSchema } from "./agent-CFrfUdN5.js";
3
+ import { Ht as getConversationEventStore, Kt as getSqlExecutor, Wt as getConversationStore } from "./agent-hooks-kjLDY-Aa.js";
4
+ import { f as juniorAgentBindings, p as juniorAgentInvocations } from "./executor-CmZKtNpH.js";
5
+ import { L as openConversationProjection, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord, v as getTerminalAssistantMessages } from "./checkpoint-B2-uc-1h.js";
6
+ import { pt as appendAndEnqueueInboundMessage } from "./stats-BfUFTUrM.js";
7
+ import { _ as isTurnInputCommitLostError, h as getConversationTurnBoundaryError, p as TurnInputCommitLostError, s as getAssistantReplyText } from "./pending-auth-DuSNoTpn.js";
8
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-CxAtVANu.js";
9
+ import { n as executeTurn, t as AgentRunError } from "./turn-execution-eVhqozjK.js";
10
+ import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-CD_fsyrM.js";
11
11
  import { z } from "zod";
12
12
  import { createHash } from "node:crypto";
13
13
  import { and, asc, count, eq, inArray } from "drizzle-orm";