@sentry/junior 0.230.0 → 0.231.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 (48) hide show
  1. package/dist/{agent-hooks-Im1UUKhZ.js → agent-hooks-BxL23rrY.js} +6 -6
  2. package/dist/{agent-runner-B9dvsdM8.js → agent-runner-mpzfRAEr.js} +116 -111
  3. package/dist/api/schema.d.ts +2 -2
  4. package/dist/api.js +16 -16
  5. package/dist/app.js +20 -20
  6. package/dist/{briefs-BC3DPfsh.js → briefs-CTIZORAN.js} +2 -2
  7. package/dist/{catalog-runtime-Blx7IGY9.js → catalog-runtime-RSgQS4lp.js} +1 -1
  8. package/dist/{checkpoint-BDaS7x3C.js → checkpoint-Q4FG2BQc.js} +5 -5
  9. package/dist/cli/chat.js +13 -13
  10. package/dist/cli/check.js +3 -3
  11. package/dist/cli/main.js +1 -1
  12. package/dist/cli/plugins.js +3 -3
  13. package/dist/cli/snapshot-create.js +3 -3
  14. package/dist/cli/upgrade.js +3 -3
  15. package/dist/{client-DucHsb6b.js → client-Mj9HEEKf.js} +3 -2
  16. package/dist/{config-HqsfInxG.js → config-CkmcoWGB.js} +2 -2
  17. package/dist/{conversation-privacy-k2Ucs1Lg.js → conversation-privacy-DGj6F9tc.js} +1 -1
  18. package/dist/{credential-sync-DEF6P_Qr.js → credential-sync-CHL297BH.js} +13 -13
  19. package/dist/{executor-C-LEhjeD.js → executor-_eMyydh0.js} +1 -1
  20. package/dist/{images-owPAu3eq.js → images-D9gA15-3.js} +2 -2
  21. package/dist/instrumentation.js +2 -2
  22. package/dist/{job-queue-CpNnv-n1.js → job-queue-Dl1lTGqq.js} +1 -1
  23. package/dist/{logging-BO1fVUQe.js → logging-9VpmxvdL.js} +1 -1
  24. package/dist/nitro.js +3 -3
  25. package/dist/{oauth-authorization-DPPpHxSI.js → oauth-authorization-DYZeyL50.js} +1 -1
  26. package/dist/{oauth-callback-server-BvVXBrQt.js → oauth-callback-server-BcVrxzcd.js} +2 -2
  27. package/dist/{pending-auth-BWgfMCZE.js → pending-auth-mB93uu9V.js} +1 -1
  28. package/dist/{profile-DpHUuqjR.js → profile-CK1KKKfj.js} +4 -4
  29. package/dist/{registry-CIi9NkkR.js → registry-BzD2Rftl.js} +1 -1
  30. package/dist/{resolve-SohTTVYa.js → resolve-C3UI1gHN.js} +2 -2
  31. package/dist/{runner-JhOJ60On.js → runner-BETWa1Bq.js} +8 -8
  32. package/dist/{sandbox-egress-signals-DyO-LeUT.js → sandbox-egress-signals-pjWtc_9b.js} +1 -1
  33. package/dist/{skills-DElnSC0r.js → skills-B5o4x78h.js} +2 -2
  34. package/dist/{spawn-DrH6CP9W.js → spawn-pwMuB53X.js} +2 -2
  35. package/dist/{task-queue-BEzJHMbQ.js → task-queue-Bb71mssX.js} +3 -3
  36. package/dist/{task-runner-DrC1UgCK.js → task-runner-DkaEXCEP.js} +8 -8
  37. package/dist/{thread-state-BIXM2uhZ.js → thread-state-HHHiwpYG.js} +5 -5
  38. package/dist/{turn-failure-response-9Ql2NYKh.js → turn-failure-response-CtWGQ0fz.js} +7 -7
  39. package/dist/{turn-lifecycle-_YDXUFqj.js → turn-lifecycle-Cosdai_3.js} +1 -1
  40. package/dist/{turn-session-routing-DYxwlqQl.js → turn-session-routing-DDo6JGTB.js} +1 -1
  41. package/dist/{validation-_gPdrVG7.js → validation-DoceK2VV.js} +1 -1
  42. package/dist/{version-Y7rGnMXG.js → version-wZ8kdUu1.js} +1 -1
  43. package/dist/version.js +1 -1
  44. package/dist/{web-authorization-COF8MUa5.js → web-authorization-C1coqBWn.js} +6 -6
  45. package/dist/{web-input-BmLFoSUw.js → web-input-clQr4P53.js} +20 -20
  46. package/dist/{work-CP3L3bNf.js → work-BW27hKZB.js} +7 -7
  47. package/dist/{worker-DlZMqtCm.js → worker-DQ-0LzAC.js} +5 -5
  48. package/package.json +5 -4
package/dist/cli/chat.js CHANGED
@@ -1,4 +1,4 @@
1
- import { s as executeAgentRun, t as createAgentRunner } from "../agent-runner-B9dvsdM8.js";
1
+ import { s as executeAgentRun, t as createAgentRunner } from "../agent-runner-mpzfRAEr.js";
2
2
  import { t as loadAppPluginSet } from "../plugin-module-BKGOXca2.js";
3
3
  import path from "node:path";
4
4
  import { createHash, randomUUID } from "node:crypto";
@@ -100,10 +100,10 @@ async function loadLocalPluginSet() {
100
100
  async function configureLocalChatPlugins(pluginSet) {
101
101
  const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
102
102
  import("../plugins-egKWjgue.js").then((n) => n.o),
103
- import("../agent-hooks-Im1UUKhZ.js").then((n) => n.t),
104
- import("../catalog-runtime-Blx7IGY9.js").then((n) => n.t),
105
- import("../validation-_gPdrVG7.js").then((n) => n.r),
106
- import("../agent-hooks-Im1UUKhZ.js").then((n) => n.Xt)
103
+ import("../agent-hooks-BxL23rrY.js").then((n) => n.t),
104
+ import("../catalog-runtime-RSgQS4lp.js").then((n) => n.t),
105
+ import("../validation-DoceK2VV.js").then((n) => n.r),
106
+ import("../agent-hooks-BxL23rrY.js").then((n) => n.Xt)
107
107
  ]);
108
108
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
109
109
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -153,18 +153,18 @@ function localDevServerUrl() {
153
153
  async function prepareLocalChatRun(io, pluginSet) {
154
154
  defaultStateAdapterForLocalChat();
155
155
  await configureLocalChatPlugins(pluginSet);
156
- const { setExperimentalFeatures } = await import("../agent-runner-B9dvsdM8.js").then((n) => n.r);
156
+ const { setExperimentalFeatures } = await import("../agent-runner-mpzfRAEr.js").then((n) => n.r);
157
157
  setExperimentalFeatures({ subagents: true });
158
- const { setBriefsConfig } = await import("../agent-hooks-Im1UUKhZ.js").then((n) => n.m);
158
+ const { setBriefsConfig } = await import("../agent-hooks-BxL23rrY.js").then((n) => n.m);
159
159
  setBriefsConfig({ enabled: true });
160
- const { runLocalAgentTurn } = await import("../runner-JhOJ60On.js");
161
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BvVXBrQt.js");
160
+ const { runLocalAgentTurn } = await import("../runner-BETWa1Bq.js");
161
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BcVrxzcd.js");
162
162
  const { createLocalOAuthState } = await import("../oauth-relay-CdCnu80W.js").then((n) => n.t);
163
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-DyO-LeUT.js");
164
- const { bindSpawnAgent } = await import("../spawn-DrH6CP9W.js").then((n) => n.n);
165
- const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-CP3L3bNf.js").then((n) => n.a);
163
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-pjWtc_9b.js");
164
+ const { bindSpawnAgent } = await import("../spawn-pwMuB53X.js").then((n) => n.n);
165
+ const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-BW27hKZB.js").then((n) => n.a);
166
166
  const { createLocalConversationWork } = await import("../conversation-work-C6y3T5Hx.js");
167
- const { processConversationWork } = await import("../worker-DlZMqtCm.js").then((n) => n.n);
167
+ const { processConversationWork } = await import("../worker-DQ-0LzAC.js").then((n) => n.n);
168
168
  let agentRunner;
169
169
  const localConversationWork = createLocalConversationWork(async (message) => {
170
170
  if (!agentRunner) throw new Error("Local agent runner is not ready");
package/dist/cli/check.js CHANGED
@@ -1,6 +1,6 @@
1
- import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-BO1fVUQe.js";
2
- import { f as parseInlinePluginManifest, p as parsePluginManifest } from "../registry-CIi9NkkR.js";
3
- import { i as parseSkillFile } from "../skills-DElnSC0r.js";
1
+ import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-9VpmxvdL.js";
2
+ import { f as parseInlinePluginManifest, p as parsePluginManifest } from "../registry-BzD2Rftl.js";
3
+ import { i as parseSkillFile } from "../skills-B5o4x78h.js";
4
4
  import { pathToFileURL } from "node:url";
5
5
  import path from "node:path";
6
6
  import fs from "node:fs/promises";
package/dist/cli/main.js CHANGED
@@ -25,7 +25,7 @@ async function runChat(argv, pluginSet) {
25
25
  return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
26
26
  }
27
27
  async function runBriefs(argv) {
28
- return await (await import("../briefs-BC3DPfsh.js")).runBriefs(argv);
28
+ return await (await import("../briefs-CTIZORAN.js")).runBriefs(argv);
29
29
  }
30
30
  function topLevelCommand(argv) {
31
31
  return (argv[0] === "--" ? argv.slice(1) : argv)[0];
@@ -1,6 +1,6 @@
1
- import { Ct as createPluginLogger, d as setPlugins, en as getDb, f as validatePlugins } from "../agent-hooks-Im1UUKhZ.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-Blx7IGY9.js";
3
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-_gPdrVG7.js";
1
+ import { Ct as createPluginLogger, d as setPlugins, en as getDb, f as validatePlugins } from "../agent-hooks-BxL23rrY.js";
2
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-RSgQS4lp.js";
3
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DoceK2VV.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-Blx7IGY9.js";
2
- import { S as disconnectStateAdapter, t as create } from "../profile-DpHUuqjR.js";
3
- import { r as resolve } from "../resolve-SohTTVYa.js";
1
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-RSgQS4lp.js";
2
+ import { S as disconnectStateAdapter, t as create } from "../profile-CK1KKKfj.js";
3
+ import { r as resolve } from "../resolve-C3UI1gHN.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-HqsfInxG.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-C-LEhjeD.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-CIi9NkkR.js";
1
+ import { a as getChatConfig } from "../config-CkmcoWGB.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-_eMyydh0.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-BzD2Rftl.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 { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-BO1fVUQe.js";
2
- import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-k2Ucs1Lg.js";
1
+ import { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-9VpmxvdL.js";
2
+ import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-DGj6F9tc.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";
@@ -476,6 +476,7 @@ async function completeText(params) {
476
476
  temperature: params.temperature,
477
477
  maxTokens: params.maxTokens,
478
478
  reasoning: params.thinkingLevel,
479
+ cacheRetention: params.cacheRetention,
479
480
  signal: params.signal,
480
481
  metadata: params.metadata
481
482
  });
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-DucHsb6b.js";
3
- import { p as logWarn } from "./logging-BO1fVUQe.js";
2
+ import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-Mj9HEEKf.js";
3
+ import { p as logWarn } from "./logging-9VpmxvdL.js";
4
4
  import { l as TURN_REASONING_LEVELS, s as modelProfileSchema, t as DEFAULT_MODEL_PROFILES, u as parseTurnReasoningLevel } from "./model-profile-BwU8mqwD.js";
5
5
  //#region src/chat/slack/emoji.ts
6
6
  const SLACK_EMOJI_NAME_RE = /^(?:[a-z0-9_+-]+)(?:::(?:skin-tone-[2-6]))?$/;
@@ -1,4 +1,4 @@
1
- import { p as logWarn } from "./logging-BO1fVUQe.js";
1
+ import { p as logWarn } from "./logging-9VpmxvdL.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,18 +1,18 @@
1
- import { Cn as createUserTokenStore, T as lookupSlackUserProfile, _ as putMcpStoredOAuthCredentials, d as deleteMcpAuthSession, dn as resolveBaseUrl, ft as getMcpProviderErrorAttributes, g as getMcpStoredOAuthCredentials, h as getMcpAuthSession, ln as formatProviderLabel, u as finalizeMcpAuthorization, un as parseOAuthStatePayload, x as resolvePluginOAuthAccount, yn as postSlackMessage } from "./agent-runner-B9dvsdM8.js";
2
- import { f as escapeXml } from "./client-DucHsb6b.js";
3
- import { d as logException, h as runBestEffort, p as logWarn } from "./logging-BO1fVUQe.js";
4
- import { n as botConfig, o as getRuntimeMetadata } from "./config-HqsfInxG.js";
1
+ import { Cn as createUserTokenStore, T as lookupSlackUserProfile, _ as putMcpStoredOAuthCredentials, d as deleteMcpAuthSession, dn as resolveBaseUrl, ft as getMcpProviderErrorAttributes, g as getMcpStoredOAuthCredentials, h as getMcpAuthSession, ln as formatProviderLabel, u as finalizeMcpAuthorization, un as parseOAuthStatePayload, x as resolvePluginOAuthAccount, yn as postSlackMessage } from "./agent-runner-mpzfRAEr.js";
2
+ import { f as escapeXml } from "./client-Mj9HEEKf.js";
3
+ import { d as logException, h as runBestEffort, p as logWarn } from "./logging-9VpmxvdL.js";
4
+ import { n as botConfig, o as getRuntimeMetadata } from "./config-CkmcoWGB.js";
5
5
  import { g as parseSlackUserId } from "./context-0Et9iVSB.js";
6
- import { U as getSlackClient, gn as upsertLinkedIdentity, hn as upsertIdentity, tn as getSqlExecutor } from "./agent-hooks-Im1UUKhZ.js";
6
+ import { U as getSlackClient, gn as upsertLinkedIdentity, hn as upsertIdentity, tn as getSqlExecutor } from "./agent-hooks-BxL23rrY.js";
7
7
  import { i as homeDir } from "./package-discovery-7a9YqLhE.js";
8
- import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-CIi9NkkR.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Blx7IGY9.js";
10
- import { t as discoverSkills } from "./skills-DElnSC0r.js";
11
- import { B as recordAuthorizationCompleted, s as getTurnRecord, z as recordAuthenticationLinked } from "./checkpoint-BDaS7x3C.js";
12
- import { E as acquireActiveLock, w as getStateAdapter } from "./profile-DpHUuqjR.js";
13
- import { i as getConversationPendingAuth } from "./pending-auth-BWgfMCZE.js";
14
- import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BIXM2uhZ.js";
15
- import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-COF8MUa5.js";
8
+ import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-BzD2Rftl.js";
9
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-RSgQS4lp.js";
10
+ import { t as discoverSkills } from "./skills-B5o4x78h.js";
11
+ import { B as recordAuthorizationCompleted, s as getTurnRecord, z as recordAuthenticationLinked } from "./checkpoint-Q4FG2BQc.js";
12
+ import { E as acquireActiveLock, w as getStateAdapter } from "./profile-CK1KKKfj.js";
13
+ import { i as getConversationPendingAuth } from "./pending-auth-mB93uu9V.js";
14
+ import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-HHHiwpYG.js";
15
+ import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-C1coqBWn.js";
16
16
  import { n as relayLocalOAuthCallback } from "./oauth-relay-CdCnu80W.js";
17
17
  import path from "node:path";
18
18
  import { z } from "zod";
@@ -1,5 +1,5 @@
1
1
  import { g as startSpanManual } from "./sentry-CgWZM_kV.js";
2
- import "./config-HqsfInxG.js";
2
+ import "./config-CkmcoWGB.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
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { j as storeAttachment, k as readLiveAttachment } from "./agent-runner-B9dvsdM8.js";
3
- import { tn as getSqlExecutor } from "./agent-hooks-Im1UUKhZ.js";
2
+ import { j as storeAttachment, k as readLiveAttachment } from "./agent-runner-mpzfRAEr.js";
3
+ import { tn as getSqlExecutor } from "./agent-hooks-BxL23rrY.js";
4
4
  import "./conversation-DsuDtoYR.js";
5
5
  //#region src/chat/attachments/images.ts
6
6
  var images_exports = /* @__PURE__ */ __exportAll({
@@ -1,6 +1,6 @@
1
- import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-BO1fVUQe.js";
1
+ import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-9VpmxvdL.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-k2Ucs1Lg.js";
3
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-DGj6F9tc.js";
4
4
  import { t as consumePrivateTraceResultMarker } from "./private-trace-result-BLvBjy_e.js";
5
5
  //#region src/chat/sentry-payload-filter.ts
6
6
  const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
@@ -1,4 +1,4 @@
1
- import { a as getChatConfig } from "./config-HqsfInxG.js";
1
+ import { a as getChatConfig } from "./config-CkmcoWGB.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  import { z } from "zod";
4
4
  import { createHash, createHmac, timingSafeEqual } from "node:crypto";
@@ -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-Y7rGnMXG.js";
2
+ import { t as JUNIOR_VERSION } from "./version-wZ8kdUu1.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,8 +1,8 @@
1
- import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-BO1fVUQe.js";
1
+ import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-9VpmxvdL.js";
2
2
  import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-7a9YqLhE.js";
3
- import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-CpNnv-n1.js";
3
+ import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-Dl1lTGqq.js";
4
4
  import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-egKWjgue.js";
5
- import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-BEzJHMbQ.js";
5
+ import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-Bb71mssX.js";
6
6
  import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-BKGOXca2.js";
7
7
  import path from "node:path";
8
8
  import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
@@ -1,4 +1,4 @@
1
- import { h as extractAssistantText } from "./checkpoint-BDaS7x3C.js";
1
+ import { h as extractAssistantText } from "./checkpoint-Q4FG2BQc.js";
2
2
  //#region src/chat/runtime/turn.ts
3
3
  /** Classified Slack turn failure carrying the owning Sentry capture outward. */
4
4
  var ConversationTurnBoundaryError = class extends Error {
@@ -1,5 +1,5 @@
1
- import { Cn as createUserTokenStore } from "./agent-runner-B9dvsdM8.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DEF6P_Qr.js";
1
+ import { Cn as createUserTokenStore } from "./agent-runner-mpzfRAEr.js";
2
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-CHL297BH.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,4 +1,4 @@
1
- import { i as abandonTurnRecord } from "./checkpoint-BDaS7x3C.js";
1
+ import { i as abandonTurnRecord } from "./checkpoint-Q4FG2BQc.js";
2
2
  //#region src/chat/state/turn-id.ts
3
3
  /** Build a stable turn identifier from a message ID. */
4
4
  function buildDeterministicTurnId(messageId) {
@@ -1,7 +1,7 @@
1
- import { S as toOptionalTrimmed } from "./client-DucHsb6b.js";
2
- import { v as setSpanAttributes, y as setSpanStatus } from "./logging-BO1fVUQe.js";
3
- import { a as getChatConfig } from "./config-HqsfInxG.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Blx7IGY9.js";
1
+ import { S as toOptionalTrimmed } from "./client-Mj9HEEKf.js";
2
+ import { v as setSpanAttributes, y as setSpanStatus } from "./logging-9VpmxvdL.js";
3
+ import { a as getChatConfig } from "./config-CkmcoWGB.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-RSgQS4lp.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 { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-BO1fVUQe.js";
1
+ import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-9VpmxvdL.js";
2
2
  import { i as credentialUserSubjectId } from "./context-0Et9iVSB.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 { v as setSpanAttributes, w as withSpan } from "./logging-BO1fVUQe.js";
2
- import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-DpHUuqjR.js";
1
+ import { v as setSpanAttributes, w as withSpan } from "./logging-9VpmxvdL.js";
2
+ import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-CK1KKKfj.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 { C as withLogContext, b as setTags, d as logException } from "./logging-BO1fVUQe.js";
1
+ import { C as withLogContext, b as setTags, d as logException } from "./logging-9VpmxvdL.js";
2
2
  import { t as credentialContextForActor } from "./context-0Et9iVSB.js";
3
- import { $t as getConversationStore, Zt as getConversationEventStore } from "./agent-hooks-Im1UUKhZ.js";
3
+ import { $t as getConversationStore, Zt as getConversationEventStore } from "./agent-hooks-BxL23rrY.js";
4
4
  import { V as messageCardText } from "./conversation-DsuDtoYR.js";
5
- import { A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, P as loadProjection, Y as persistConversationMessages, ct as markConversationMessage, ft as upsertConversationMessage, lt as normalizeConversationText, r as saveTurnCheckpoint, rt as buildConversationContext, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-BDaS7x3C.js";
6
- import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-DPPpHxSI.js";
7
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-DrC1UgCK.js";
8
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-_YDXUFqj.js";
9
- import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BIXM2uhZ.js";
10
- import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-9Ql2NYKh.js";
5
+ import { A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, P as loadProjection, Y as persistConversationMessages, ct as markConversationMessage, ft as upsertConversationMessage, lt as normalizeConversationText, r as saveTurnCheckpoint, rt as buildConversationContext, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-Q4FG2BQc.js";
6
+ import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-DYZeyL50.js";
7
+ import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-DkaEXCEP.js";
8
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-Cosdai_3.js";
9
+ import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-HHHiwpYG.js";
10
+ import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-CtWGQ0fz.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 { cn as sandboxEgressSignalsResponseSchema } from "./agent-runner-B9dvsdM8.js";
1
+ import { cn as sandboxEgressSignalsResponseSchema } from "./agent-runner-mpzfRAEr.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 { p as logWarn } from "./logging-BO1fVUQe.js";
2
+ import { p as logWarn } from "./logging-9VpmxvdL.js";
3
3
  import { s as skillRoots } from "./package-discovery-7a9YqLhE.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Blx7IGY9.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-RSgQS4lp.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 { Dn as toolInvocationDestination, En as actorFromRun } from "./agent-runner-B9dvsdM8.js";
3
- import { n as createAndEnqueueAgentInvocation } from "./work-CP3L3bNf.js";
2
+ import { Dn as toolInvocationDestination, En as actorFromRun } from "./agent-runner-mpzfRAEr.js";
3
+ import { n as createAndEnqueueAgentInvocation } from "./work-BW27hKZB.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,5 +1,5 @@
1
- import { p as logWarn } from "./logging-BO1fVUQe.js";
2
- import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as createVercelQueueClient, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-CpNnv-n1.js";
1
+ import { p as logWarn } from "./logging-9VpmxvdL.js";
2
+ import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as createVercelQueueClient, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-Dl1lTGqq.js";
3
3
  import { z } from "zod";
4
4
  import { createHash } from "node:crypto";
5
5
  import { handleCallback, registerDevConsumer } from "@vercel/queue";
@@ -109,7 +109,7 @@ function pluginTaskCallback() {
109
109
  maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
110
110
  onRejected: logPluginTaskQueueMessageRejected,
111
111
  run: async (message) => {
112
- const { processPluginTask } = await import("./task-runner-DrC1UgCK.js").then((n) => n.r);
112
+ const { processPluginTask } = await import("./task-runner-DkaEXCEP.js").then((n) => n.r);
113
113
  await processPluginTask(message);
114
114
  },
115
115
  topic: PLUGIN_TASK_QUEUE_TOPIC,
@@ -1,14 +1,14 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { p as logWarn } from "./logging-BO1fVUQe.js";
2
+ import { p as logWarn } from "./logging-9VpmxvdL.js";
3
3
  import { b as parseSlackMessageTs, r as credentialSubjectSchema } from "./context-0Et9iVSB.js";
4
- import { $t as getConversationStore, Ct as createPluginLogger, Nt as createPluginConversationEvents, Q as readActorIdentity, St as createPluginModel, bt as createPluginState, en as getDb, ht as JUNIOR_THREAD_STATE_TTL_MS, ln as agentTurnCostUsd, p as coreTaskRegistrations, u as getPlugins, un as agentTurnTotalTokens, xt as createPluginEmbedder } from "./agent-hooks-Im1UUKhZ.js";
5
- import { E as juniorConversations, s as juniorAutomationExecutions } from "./executor-C-LEhjeD.js";
4
+ import { $t as getConversationStore, Ct as createPluginLogger, Nt as createPluginConversationEvents, Q as readActorIdentity, St as createPluginModel, bt as createPluginState, en as getDb, ht as JUNIOR_THREAD_STATE_TTL_MS, ln as agentTurnCostUsd, p as coreTaskRegistrations, u as getPlugins, un as agentTurnTotalTokens, xt as createPluginEmbedder } from "./agent-hooks-BxL23rrY.js";
5
+ import { E as juniorConversations, s as juniorAutomationExecutions } from "./executor-_eMyydh0.js";
6
6
  import { rt as sameActorIdentity } from "./conversation-DsuDtoYR.js";
7
- import { C as isToolResultError, D as stripRuntimeTurnContext, J as hydrateConversationMessages, T as normalizeToolNameFromResult, b as instructionTextForProjection, g as getPiMessageRole, s as getTurnRecord, w as isToolResultMessage } from "./checkpoint-BDaS7x3C.js";
8
- import { w as getStateAdapter } from "./profile-DpHUuqjR.js";
9
- import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BIXM2uhZ.js";
10
- import { t as resolveConversationRouting } from "./turn-session-routing-DYxwlqQl.js";
11
- import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-BEzJHMbQ.js";
7
+ import { C as isToolResultError, D as stripRuntimeTurnContext, J as hydrateConversationMessages, T as normalizeToolNameFromResult, b as instructionTextForProjection, g as getPiMessageRole, s as getTurnRecord, w as isToolResultMessage } from "./checkpoint-Q4FG2BQc.js";
8
+ import { w as getStateAdapter } from "./profile-CK1KKKfj.js";
9
+ import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-HHHiwpYG.js";
10
+ import { t as resolveConversationRouting } from "./turn-session-routing-DDo6JGTB.js";
11
+ import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-Bb71mssX.js";
12
12
  import { z } from "zod";
13
13
  import { createHash } from "node:crypto";
14
14
  import { and, asc, count, desc, eq, gte, inArray, lte, max, or, sql } from "drizzle-orm";
@@ -1,9 +1,9 @@
1
- import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-BO1fVUQe.js";
2
- import { en as getDb, ht as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-Im1UUKhZ.js";
1
+ import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-9VpmxvdL.js";
2
+ import { en as getDb, ht as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-BxL23rrY.js";
3
3
  import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
4
- import { u as juniorLocationConfigurations } from "./executor-C-LEhjeD.js";
5
- import { Y as persistConversationMessages } from "./checkpoint-BDaS7x3C.js";
6
- import { w as getStateAdapter } from "./profile-DpHUuqjR.js";
4
+ import { u as juniorLocationConfigurations } from "./executor-_eMyydh0.js";
5
+ import { Y as persistConversationMessages } from "./checkpoint-Q4FG2BQc.js";
6
+ import { w as getStateAdapter } from "./profile-CK1KKKfj.js";
7
7
  import { z } from "zod";
8
8
  import { randomUUID } from "node:crypto";
9
9
  import { and, eq, sql } from "drizzle-orm";
@@ -1,12 +1,12 @@
1
- import { _ as getProviderErrorUserMessage, g as getProviderErrorAttributes, h as findProviderError, p as ProviderError } from "./client-DucHsb6b.js";
2
- import { I as isRecord, t as buildTurnFailureResponse } from "./logging-BO1fVUQe.js";
1
+ import { _ as getProviderErrorUserMessage, g as getProviderErrorAttributes, h as findProviderError, p as ProviderError } from "./client-Mj9HEEKf.js";
2
+ import { I as isRecord, t as buildTurnFailureResponse } from "./logging-9VpmxvdL.js";
3
3
  import { b as parseSlackMessageTs } from "./context-0Et9iVSB.js";
4
- import { Wt as listConversationAnnotations, Zt as getConversationEventStore, en as getDb } from "./agent-hooks-Im1UUKhZ.js";
4
+ import { Wt as listConversationAnnotations, Zt as getConversationEventStore, en as getDb } from "./agent-hooks-BxL23rrY.js";
5
5
  import { H as readMessageCardRefs, U as removedCardSchema, W as resolveMessageCards } from "./conversation-DsuDtoYR.js";
6
- import { J as hydrateConversationMessages, ct as markConversationMessage } from "./checkpoint-BDaS7x3C.js";
7
- import { r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-BWgfMCZE.js";
8
- import { g as markTurnCompleted, h as markTurnClosed } from "./oauth-authorization-DPPpHxSI.js";
9
- import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BIXM2uhZ.js";
6
+ import { J as hydrateConversationMessages, ct as markConversationMessage } from "./checkpoint-Q4FG2BQc.js";
7
+ import { r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-mB93uu9V.js";
8
+ import { g as markTurnCompleted, h as markTurnClosed } from "./oauth-authorization-DYZeyL50.js";
9
+ import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-HHHiwpYG.js";
10
10
  //#region src/chat/conversations/pending-cards.ts
11
11
  /** Select undelivered cards and load their latest saved facts. */
12
12
  async function loadPendingMessageCards(conversationId) {
@@ -1,4 +1,4 @@
1
- import { Zt as getConversationEventStore } from "./agent-hooks-Im1UUKhZ.js";
1
+ import { Zt as getConversationEventStore } from "./agent-hooks-BxL23rrY.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 {
@@ -34,7 +34,7 @@ function slackSourceForDestination(args) {
34
34
  * Reads parent Conversations when this Conversation has no Destination.
35
35
  */
36
36
  async function resolveConversationRouting(args) {
37
- const conversationStore = args.conversationStore ?? (await import("./agent-hooks-Im1UUKhZ.js").then((n) => n.Xt)).getConversationStore();
37
+ const conversationStore = args.conversationStore ?? (await import("./agent-hooks-BxL23rrY.js").then((n) => n.Xt)).getConversationStore();
38
38
  const chain = await loadConversationChain(args.conversationId, conversationStore);
39
39
  let destination;
40
40
  let source;
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Blx7IGY9.js";
2
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-RSgQS4lp.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.230.0";
2
+ var version = "0.231.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-Y7rGnMXG.js";
1
+ import { t as JUNIOR_VERSION } from "./version-wZ8kdUu1.js";
2
2
  export { JUNIOR_VERSION };
@@ -1,9 +1,9 @@
1
- import { Ht as requestConversationWork, Mt as ensureConversationWake } from "./agent-runner-B9dvsdM8.js";
2
- import { Zt as getConversationEventStore } from "./agent-hooks-Im1UUKhZ.js";
3
- import { n as loadTurnCheckpoint, o as failTurnRecord, s as getTurnRecord } from "./checkpoint-BDaS7x3C.js";
4
- import { w as getStateAdapter } from "./profile-DpHUuqjR.js";
5
- import { a as getVercelConversationWorkQueue } from "./job-queue-CpNnv-n1.js";
6
- import { n as resolveTurnSessionRouting } from "./turn-session-routing-DYxwlqQl.js";
1
+ import { Ht as requestConversationWork, Mt as ensureConversationWake } from "./agent-runner-mpzfRAEr.js";
2
+ import { Zt as getConversationEventStore } from "./agent-hooks-BxL23rrY.js";
3
+ import { n as loadTurnCheckpoint, o as failTurnRecord, s as getTurnRecord } from "./checkpoint-Q4FG2BQc.js";
4
+ import { w as getStateAdapter } from "./profile-CK1KKKfj.js";
5
+ import { a as getVercelConversationWorkQueue } from "./job-queue-Dl1lTGqq.js";
6
+ import { n as resolveTurnSessionRouting } from "./turn-session-routing-DDo6JGTB.js";
7
7
  import { z } from "zod";
8
8
  import { randomUUID } from "node:crypto";
9
9
  //#region src/chat/task-execution/authorized-turn.ts
@@ -1,29 +1,29 @@
1
- import { $t as recordFinishedTurnForAutomatedLimit, B as isListedScheduledAutomation, Cn as createUserTokenStore, D as renderBlockText, E as renderAttachmentText, F as resolveSlackChannelIdFromThreadId, G as readScheduledAutomation, I as listThreadReplies, K as saveScheduledAutomation, M as parseSlackThreadId, N as readSlackRawMessageContext, On as AuthorizationFlowDisabledError, P as resolveSlackChannelIdFromMessage, Pt as getConversationWorkState, Q as effectiveTaskOutcomes, Qt as maybePostAutomatedTurnLimitNotice, Tn as RetryableDeliveryError, V as listPublicScheduledAutomationsForTeams, W as parseScheduledAutomationRow, Z as eventAutomationTriggerAvailable, _n as truncateStatusText, _t as getEventCatalog, a as isExperimentalFeatureEnabled, at as listEventAutomationsCreatedBy, bn as removeReactionFromMessage, bt as appendAndEnqueueExclusiveInboundMessage, c as createContextCompactor, et as deleteEventAutomation, gn as normalizeSlackStatusText, gt as isEventMailboxMetadata, hn as normalizeSlackReplyMarkdown, ht as EVENT_WAIT_MS, it as listDeletedEventAutomationsCreatedBy, j as storeAttachment, kn as shouldEmitDevAgentTrace, mn as formatSlackLink, ot as listPublicEventAutomationsForTeams, pn as escapeSlackMrkdwnText, rt as getEventAutomation, s as executeAgentRun, t as createAgentRunner, tt as eventAutomationBelongsToUser, v as PluginCredentialFailureError, vn as addReactionToMessage, wn as buildSteeringPiMessage, xt as appendAndEnqueueInboundMessage, y as latestProgressStatus, yn as postSlackMessage } from "./agent-runner-B9dvsdM8.js";
2
- import { f as escapeXml, i as completeText, r as completeObject, v as isProviderRetryError } from "./client-DucHsb6b.js";
3
- import { C as withLogContext, I as isRecord, L as toOptionalNumber, R as toOptionalString, _ as setSentryUser, b as setTags, d as logException, f as logInfo, n as createChatSdkLogger, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, u as logError, v as setSpanAttributes, w as withSpan } from "./logging-BO1fVUQe.js";
4
- import { a as getChatConfig, c as getSlackClientId, d as getSlackSigningSecret, h as normalizeSlackEmojiName, l as getSlackClientSecret, n as botConfig, s as getSlackBotToken } from "./config-HqsfInxG.js";
1
+ import { $t as recordFinishedTurnForAutomatedLimit, B as isListedScheduledAutomation, Cn as createUserTokenStore, D as renderBlockText, E as renderAttachmentText, F as resolveSlackChannelIdFromThreadId, G as readScheduledAutomation, I as listThreadReplies, K as saveScheduledAutomation, M as parseSlackThreadId, N as readSlackRawMessageContext, On as AuthorizationFlowDisabledError, P as resolveSlackChannelIdFromMessage, Pt as getConversationWorkState, Q as effectiveTaskOutcomes, Qt as maybePostAutomatedTurnLimitNotice, Tn as RetryableDeliveryError, V as listPublicScheduledAutomationsForTeams, W as parseScheduledAutomationRow, Z as eventAutomationTriggerAvailable, _n as truncateStatusText, _t as getEventCatalog, a as isExperimentalFeatureEnabled, at as listEventAutomationsCreatedBy, bn as removeReactionFromMessage, bt as appendAndEnqueueExclusiveInboundMessage, c as createContextCompactor, et as deleteEventAutomation, gn as normalizeSlackStatusText, gt as isEventMailboxMetadata, hn as normalizeSlackReplyMarkdown, ht as EVENT_WAIT_MS, it as listDeletedEventAutomationsCreatedBy, j as storeAttachment, kn as shouldEmitDevAgentTrace, mn as formatSlackLink, ot as listPublicEventAutomationsForTeams, pn as escapeSlackMrkdwnText, rt as getEventAutomation, s as executeAgentRun, t as createAgentRunner, tt as eventAutomationBelongsToUser, v as PluginCredentialFailureError, vn as addReactionToMessage, wn as buildSteeringPiMessage, xt as appendAndEnqueueInboundMessage, y as latestProgressStatus, yn as postSlackMessage } from "./agent-runner-mpzfRAEr.js";
2
+ import { f as escapeXml, i as completeText, r as completeObject, v as isProviderRetryError } from "./client-Mj9HEEKf.js";
3
+ import { C as withLogContext, I as isRecord, L as toOptionalNumber, R as toOptionalString, _ as setSentryUser, b as setTags, d as logException, f as logInfo, n as createChatSdkLogger, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, u as logError, v as setSpanAttributes, w as withSpan } from "./logging-9VpmxvdL.js";
4
+ import { a as getChatConfig, c as getSlackClientId, d as getSlackSigningSecret, h as normalizeSlackEmojiName, l as getSlackClientSecret, n as botConfig, s as getSlackBotToken } from "./config-CkmcoWGB.js";
5
5
  import { o as modelIdForProfile, r as defaultModelId } from "./model-profile-BwU8mqwD.js";
6
6
  import { a as createActor, b as parseSlackMessageTs, c as isActorUserId, l as isUserActor, o as createSlackActor, p as parseSlackChannelId, s as createSlackResumeActor, t as credentialContextForActor, u as parseActorUserId } from "./context-0Et9iVSB.js";
7
- import { $t as getConversationStore, B as downloadPrivateSlackFile, Bt as recordSlackAttachment, G as isDmChannel, H as getHeaderString, It as buildSentryConversationUrl, K as normalizeSlackConversationId, Lt as getSlackFileId, U as getSlackClient, Zt as getConversationEventStore, _n as createSlackDestination, _t as getDashboardObjectIconLink, en as getDb, gt as getDashboardConversationLink, ht as JUNIOR_THREAD_STATE_TTL_MS, o as getPluginSlackConversationLink, ot as cancelSubscriptions, q as runWithSlackInstallationToken, tn as getSqlExecutor, yn as requireSlackDestination, z as SlackActionError, zt as readAttachmentVisionSummary } from "./agent-hooks-Im1UUKhZ.js";
7
+ import { $t as getConversationStore, B as downloadPrivateSlackFile, Bt as recordSlackAttachment, G as isDmChannel, H as getHeaderString, It as buildSentryConversationUrl, K as normalizeSlackConversationId, Lt as getSlackFileId, U as getSlackClient, Zt as getConversationEventStore, _n as createSlackDestination, _t as getDashboardObjectIconLink, en as getDb, gt as getDashboardConversationLink, ht as JUNIOR_THREAD_STATE_TTL_MS, o as getPluginSlackConversationLink, ot as cancelSubscriptions, q as runWithSlackInstallationToken, tn as getSqlExecutor, yn as requireSlackDestination, z as SlackActionError, zt as readAttachmentVisionSummary } from "./agent-hooks-BxL23rrY.js";
8
8
  import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
9
- import { D as juniorIdentities, O as juniorUsers, o as juniorSchedulerTasks } from "./executor-C-LEhjeD.js";
9
+ import { D as juniorIdentities, O as juniorUsers, o as juniorSchedulerTasks } from "./executor-_eMyydh0.js";
10
10
  import { N as isVisionImageMediaType, j as readMessageAttachments, nt as instructionProvenanceFor } from "./conversation-DsuDtoYR.js";
11
- import { $ as fallbackShortTitle, A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, N as loadConversationProjection, O as trimTrailingAssistantMessages, P as loadProjection, Q as resolveConversationTitle, W as recordSubscribedReplyRoute, Y as persistConversationMessages, Z as persistConversationMessageSummaries, a as completeTurnRecord, at as estimateConversationContextTokens, c as listTurnSummaries, ct as markConversationMessage, dt as turnHasReply, ft as upsertConversationMessage, i as abandonTurnRecord, it as createConversationMemoryService, j as commitMessages, l as recordTurnSummary, lt as normalizeConversationText, n as loadTurnCheckpoint, nt as appendThreadContextMessages, o as failTurnRecord, ot as getConversationMessageSlackTs, p as buildTurnErrorResponse, pt as estimateTextTokens, r as saveTurnCheckpoint, rt as buildConversationContext, s as getTurnRecord, st as isHumanConversationMessage, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-BDaS7x3C.js";
12
- import { E as acquireActiveLock, O as withLock, T as MUTATION_LOCK_TTL_MS, w as getStateAdapter } from "./profile-DpHUuqjR.js";
13
- import { a as isPendingAuthLatestRequest, o as buildDeterministicAssistantMessageId, r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-BWgfMCZE.js";
14
- import { _ as markTurnFailed, c as CooperativeTurnYieldError, d as getConversationTurnBoundaryError, f as isCooperativeTurnYieldError, g as markTurnCompleted, h as markTurnClosed, l as TurnInputCommitLostError, m as isTurnInputDeferredError, p as isTurnInputCommitLostError, r as getAssistantReplyText, s as ConversationTurnBoundaryError, u as TurnInputDeferredError, v as startActiveTurn } from "./oauth-authorization-DPPpHxSI.js";
11
+ import { $ as fallbackShortTitle, A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, N as loadConversationProjection, O as trimTrailingAssistantMessages, P as loadProjection, Q as resolveConversationTitle, W as recordSubscribedReplyRoute, Y as persistConversationMessages, Z as persistConversationMessageSummaries, a as completeTurnRecord, at as estimateConversationContextTokens, c as listTurnSummaries, ct as markConversationMessage, dt as turnHasReply, ft as upsertConversationMessage, i as abandonTurnRecord, it as createConversationMemoryService, j as commitMessages, l as recordTurnSummary, lt as normalizeConversationText, n as loadTurnCheckpoint, nt as appendThreadContextMessages, o as failTurnRecord, ot as getConversationMessageSlackTs, p as buildTurnErrorResponse, pt as estimateTextTokens, r as saveTurnCheckpoint, rt as buildConversationContext, s as getTurnRecord, st as isHumanConversationMessage, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-Q4FG2BQc.js";
12
+ import { E as acquireActiveLock, O as withLock, T as MUTATION_LOCK_TTL_MS, w as getStateAdapter } from "./profile-CK1KKKfj.js";
13
+ import { a as isPendingAuthLatestRequest, o as buildDeterministicAssistantMessageId, r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-mB93uu9V.js";
14
+ import { _ as markTurnFailed, c as CooperativeTurnYieldError, d as getConversationTurnBoundaryError, f as isCooperativeTurnYieldError, g as markTurnCompleted, h as markTurnClosed, l as TurnInputCommitLostError, m as isTurnInputDeferredError, p as isTurnInputCommitLostError, r as getAssistantReplyText, s as ConversationTurnBoundaryError, u as TurnInputDeferredError, v as startActiveTurn } from "./oauth-authorization-DYZeyL50.js";
15
15
  import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-D5RPLy92.js";
16
- import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline } from "./job-queue-CpNnv-n1.js";
16
+ import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline } from "./job-queue-Dl1lTGqq.js";
17
17
  import { c as sumUtcHoursIntoSixHours, m as healthReportSchema, t as webMessageId } from "./web-message-id-xPI_EFSC.js";
18
- import { C as readAutomationExecutionStatusDays, D as readAutomationRuns, E as readAutomationExecutions, S as readAutomationExecutionHours, T as readAutomationExecutionSummaries, _ as markDispatchFailed, a as confirmDispatchMailboxAppend, b as readAutomationExecutionByConversationId, c as getDispatchInputMessageId, f as isTerminalDispatchStatus, g as markDispatchCompleted, h as markDispatchBlocked, i as claimDispatchMailboxAppend, l as getDispatchRecord, m as markDispatchAwaitingResume, n as scheduleSessionCompletedPluginTasks, s as getDispatchConversationId, t as processPluginTask, u as getDispatchTurnId, v as markDispatchRunning, w as readAutomationExecutionStatusHours, x as readAutomationExecutionDays, y as emptyAutomationRunWindows } from "./task-runner-DrC1UgCK.js";
19
- import { i as resolveAgentInvocationId, o as AgentRunError, s as executeTurn, t as createAgentInvocationWorker } from "./work-CP3L3bNf.js";
20
- import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-_YDXUFqj.js";
21
- import { a as persistThreadState, c as configValueSchema, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-BIXM2uhZ.js";
22
- import { a as getPausedTurnRequest, c as getTurnAuthorization, i as createPausedTurns, n as deleteWebAuthorization, s as wakePausedTurn, t as createWebAuthorization } from "./web-authorization-COF8MUa5.js";
23
- import { n as resolveTurnSessionRouting } from "./turn-session-routing-DYxwlqQl.js";
24
- import { t as bindSpawnAgent } from "./spawn-DrH6CP9W.js";
25
- import { a as persistAuthPauseTurnState, c as getTurnUserSlackMessageTs, d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, n as getAgentTurnDiagnosticsAttributes, o as getTurnUserMessage, r as requireTurnFailureEventId, s as getTurnUserReplyAttachmentContext, t as finalizeFailedTurnReplyWithEvent, u as getInterruptionMarker } from "./turn-failure-response-9Ql2NYKh.js";
26
- import { r as storeInputImages } from "./images-owPAu3eq.js";
18
+ import { C as readAutomationExecutionStatusDays, D as readAutomationRuns, E as readAutomationExecutions, S as readAutomationExecutionHours, T as readAutomationExecutionSummaries, _ as markDispatchFailed, a as confirmDispatchMailboxAppend, b as readAutomationExecutionByConversationId, c as getDispatchInputMessageId, f as isTerminalDispatchStatus, g as markDispatchCompleted, h as markDispatchBlocked, i as claimDispatchMailboxAppend, l as getDispatchRecord, m as markDispatchAwaitingResume, n as scheduleSessionCompletedPluginTasks, s as getDispatchConversationId, t as processPluginTask, u as getDispatchTurnId, v as markDispatchRunning, w as readAutomationExecutionStatusHours, x as readAutomationExecutionDays, y as emptyAutomationRunWindows } from "./task-runner-DkaEXCEP.js";
19
+ import { i as resolveAgentInvocationId, o as AgentRunError, s as executeTurn, t as createAgentInvocationWorker } from "./work-BW27hKZB.js";
20
+ import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-Cosdai_3.js";
21
+ import { a as persistThreadState, c as configValueSchema, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-HHHiwpYG.js";
22
+ import { a as getPausedTurnRequest, c as getTurnAuthorization, i as createPausedTurns, n as deleteWebAuthorization, s as wakePausedTurn, t as createWebAuthorization } from "./web-authorization-C1coqBWn.js";
23
+ import { n as resolveTurnSessionRouting } from "./turn-session-routing-DDo6JGTB.js";
24
+ import { t as bindSpawnAgent } from "./spawn-pwMuB53X.js";
25
+ import { a as persistAuthPauseTurnState, c as getTurnUserSlackMessageTs, d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, n as getAgentTurnDiagnosticsAttributes, o as getTurnUserMessage, r as requireTurnFailureEventId, s as getTurnUserReplyAttachmentContext, t as finalizeFailedTurnReplyWithEvent, u as getInterruptionMarker } from "./turn-failure-response-CtWGQ0fz.js";
26
+ import { r as storeInputImages } from "./images-D9gA15-3.js";
27
27
  import { z } from "zod";
28
28
  import { createHash } from "node:crypto";
29
29
  import { and, desc, eq, inArray, lt, notInArray, or, sql } from "drizzle-orm";
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { On as AuthorizationFlowDisabledError, ct as agentInvocationSchema, dt as AgentInvocationLimitError, lt as createAgentInvocationSchema, n as runAgentWithTimeout, st as agentBindingSchema, ut as AgentInvocationBusyError, v as PluginCredentialFailureError, xt as appendAndEnqueueInboundMessage } from "./agent-runner-B9dvsdM8.js";
3
- import { $t as getConversationStore, Zt as getConversationEventStore, tn as getSqlExecutor } from "./agent-hooks-Im1UUKhZ.js";
4
- import { f as juniorAgentBindings, p as juniorAgentInvocations } from "./executor-C-LEhjeD.js";
5
- import { I as openConversationProjection, _ as getTerminalAssistantMessages, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord } from "./checkpoint-BDaS7x3C.js";
6
- import { d as getConversationTurnBoundaryError, l as TurnInputCommitLostError, p as isTurnInputCommitLostError, r as getAssistantReplyText } from "./oauth-authorization-DPPpHxSI.js";
7
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-_YDXUFqj.js";
8
- import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-BIXM2uhZ.js";
2
+ import { On as AuthorizationFlowDisabledError, ct as agentInvocationSchema, dt as AgentInvocationLimitError, lt as createAgentInvocationSchema, n as runAgentWithTimeout, st as agentBindingSchema, ut as AgentInvocationBusyError, v as PluginCredentialFailureError, xt as appendAndEnqueueInboundMessage } from "./agent-runner-mpzfRAEr.js";
3
+ import { $t as getConversationStore, Zt as getConversationEventStore, tn as getSqlExecutor } from "./agent-hooks-BxL23rrY.js";
4
+ import { f as juniorAgentBindings, p as juniorAgentInvocations } from "./executor-_eMyydh0.js";
5
+ import { I as openConversationProjection, _ as getTerminalAssistantMessages, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord } from "./checkpoint-Q4FG2BQc.js";
6
+ import { d as getConversationTurnBoundaryError, l as TurnInputCommitLostError, p as isTurnInputCommitLostError, r as getAssistantReplyText } from "./oauth-authorization-DYZeyL50.js";
7
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-Cosdai_3.js";
8
+ import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-HHHiwpYG.js";
9
9
  import { z } from "zod";
10
10
  import { createHash } from "node:crypto";
11
11
  import { and, asc, count, eq, inArray } from "drizzle-orm";