@sentry/junior 0.274.0 → 0.276.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 (71) hide show
  1. package/dist/{adapter-4qThDhgF.js → adapter-DoPR2jS-.js} +1 -1
  2. package/dist/{admin-c7ASvs6x.js → admin-BJTT-kXb.js} +1 -1
  3. package/dist/{agent-invocations-C1RNOCs8.js → agent-invocations-CUWrrzkc.js} +1 -0
  4. package/dist/{agent-runner-CLHM48dh.js → agent-runner-sMpA5qGM.js} +1118 -394
  5. package/dist/api/schema.d.ts +2 -2
  6. package/dist/api/schema.js +3 -3
  7. package/dist/api.d.ts +1 -1
  8. package/dist/api.js +75 -66
  9. package/dist/{app-BlmPpPoR.d.ts → app-DTj-yAQt.d.ts} +26 -2
  10. package/dist/app.d.ts +1 -1
  11. package/dist/app.js +237 -87
  12. package/dist/{assistant-reply-2IwdFWuQ.js → assistant-reply-DbxKnBQF.js} +1 -1
  13. package/dist/{automation-BGrd03QO.js → automation-B8_mC68r.js} +42 -13
  14. package/dist/{job-queue-Bh9sFO9t.js → background-compaction-queue-Bywqo1WJ.js} +42 -3
  15. package/dist/{briefs-C1-NOh8m.js → briefs-IL7QnCCR.js} +4 -4
  16. package/dist/{catalog-runtime-BnIJimKZ.js → catalog-runtime--sC2CYLQ.js} +1 -1
  17. package/dist/cli/chat.js +14 -14
  18. package/dist/cli/check.js +3 -3
  19. package/dist/cli/main.js +3 -3
  20. package/dist/cli/plugins.js +4 -4
  21. package/dist/cli/snapshot-create.js +4 -4
  22. package/dist/cli/upgrade.d.ts +1 -1
  23. package/dist/cli/upgrade.js +3 -3
  24. package/dist/{client-C0ZIxoDr.js → client-7diKvInp.js} +2 -2
  25. package/dist/{config-DS-QLVSL.js → config-Cb--cuv-.js} +2 -2
  26. package/dist/{connections-Djb6ANAh.js → connections-C4-4fxaE.js} +14 -14
  27. package/dist/{conversation-BjTo9ZFL.js → conversation-DppJ83Hw.js} +32 -7
  28. package/dist/{conversation-privacy-3IMUZSHC.js → conversation-privacy-DTwdT3Pi.js} +1 -1
  29. package/dist/{credential-sync-ig88EB_v.js → credential-sync-Sl5RQCkS.js} +13 -13
  30. package/dist/{db-BMZhoYKj.d.ts → db-Ck6TXQIx.d.ts} +1 -1
  31. package/dist/{executor-C2moGIHS.js → executor-BFKmqxYe.js} +3 -3
  32. package/dist/instrumentation.d.ts +14 -0
  33. package/dist/instrumentation.js +29 -6
  34. package/dist/{logging-DYRS7E8s.js → logging-B04X_eCB.js} +3 -2
  35. package/dist/{message-CicNrhCv.js → message-DQMFyyE-.js} +9 -9
  36. package/dist/nitro.d.ts +1 -1
  37. package/dist/nitro.js +13 -3
  38. package/dist/{oauth-callback-server-BXyrepfY.js → oauth-callback-server-BGq0_vQI.js} +2 -2
  39. package/dist/{projection-CMRrv9Pt.js → projection-6dXaN0n-.js} +109 -17
  40. package/dist/{prompt-JEWUUpLW.js → prompt-B4fQKGZR.js} +1 -1
  41. package/dist/{registry-D92WLl5I.js → registry-CEqKR_ld.js} +1 -1
  42. package/dist/{resolve-C-Dh14ps.js → resolve-8I5DkrfI.js} +3 -3
  43. package/dist/{result-DZ8TCQkd.js → result-BgAW90IM.js} +9 -9
  44. package/dist/{runner-BBmhrQTM.js → runner-CSKDr_19.js} +12 -12
  45. package/dist/{sandbox-egress-signals-Cehpq6hC.js → sandbox-egress-signals-BxAT276e.js} +1 -1
  46. package/dist/{schema-DfdHlBnb.d.ts → schema-CaUWl2EV.d.ts} +74 -6
  47. package/dist/{schema-CX9XGKCm.js → schema-Cal-EFdi.js} +9 -7
  48. package/dist/{service-account-Bapo6l0R.js → service-account-CUuVJCKT.js} +3 -3
  49. package/dist/{service-account-Ce1465Fn.js → service-account-CtOab1Xz.js} +3 -3
  50. package/dist/{session-stop-CI5qJU7a.js → session-stop-DK8LuPZW.js} +155 -54
  51. package/dist/{skills-D-d79XQ6.js → skills-Bc0D7BGy.js} +2 -2
  52. package/dist/{spawn-C_FETz5x.js → spawn-DF_GUcd8.js} +2 -2
  53. package/dist/{stop-CmwFHwiN.js → stop-DthSy-z8.js} +159 -121
  54. package/dist/{store-BvI3yBGS.js → store-BgH2P3X9.js} +3 -3
  55. package/dist/{store-BIQYXvoV.js → store-C5uVTx2G.js} +11 -9
  56. package/dist/{task-queue-BdB0pab8.js → task-queue-C6ROM_XJ.js} +3 -3
  57. package/dist/{task-runner-DQr2QfvJ.js → task-runner-BwAkjjVE.js} +6 -6
  58. package/dist/{thread-state-ngCvtWNa.js → thread-state-BXjgk1pW.js} +4 -4
  59. package/dist/{turn-failure-response-BDT3sT2v.js → turn-failure-response-CVI57qKL.js} +7 -7
  60. package/dist/{turn-lifecycle-B7O6rZEX.js → turn-lifecycle-CF6ibonp.js} +6 -1
  61. package/dist/{turn-session-routing-DIeqG2pO.js → turn-session-routing-DddybdNu.js} +17 -16
  62. package/dist/{validation-D3Xik64v.js → validation-BxF1nQbC.js} +1 -1
  63. package/dist/{version-BoWLhNzj.js → version-CTzSbCmR.js} +1 -1
  64. package/dist/version.js +1 -1
  65. package/dist/{viewer-D25XOUHc.js → viewer-CQwBszc7.js} +10 -7
  66. package/dist/{work-D12-wcf4.js → work-BHlShEQ6.js} +30 -12
  67. package/dist/{worker-DGxfDtES.js → worker-DhY9MnsH.js} +6 -6
  68. package/migrations/0073_conversation_quick_question.sql +1 -0
  69. package/migrations/meta/0073_snapshot.json +4070 -0
  70. package/migrations/meta/_journal.json +7 -0
  71. package/package.json +6 -5
@@ -1,5 +1,5 @@
1
1
  import { _ as withScope, 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 } from "./sentry-MDkYAVPV.js";
2
- import { t as JUNIOR_VERSION } from "./version-BoWLhNzj.js";
2
+ import { t as JUNIOR_VERSION } from "./version-CTzSbCmR.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";
@@ -115,6 +115,7 @@ const JUNIOR_RETENTION_CRON_SCHEDULE = "0 4 * * *";
115
115
  const JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE = "/api/internal/agent/continue";
116
116
  const JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE = "/api/internal/plugin/tasks";
117
117
  const JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE = "/api/internal/workspace/snapshots";
118
+ const JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE = "/api/internal/context/compactions";
118
119
  const LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION = "api/internal/agent/continue.ts";
119
120
  const SERVICE_INSTANCE_ID = randomUUID();
120
121
  function toOptionalTrimmed(value) {
@@ -1244,4 +1245,4 @@ function extractGenAiUsageAttributes(...sources) {
1244
1245
  ...cost?.total !== void 0 ? { "app.cost.total_usd": cost.total } : void 0
1245
1246
  };
1246
1247
  }
1247
- export { JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE as A, normalizeIdentityEmail as B, summarizeMessageText as C, JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE as D, withSpan as E, getDeploymentServiceVersion as F, toOptionalNumber as H, getDeploymentTelemetryAttributes as I, runWithLogAttributes as L, JUNIOR_RETENTION_ROUTE as M, JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE as N, JUNIOR_HEARTBEAT_CRON_SCHEDULE as O, LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION as P, GOOGLE_IDENTITY_PROVIDER as R, setTags as S, withLogContext as T, toOptionalString as U, isRecord as V, runBestEffort as _, extractGenAiUsageSummary as a, setSpanAttributes as b, getLogContextAttributes as c, logAudit as d, logError as f, normalizeGenAiFinishReason as g, logWarn as h, extractGenAiUsageAttributes as i, JUNIOR_RETENTION_CRON_SCHEDULE as j, JUNIOR_HEARTBEAT_ROUTE as k, getLogContextAttributesForSpan as l, logInfo as m, createChatSdkLogger as n, getActiveTraceContext as o, logException as p, createRequestContext as r, getActiveTraceId as s, buildTurnFailureResponse as t, getTracePropagationHeaders as u, serializeGenAiAttribute as v, withContext as w, setSpanStatus as x, setSentryUser as y, isNativeIdentityProvider as z };
1248
+ export { JUNIOR_HEARTBEAT_ROUTE as A, isNativeIdentityProvider as B, summarizeMessageText as C, JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE as D, withSpan as E, LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION as F, isRecord as H, getDeploymentServiceVersion as I, getDeploymentTelemetryAttributes as L, JUNIOR_RETENTION_CRON_SCHEDULE as M, JUNIOR_RETENTION_ROUTE as N, JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE as O, JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE as P, runWithLogAttributes as R, setTags as S, withLogContext as T, toOptionalNumber as U, normalizeIdentityEmail as V, toOptionalString as W, runBestEffort as _, extractGenAiUsageSummary as a, setSpanAttributes as b, getLogContextAttributes as c, logAudit as d, logError as f, normalizeGenAiFinishReason as g, logWarn as h, extractGenAiUsageAttributes as i, JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE as j, JUNIOR_HEARTBEAT_CRON_SCHEDULE as k, getLogContextAttributesForSpan as l, logInfo as m, createChatSdkLogger as n, getActiveTraceContext as o, logException as p, createRequestContext as r, getActiveTraceId as s, buildTurnFailureResponse as t, getTracePropagationHeaders as u, serializeGenAiAttribute as v, withContext as w, setSpanStatus as x, setSentryUser as y, GOOGLE_IDENTITY_PROVIDER as z };
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { wa as readConversationAccessFromSql } from "./projection-CMRrv9Pt.js";
3
- import { n as botConfig } from "./config-DS-QLVSL.js";
4
- import { M as SYSTEM_IDENTITY_ID, S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-D25XOUHc.js";
5
- import { Nt as actorFromRun, Pt as toolInvocationDestination } from "./agent-runner-CLHM48dh.js";
6
- import { A as AgentMessagePausedError, I as PARENT_AGENT_TARGET, M as AgentMessageTargetError, P as findChildAgentConversationId, i as createAgentInvocationForMessage, o as getActiveAgentInvocationForConversation } from "./store-BIQYXvoV.js";
7
- import { T as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, k as admitAutomatedTurn } from "./session-stop-CI5qJU7a.js";
8
- import { r as appendAndEnqueueInboundMessage } from "./store-BvI3yBGS.js";
9
- import { r as enqueueAgentMessageToParent } from "./result-DZ8TCQkd.js";
10
- import { r as enqueueAgentInvocation } from "./work-D12-wcf4.js";
2
+ import { ja as readConversationAccessFromSql } from "./projection-6dXaN0n-.js";
3
+ import { n as botConfig } from "./config-Cb--cuv-.js";
4
+ import { M as SYSTEM_IDENTITY_ID, S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-CQwBszc7.js";
5
+ import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-sMpA5qGM.js";
6
+ import { F as findChildAgentConversationId, L as PARENT_AGENT_TARGET, N as AgentMessageTargetError, a as createAgentInvocationForMessage, j as AgentMessagePausedError, s as getActiveAgentInvocationForConversation } from "./store-C5uVTx2G.js";
7
+ import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-DK8LuPZW.js";
8
+ import { r as appendAndEnqueueInboundMessage } from "./store-BgH2P3X9.js";
9
+ import { r as enqueueAgentMessageToParent } from "./result-BgAW90IM.js";
10
+ import { i as enqueueAgentInvocation } from "./work-BHlShEQ6.js";
11
11
  // src/chat/agent-invocations/top-level-message.ts
12
12
  const AGENT_MESSAGE_EVENT_NAMESPACE = "junior";
13
13
  /** Event type of a message from another top-level agent. */
package/dist/nitro.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as JuniorDashboardOptions } from "./app-BlmPpPoR.js";
1
+ import { i as JuniorDashboardOptions } from "./app-DTj-yAQt.js";
2
2
  import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.js";
3
3
  import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
4
4
  type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
package/dist/nitro.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, D as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, F as getDeploymentServiceVersion, M as JUNIOR_RETENTION_ROUTE, N as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_CRON_SCHEDULE, j as JUNIOR_RETENTION_CRON_SCHEDULE, k as JUNIOR_HEARTBEAT_ROUTE } from "./logging-DYRS7E8s.js";
1
+ import { A as JUNIOR_HEARTBEAT_ROUTE, D as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, I as getDeploymentServiceVersion, M as JUNIOR_RETENTION_CRON_SCHEDULE, N as JUNIOR_RETENTION_ROUTE, O as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, P as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, j as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, k as JUNIOR_HEARTBEAT_CRON_SCHEDULE } from "./logging-B04X_eCB.js";
2
2
  import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJBompdd.js";
3
- import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-Bh9sFO9t.js";
3
+ import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-Bywqo1WJ.js";
4
4
  import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-DOm9Y6qI.js";
5
- import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-BdB0pab8.js";
5
+ import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-C6ROM_XJ.js";
6
6
  import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
7
7
  import path from "node:path";
8
8
  import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
@@ -267,6 +267,16 @@ function configureVercelDeployment(nitro, options) {
267
267
  topic: WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC
268
268
  }]
269
269
  };
270
+ const existingCompactionRule = nitro.options.vercel.functionRules["/api/internal/context/compactions"] ?? {};
271
+ const otherCompactionTriggers = (Array.isArray(existingCompactionRule.experimentalTriggers) ? existingCompactionRule.experimentalTriggers : []).filter((trigger) => trigger.type !== VERCEL_QUEUE_TRIGGER_TYPE);
272
+ nitro.options.vercel.functionRules[JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE] = {
273
+ ...existingCompactionRule,
274
+ maxDuration: defaultMaxDuration,
275
+ experimentalTriggers: [...otherCompactionTriggers, {
276
+ type: VERCEL_QUEUE_TRIGGER_TYPE,
277
+ topic: BACKGROUND_COMPACTION_QUEUE_TOPIC
278
+ }]
279
+ };
270
280
  return defaultMaxDuration;
271
281
  }
272
282
  /** Nitro module that configures deployment wiring and copies app/plugin content into the Vercel build output. */
@@ -1,5 +1,5 @@
1
- import { Sn as createUserTokenStore } from "./projection-CMRrv9Pt.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-ig88EB_v.js";
1
+ import { Dn as createUserTokenStore } from "./projection-6dXaN0n-.js";
2
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Sl5RQCkS.js";
3
3
  import { createServer } from "node:http";
4
4
  // src/chat/local/oauth-callback-server.ts
5
5
  const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
@@ -1,22 +1,22 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { C as toOptionalTrimmed, a as completeText, b as isProviderRetryError, c as resolveGatewayModel, i as completeObject, m as escapeXml, o as embedTexts, p as unwrapCurrentInstruction, s as rerankTexts, t as GEN_AI_PROVIDER_NAME } from "./client-C0ZIxoDr.js";
3
- import { _ as normalizeSlackEmojiName, i as getChatConfig, n as botConfig, o as getSlackBotToken } from "./config-DS-QLVSL.js";
4
- import { E as withSpan, H as toOptionalNumber, U as toOptionalString, V as isRecord$2, a as extractGenAiUsageSummary, b as setSpanAttributes, c as getLogContextAttributes, d as logAudit, h as logWarn, m as logInfo, o as getActiveTraceContext, p as logException, t as buildTurnFailureResponse, y as setSentryUser } from "./logging-DYRS7E8s.js";
2
+ import { C as toOptionalTrimmed, a as completeText, b as isProviderRetryError, c as resolveGatewayModel, i as completeObject, m as escapeXml, o as embedTexts, p as unwrapCurrentInstruction, s as rerankTexts, t as GEN_AI_PROVIDER_NAME } from "./client-7diKvInp.js";
3
+ import { _ as normalizeSlackEmojiName, i as getChatConfig, n as botConfig, o as getSlackBotToken } from "./config-Cb--cuv-.js";
4
+ import { E as withSpan, H as isRecord$2, U as toOptionalNumber, W as toOptionalString, a as extractGenAiUsageSummary, b as setSpanAttributes, c as getLogContextAttributes, d as logAudit, h as logWarn, m as logInfo, o as getActiveTraceContext, p as logException, t as buildTurnFailureResponse, y as setSentryUser } from "./logging-B04X_eCB.js";
5
5
  import { a as getClient$1, n as captureMessage, r as continueTrace } from "./sentry-MDkYAVPV.js";
6
- import { t as canExposeConversationPayload } from "./conversation-privacy-3IMUZSHC.js";
6
+ import { t as canExposeConversationPayload } from "./conversation-privacy-DTwdT3Pi.js";
7
7
  import { i as defaultModelId } from "./model-profile-B998sjVd.js";
8
8
  import { c as parseStoredSlackActor, d as parseSlackChannelReferenceId, f as parseSlackTeamId, h as parseSlackMessageTs, i as isActorUserId, l as toStoredSlackActor, p as parseSlackUserId, s as parseActorUserId } from "./actor-B4DYygOB.js";
9
- import { $ as sameDestination, B as saveUserTimezone, C as getSqlExecutor, E as withConversationEventLock, H as bindProviderConversation, J as hasAgentTurnUsage, N as resolveActorIdentityId, O as createSqlStore, R as readUserTimezone, S as getDb, T as eventFromRow, W as addAgentTurnUsage, Z as parseDestination, g as createCache, i as readActorIdentity, j as startLocationThread, l as resolveViewerUser, n as findUserByEmailFromSql, o as readIdentityById, p as parseAvatarUrl, s as readIdentityByIdFromSql, w as createSqlConversationEventStore, x as getConversationStore, y as getConversationEventStore } from "./viewer-D25XOUHc.js";
10
- import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, s as juniorConversations } from "./agent-invocations-C1RNOCs8.js";
11
- import { C as juniorCodeChanges, S as juniorConversationAnnotations, T as juniorAttachments, _ as juniorConversationBriefs, a as juniorReviewItemAssignees, b as juniorConversationEvents, c as juniorReviewItems, d as juniorAutomations, h as juniorConversationParticipants, i as juniorWorkspaces, n as juniorSnapshots, o as juniorReviewItemConversations, p as juniorLocationConfigurations, r as juniorWorkspaceRepos, w as juniorCodeRepositories } from "./executor-C2moGIHS.js";
9
+ import { $ as sameDestination, B as saveUserTimezone, C as getSqlExecutor, E as withConversationEventLock, H as bindProviderConversation, J as hasAgentTurnUsage, N as resolveActorIdentityId, O as createSqlStore, R as readUserTimezone, S as getDb, T as eventFromRow, W as addAgentTurnUsage, Z as parseDestination, g as createCache, i as readActorIdentity, j as startLocationThread, l as resolveViewerUser, n as findUserByEmailFromSql, o as readIdentityById, p as parseAvatarUrl, s as readIdentityByIdFromSql, w as createSqlConversationEventStore, x as getConversationStore, y as getConversationEventStore } from "./viewer-CQwBszc7.js";
10
+ import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, s as juniorConversations } from "./agent-invocations-CUWrrzkc.js";
11
+ import { C as juniorCodeChanges, S as juniorConversationAnnotations, T as juniorAttachments, _ as juniorConversationBriefs, a as juniorReviewItemAssignees, b as juniorConversationEvents, c as juniorReviewItems, d as juniorAutomations, h as juniorConversationParticipants, i as juniorWorkspaces, n as juniorSnapshots, o as juniorReviewItemConversations, p as juniorLocationConfigurations, r as juniorWorkspaceRepos, w as juniorCodeRepositories } from "./executor-BFKmqxYe.js";
12
12
  import { a as agentHistoryItemSchema, g as instructionProvenanceFor, h as instructionActors, m as contextProvenance } from "./media-DstkkoNP.js";
13
- import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, f as credentialContextForActor, h as credentialSubjectSchema, m as credentialLogContext, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-D92WLl5I.js";
14
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BnIJimKZ.js";
13
+ import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, f as credentialContextForActor, h as credentialSubjectSchema, m as credentialLogContext, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-CEqKR_ld.js";
14
+ import { n as pluginCatalogRuntime } from "./catalog-runtime--sC2CYLQ.js";
15
15
  import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS, r as acquireActiveLock } from "./locks-D-0h111u.js";
16
- import { n as getDefaultRedisStateAdapterFor, r as getStateAdapter } from "./adapter-4qThDhgF.js";
16
+ import { n as getDefaultRedisStateAdapterFor, r as getStateAdapter } from "./adapter-DoPR2jS-.js";
17
17
  import { i as isValidTimeZone } from "./cadence-R7Em4RjE.js";
18
- import { B as readMessageCardRefs, C as conversationReportEventSchema, G as readMessageAttachments, R as messageCardRef, X as parseBriefInput, Y as conversationBriefSchema, w as conversationReportMessageEventSchema } from "./conversation-BjTo9ZFL.js";
19
- import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-JEWUUpLW.js";
18
+ import { C as conversationReportEventSchema, K as readMessageAttachments, L as reviewItemChangeRecordSchema, V as readMessageCardRefs, X as conversationBriefSchema, Z as parseBriefInput, w as conversationReportMessageEventSchema, z as messageCardRef } from "./conversation-DppJ83Hw.js";
19
+ import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-B4fQKGZR.js";
20
20
  import path from "node:path";
21
21
  import { isDeepStrictEqual } from "node:util";
22
22
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -1205,6 +1205,12 @@ function reportMessageEvents(meta) {
1205
1205
  const parsed = storedMessageEventsSchema.safeParse(meta?.events);
1206
1206
  return parsed.success ? { events: parsed.data } : void 0;
1207
1207
  }
1208
+ const storedReviewItemChangesSchema = z.array(reviewItemChangeRecordSchema).min(1);
1209
+ /** Read the Review item changes that a message records. */
1210
+ function reportReviewItemChanges(meta) {
1211
+ const parsed = storedReviewItemChangesSchema.safeParse(meta?.reviewItemChanges);
1212
+ return parsed.success ? { reviewItemChanges: parsed.data } : void 0;
1213
+ }
1208
1214
  const TURN_COMPLETED_STATES = {
1209
1215
  success: "succeeded",
1210
1216
  no_reply: "no_reply",
@@ -1237,6 +1243,7 @@ function reportEventData(args) {
1237
1243
  ...actorIdentity ? { actorIdentity } : void 0,
1238
1244
  ...args.canExposePayload && data.role === "user" && data.authorIdentityId && data.authorIdentityId !== "system" ? { actorIdentityId: data.authorIdentityId } : void 0,
1239
1245
  ...typeof data.meta?.agentInvocationId === "string" ? { agentInvocationId: data.meta.agentInvocationId } : void 0,
1246
+ ...args.canExposePayload ? reportReviewItemChanges(data.meta) : void 0,
1240
1247
  eventObjectType: objectTypeSchema.safeParse(data.meta?.eventObjectType).data,
1241
1248
  ...typeof data.meta?.eventType === "string" ? { eventType: data.meta.eventType } : void 0,
1242
1249
  ...typeof data.meta?.explicitMention === "boolean" ? { explicitMention: data.meta.explicitMention } : void 0,
@@ -2045,10 +2052,12 @@ function createPluginConversationEventReader(plugin) {
2045
2052
  return (await db.select({
2046
2053
  content: sql`${juniorConversationEvents.payload}->'content'`,
2047
2054
  createdAt: juniorConversationEvents.createdAt,
2055
+ turnId: sql`${juniorConversationEvents.payload}->>'turnId'`,
2048
2056
  version: sql`(${juniorConversationEvents.payload}->>'version')::integer`
2049
2057
  }).from(juniorConversationEvents).where(and(eq(juniorConversationEvents.conversationId, input.conversationId), eq(juniorConversationEvents.type, "structured_event"), sql`${juniorConversationEvents.payload}->>'namespace' = ${plugin.manifest.name}`, sql`${juniorConversationEvents.payload}->>'name' = ${eventName}`)).orderBy(desc(juniorConversationEvents.seq))).map((row) => ({
2050
2058
  content: row.content,
2051
2059
  createdAt: row.createdAt.toISOString(),
2060
+ ...row.turnId ? { turnId: row.turnId } : void 0,
2052
2061
  version: row.version
2053
2062
  }));
2054
2063
  } };
@@ -9677,6 +9686,66 @@ var ProviderCredentialRouter = class {
9677
9686
  });
9678
9687
  }
9679
9688
  };
9689
+ // src/chat/conversations/legacy-web-actor-id.ts
9690
+ /**
9691
+ * Web Actor ids that Junior stored before web Actors used the User id.
9692
+ *
9693
+ * Mailbox input, web authorizations, and OAuth credentials saved before that
9694
+ * deploy still carry `dashboard:` and the first 24 hex characters of
9695
+ * sha256(email).
9696
+ *
9697
+ * TODO(dcramer): Delete with its callers after that input and those
9698
+ * authorizations expire and no `dashboard:` credential keys remain.
9699
+ */
9700
+ const USER_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
9701
+ /** Return the legacy web Actor id for one email. */
9702
+ function legacyWebActorUserId(email) {
9703
+ return `dashboard:${createHash("sha256").update(email.trim().toLowerCase()).digest("hex").slice(0, 24)}`;
9704
+ }
9705
+ /** Return every web Actor id that names this User, the User id first. */
9706
+ function webActorUserIds(user) {
9707
+ return [user.id, legacyWebActorUserId(user.email)];
9708
+ }
9709
+ /** Return the legacy web Actor id of a User id, when the User exists. */
9710
+ async function findLegacyWebActorUserId(userId) {
9711
+ if (!USER_ID_PATTERN.test(userId)) return void 0;
9712
+ const rows = await getDb().select({ email: juniorUsers.primaryEmailNormalized }).from(juniorUsers).where(eq(juniorUsers.id, userId)).limit(1);
9713
+ return rows[0] ? legacyWebActorUserId(rows[0].email) : void 0;
9714
+ }
9715
+ // src/chat/credentials/legacy-web-tokens.ts
9716
+ /**
9717
+ * Move OAuth tokens saved under a legacy web Actor id to the User id.
9718
+ *
9719
+ * Dashboard connections made before web Actors used the User id are saved
9720
+ * under `dashboard:<hash>`. When a read for a User id finds no tokens, this
9721
+ * moves the legacy tokens, so the person keeps the connection. A delete also
9722
+ * deletes the legacy key, so a disconnect cannot bring it back later.
9723
+ *
9724
+ * TODO(dcramer): Delete after no `oauth-token:dashboard:*` keys remain.
9725
+ */
9726
+ /** Read through to legacy web tokens when a User id has none. */
9727
+ function withLegacyWebTokens(store) {
9728
+ return {
9729
+ async get(userId, provider) {
9730
+ const tokens = await store.get(userId, provider);
9731
+ if (tokens) return tokens;
9732
+ const legacyUserId = await findLegacyWebActorUserId(userId);
9733
+ if (!legacyUserId) return void 0;
9734
+ const legacy = await store.get(legacyUserId, provider);
9735
+ if (!legacy) return void 0;
9736
+ await store.set(userId, provider, legacy);
9737
+ await store.delete(legacyUserId, provider);
9738
+ return legacy;
9739
+ },
9740
+ set: (userId, provider, tokens) => store.set(userId, provider, tokens),
9741
+ async delete(userId, provider) {
9742
+ await store.delete(userId, provider);
9743
+ const legacyUserId = await findLegacyWebActorUserId(userId);
9744
+ if (legacyUserId) await store.delete(legacyUserId, provider);
9745
+ },
9746
+ withRefresh: (userId, provider, callback) => store.withRefresh(userId, provider, callback)
9747
+ };
9748
+ }
9680
9749
  // src/chat/credentials/user-token-store.ts
9681
9750
  const storedTokensSchema = pluginStoredTokensSchema;
9682
9751
  // src/chat/credentials/state-adapter-token-store.ts
@@ -9729,7 +9798,7 @@ var StateAdapterTokenStore = class {
9729
9798
  const sandboxEgressRouters = /* @__PURE__ */ new WeakMap();
9730
9799
  /** Create the user token store used by OAuth-backed credential brokers. */
9731
9800
  function createUserTokenStore() {
9732
- return new StateAdapterTokenStore(getStateAdapter());
9801
+ return withLegacyWebTokens(new StateAdapterTokenStore(getStateAdapter()));
9733
9802
  }
9734
9803
  function createProviderCredentialRouter(userTokenStore) {
9735
9804
  const brokersByProvider = {};
@@ -9744,7 +9813,7 @@ function getSandboxEgressRouter() {
9744
9813
  const stateAdapter = getStateAdapter();
9745
9814
  let router = sandboxEgressRouters.get(stateAdapter);
9746
9815
  if (!router) {
9747
- router = createProviderCredentialRouter(new StateAdapterTokenStore(stateAdapter));
9816
+ router = createProviderCredentialRouter(withLegacyWebTokens(new StateAdapterTokenStore(stateAdapter)));
9748
9817
  sandboxEgressRouters.set(stateAdapter, router);
9749
9818
  }
9750
9819
  return router;
@@ -10499,6 +10568,7 @@ function isExperimentalFeatureEnabled(feature) {
10499
10568
  const COMPACTION_TRIGGER_RATIO = .9;
10500
10569
  const CONTEXT_INPUT_LIMIT_RATIO = .95;
10501
10570
  const COMPACTION_TARGET_RATIO = .8;
10571
+ const BACKGROUND_COMPACTION_MARK_RATIO = .7;
10502
10572
  const FALLBACK_CONTEXT_WINDOW_TOKENS = 4e5;
10503
10573
  function positiveInteger(value, fallback) {
10504
10574
  return Number.isFinite(value) && value > 0 ? Math.floor(value) : fallback;
@@ -10507,6 +10577,15 @@ function positiveInteger(value, fallback) {
10507
10577
  function estimateTextTokens(text) {
10508
10578
  return Math.ceil(text.length / 4);
10509
10579
  }
10580
+ /** Estimate the tokens that the system prompt and tool definitions add to a model request. */
10581
+ function estimateRequestOverheadTokens(systemPrompt, tools) {
10582
+ const definitions = tools.map(({ name, description, parameters }) => ({
10583
+ name,
10584
+ description,
10585
+ parameters
10586
+ }));
10587
+ return estimateTextTokens(systemPrompt + JSON.stringify(definitions));
10588
+ }
10510
10589
  /** Derive the automatic compaction threshold from model context capacity. */
10511
10590
  function calculateContextCompactionTriggerTokens(model) {
10512
10591
  const contextWindow = positiveInteger(model.contextWindow, FALLBACK_CONTEXT_WINDOW_TOKENS);
@@ -10530,6 +10609,13 @@ function getModelContextBudget(modelId) {
10530
10609
  function getAgentContextCompactionTriggerTokens(modelId) {
10531
10610
  return calculateContextCompactionTriggerTokens(getModelContextBudget(modelId));
10532
10611
  }
10612
+ /**
10613
+ * Resolve the input size where a Turn requests a background summary for the
10614
+ * active agent model. It is below the compaction threshold of the same budget.
10615
+ */
10616
+ function getAgentBackgroundCompactionMarkTokens(modelId) {
10617
+ return Math.max(1, Math.floor(getAgentContextCompactionTriggerTokens(modelId) * BACKGROUND_COMPACTION_MARK_RATIO));
10618
+ }
10533
10619
  /** Resolve the hard input ceiling for the active agent model. */
10534
10620
  function getAgentContextInputLimitTokens(modelId) {
10535
10621
  return calculateContextInputLimitTokens(getModelContextBudget(modelId));
@@ -10963,12 +11049,14 @@ function userMessageContent(message) {
10963
11049
  function isRuntimeTurnContextPart(part) {
10964
11050
  return part !== null && typeof part === "object" && part.type === "text" && typeof part.text === "string" && (part.text.startsWith(RUNTIME_TURN_CONTEXT_START) || part.text.startsWith(AGENTS_INSTRUCTIONS_START));
10965
11051
  }
11052
+ /** Whether a user message carries a Turn instruction, not only context. */
10966
11053
  function hasCurrentInstruction(message) {
10967
11054
  return userMessageContent(message)?.some((part) => part !== null && typeof part === "object" && part.type === "text" && typeof part.text === "string" && part.text.includes("<current-instruction")) ?? false;
10968
11055
  }
10969
11056
  function messageTimestamp$1(message) {
10970
11057
  return message.timestamp;
10971
11058
  }
11059
+ /** Return whether the message is a Turn's context, paired with the instruction after it. */
10972
11060
  function isStandaloneRuntimeContextMessage(messages, index) {
10973
11061
  const message = messages[index];
10974
11062
  const next = messages[index + 1];
@@ -11232,6 +11320,8 @@ const agentInputSchema = z.object({
11232
11320
  /** Identity of the input author, resolved at ingress. */
11233
11321
  authorIdentityId: z.string().min(1).optional(),
11234
11322
  metadata: z.record(z.string(), z.unknown()).optional(),
11323
+ /** Review item change that this input reports, on any Source. */
11324
+ reviewItemChange: reviewItemChangeRecordSchema.optional(),
11235
11325
  text: z.string()
11236
11326
  }).strict().refine((input) => input.text.trim() || input.attachments?.length, { message: "agent input requires text or attachments" });
11237
11327
  /** Durable delivery modes for pending inbound mailbox work. */
@@ -12106,6 +12196,7 @@ async function cancelHumanFacingPendingMessages(args) {
12106
12196
  }
12107
12197
  /**
12108
12198
  * Mark one author's queued web messages as interrupts without a worker lease.
12199
+ * `authorIds` lists every id that names the author.
12109
12200
  *
12110
12201
  * The active Turn drains them at its next model boundary when it belongs to the
12111
12202
  * same author. Otherwise they start the next Turn ahead of deferred input.
@@ -12118,7 +12209,7 @@ async function steerWebPendingMessages(args) {
12118
12209
  if (!current) return { steeredInboundMessageIds: [] };
12119
12210
  const steeredInboundMessageIds = [];
12120
12211
  const pendingMessages = current.execution.pendingMessages.map((message) => {
12121
- if (message.source !== "web" || message.delivery !== "defer" || message.input.authorId !== args.authorId || !requestedIds.has(message.inboundMessageId)) return message;
12212
+ if (message.source !== "web" || message.delivery !== "defer" || message.input.authorId === void 0 || !args.authorIds.includes(message.input.authorId) || !requestedIds.has(message.inboundMessageId)) return message;
12122
12213
  steeredInboundMessageIds.push(message.inboundMessageId);
12123
12214
  return {
12124
12215
  ...message,
@@ -12304,6 +12395,7 @@ async function clearExpiredConversationLease(args) {
12304
12395
  if (!current?.execution.lease || current.execution.lease.expiresAtMs > nowMs) return "not_expired";
12305
12396
  const retryCount = (current.execution.retryCount ?? 0) + 1;
12306
12397
  const stopped = retryCount >= 5;
12398
+ if (stopped) await args.beforeWorkStops?.(args.conversationId, current.execution.inboundMessageIds);
12307
12399
  await writeConversation(state, lock, withExecutionUpdate(current, {
12308
12400
  ...current.execution,
12309
12401
  lastEnqueuedAtMs: void 0,
@@ -13487,7 +13579,7 @@ function markConversationMessage(conversation, messageId, patch) {
13487
13579
  * individually instead of treating the whole block as one flat narrative.
13488
13580
  */
13489
13581
  function buildConversationContext(conversation, options = {}) {
13490
- const messages = conversation.messages.filter((entry) => entry.id !== options.excludeMessageId);
13582
+ const messages = conversation.messages.filter((entry) => !options.excludeMessageIds?.includes(entry.id));
13491
13583
  if (messages.length === 0 && conversation.compactions.length === 0) return;
13492
13584
  const lines = [];
13493
13585
  if (conversation.compactions.length > 0) {
@@ -14516,4 +14608,4 @@ async function recordGuardianActionReviewed(args) {
14516
14608
  createdAtMs: Date.now()
14517
14609
  }]);
14518
14610
  }
14519
- export { loadTurnCheckpoint as $, configValueSchema as $a, runWithWorkspaceTeamId as $i, canAgentChangeReviewItem as $n, isAlreadyExistsError as $r, isAssistantMessage as $t, buildConversationContext as A, conversationNotArchivedForEmail as Aa, findMatchingWatches as Ai, getPluginSystemPromptContributions as An, formatProviderLabel as Ar, recordConversationRetry as At, createPluginEgress as B, matchSlackAttachments as Ba, verifyTimerWatchCredentialSubject as Bi, closeReviewItem as Bn, addReactionToMessage as Br, TurnSliceLimitExceededError as Bt, projectConversationMessages as C, createPluginLogger as Ca, STOP_WATCHING_TOOL_NAME as Ci, getOAuthAccountProviders as Cn, hash as Cr, hasConversationStop as Ct, fallbackShortTitle as D, conversationArchivedForUser as Da, createTimerWatch as Di, getPluginApiRoutes as Dn, isVercelSandboxEgressRequest as Dr, listActiveConversationIds as Dt, settleConversationTitleWork as E, conversationArchivedForEmail as Ea, collectEventMatchKeys as Ei, createPluginHookRunner as En, getSandboxProvider as Er, isInvalidConversationRecordError as Et, markConversationMessage as F, readConversationEventPage as Fa, bindScheduledAutomationCredentialSubject as Fi, validatePlugins as Fn, formatSlackLink as Fr, startConversationWork as Ft, AuthorizationFlowDisabledError as G, createPluginAnnotations as Ga, getSlackClient as Gi, insertReviewItem as Gn, postSlackEphemeralMessage as Gr, CODEMODE_TOOL_NAME as Gt, createPluginAuthOrchestration as H, recordSlackAttachment as Ha, downloadPrivateSlackFile as Hi, dismissOpenReviewItems as Hn, getSlackMessagePermalink as Hr, buildTurnErrorResponse as Ht, normalizeConversationText as I, buildSentryConversationUrl as Ia, bindSlackDirectCredentialSubject as Ii, coreTaskRegistrations as In, normalizeSlackReplyMarkdown as Ir, steerWebPendingMessages as It, canReusePendingAuthLink as J, defaultTimezone as Ja, normalizeSlackConversationId as Ji, searchReviewItems as Jn, updateSlackMessage as Jr, getPiMessageRole as Jt, AuthorizationPauseError as K, listConversationAnnotations as Ka, isConversationScopedChannel as Ki, listReplyActionItems as Kn, postSlackMessage as Kr, persistWithRetry as Kt, recordDeliveredAssistantMessage as L, loadForkHistory as La, verifyEventAutomationCredentialSubject as Li, registration_exports as Ln, normalizeSlackStatusText as Lr, stopConversationWork as Lt, estimateConversationContextTokens as M, viewerConversationMembership as Ma, listWatches as Mi, getPluginUserPromptContributions as Mn, resolveBaseUrl as Mr, removeActiveConversation as Mt, getConversationMessageSlackTs as N, createPluginConversationEvents as Na, takeDueTimerWatches as Ni, getPlugins as Nn, startOAuthFlow as Nr, requestAnotherSlice as Nt, resolveTaskTitle as O, conversationHasParticipantUser as Oa, createWatch as Oi, getPluginRoutes as On, proxyVercelSandboxEgressRequest as Or, markConversationWorkEnqueued as Ot, isHumanConversationMessage as P, readLatestConversationBrief as Pa, bindEventAutomationCredentialSubject as Pi, setPlugins as Pn, escapeSlackMrkdwnText as Pr, requestConversationWork as Pt, continuableMessages as Q, createDurableLocationConfigurationService as Qa, getWorkspaceTeamId as Qi, canActOnReviewItem as Qn, isAbortError as Qr, instructionTextForProjection as Qt, turnHasReply as R, notInheritedByForkChild as Ra, verifyScheduledAutomationCredentialSubject as Ri, setBriefsConfig as Rn, slackMention as Rr, TURN_LIMIT_WRAP_UP_MESSAGE as Rt, persistConversationMessages as S, createPluginModel as Sa, RESOURCE_WATCH_TOOL_SOURCE as Si, createUserTokenStore as Sn, create as Sr, getConversationWorkState as St, resolveConversationTitle as T, conversationArchiveTimes as Ta, cancelWatch as Ti, agent_hooks_exports as Tn, ensureDockerDaemon as Tr, isFinalAttempt as Tt, authorizationId as U, resolveRootVisibility as Ua, getFilePermalink as Ui, getOpenReviewItemByDedupeKey as Un, openSlackDirectMessage as Ur, createTurnLimitGate as Ut, PluginCredentialFailureError as V, readAttachmentVisionSummary as Va, SlackActionError as Vi, countReviewItemsNeedingUser as Vn, deleteSlackMessage as Vr, TurnToolCallLimitExceededError as Vt, AuthPausePersistenceError as W, saveObjectAnnotations as Wa, getHeaderString as Wi, getReviewItem as Wn, openSlackModal as Wr, isTurnExecutionLimitExceededError as Wt, getConversationPendingAuth as X, lookupSlackUser as Xa, withSlackRetries as Xi, updateReviewItemContent as Xn, slackEntitySchema as Xr, getUserMessageInstructionText as Xt, clearPendingAuth as Y, resolveUserTimezone as Ya, runWithSlackInstallationToken as Yi, takeReviewItem as Yn, uploadFilesToConversation as Yr, getTerminalAssistantMessages as Yt, wasPendingAuthStopped as Z, createPluginCache as Za, sleep$2 as Zi, PLUGIN_REVIEW_ITEM_KEY_PREFIX as Zn, slackExternalRefIdSchema as Zr, hasRuntimeTurnContext as Zt, recordSubscribedReplyRoute as _, sandboxSkillDir as _a, workspaceRepoCheckoutPath as _i, getAgentContextCompactionTriggerTokens as _n, WorkspaceValidationError as _r, completeConversationStop as _t, loadLastModelProfile as a, setDashboardConversationLinkOptions as aa, workspaceSnapshotNotReadyUserMessage as ai, stripRuntimeTurnContext as an, setConfigDefaults as ao, reviewItemReaderForUser as ar, listTurnSummaries as at, appendConversationMessages as b, createPluginState as ba, RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS as bi, isExperimentalFeatureEnabled as bn, setWorkspaceSnapshot as br, drainConversationMailbox as bt, loadTurnRoute as c, buildCommandScript as ca, consumeSandboxEgressPermissionDeniedSignal as ci, SESSION_CONTEXT_SECTION_TAG as cn, resolveAssignee as cr, CONVERSATION_WORK_STALE_ENQUEUE_MS as ct, recordAttachmentsDelivered as d, SANDBOX_COMMAND_PATH as da, sandboxEgressSignalsResponseSchema as di, buildDeterministicTurnId as dn, deleteWorkspace as dr, appendInboundMessage as dt, JUNIOR_THREAD_STATE_TTL_MS as ea, throwSandboxOperationError as ei, isContinuablePiBoundary as en, historyItemFromPiMessage as eo, canReadReviewItem as er, saveTurnCheckpoint as et, recordAuthenticationLinked as f, SANDBOX_DATA_ROOT as fa, buildSandboxEgressNetworkPolicy as fi, SubscribedReplyReason as fn, getWorkspace as fr, beginConversationResume as ft, recordMcpProviderConnected as g, SANDBOX_WORKSPACE_ROOT as ga, tryWorkspaceRepoCheckoutPath as gi, estimateTextTokens as gn, updateWorkspace as gr, clearExpiredConversationLease as gt, recordGuardianActionReviewed as h, SANDBOX_SKILLS_ROOT as ha, SANDBOX_RUNTIME as hi, getThreadStopDecision as hn, listWorkspacesByRepository as hr, clearConsumedConversationWake as ht, loadConversationProjection as i, getDashboardTaskLink as ia, isWorkspaceSnapshotNotReadyError as ii, retainRuntimeTurnContext as in, getConfigDefaults as io, requireReviewItemLinks as ir, getTurnRecord as it, createConversationMemoryService as j, conversationNotArchivedForUser as ja, getWatch as ji, getPluginTools as jn, parseOAuthStatePayload as jr, releaseConversationWork as jt, appendThreadContextMessages as k, conversationIsMemberRoot as ka, deliverWatch as ki, getPluginSlackConversationLink as kn, deliverOAuthAuthorization as kr, recordAttemptFailure as kt, openConversationProjection as l, buildNonInteractiveShellScript as la, createSandboxEgressCredentialToken as li, TURN_CONTEXT_TAG as ln, resolveAssignees as lr, ackMessages as lt, recordAuthorizationRequested as m, SANDBOX_REPOS_ROOT as ma, normalizeSandboxEgressTracePropagationDomains as mi, getSubscribedReplyPreflightDecision as mn, listWorkspaces as mr, checkInConversationWork as mt, commitMessages as n, getDashboardObjectIconLink as na, WorkspaceSnapshotNotReadyError as ni, isToolResultMessage as nn, JUNIOR_NATIVE_EVENT_NAMESPACE as no, readReviewItemAgentScope as nr, completeTurnRecord as nt, loadProjection as o, ToolInputError as oa, clearSandboxEgressSignals as oi, trimTrailingAssistantMessages as on, EVERYONE_ASSIGNEE as or, recordTurnSummary as ot, recordAuthorizationCompleted as p, SANDBOX_JUNIOR_ROOT as pa, resolveSandboxCommandEnvironment as pi, decideSubscribedThreadReply as pn, getWorkspaceByName as pr, cancelHumanFacingPendingMessages as pt, abandonReplacedPendingAuth as q, listConversationAnnotationsById as qa, isDmChannel as qi, listWaitingConversations as qn, removeReactionFromMessage as qr, extractAssistantText as qt, loadConnectedMcpProviders as r, getDashboardReviewItemLink as ra, getWorkspaceSnapshotNotReadyError as ri, normalizeToolNameFromResult as rn, conversationNoteEvent as ro, requireReviewItemAssignees as rr, failTurnRecord as rt, loadTurnProjection as s, PluginToolDeniedError as sa, consumeSandboxEgressAuthRequiredSignal as si, REQUEST_CONTEXT_SECTION_TAG as sn, automationCreatorUserId as sr, CONVERSATION_WORK_CHECK_IN_INTERVAL_MS as st, commitAcceptedReply as t, getDashboardConversationLink as ta, wrapSandboxSetupError as ti, isToolResultError as tn, piMessageFromHistoryItem as to, isOnlyAssignee as tr, abandonTurnRecord as tt, recordAgentsInstructionsUpdated as u, runNonInteractiveCommand as ua, parseSandboxEgressCredentialToken as ui, buildDeterministicAssistantMessageId as un, createWorkspace as ur, appendExclusiveInboundMessage as ut, recordToolExecutionStarted as v, sandboxSkillFile as va, resolveChannelCapabilities as vi, getAgentContextInputLimitTokens as vn, invalidateReadySnapshot as vr, completeConversationWork as vt, persistConversationMessageSummaries as w, readConversationAccessFromSql as wa, cancelSubscriptions as wi, resolvePluginOAuthAccount as wn, isStale as wr, hasRunnableConversationWork as wt, hydrateConversationMessages as x, createPluginEmbedder as xa, RESOURCE_SUBSCRIPTION_MAX_TTL_MS as xi, setExperimentalFeatures as xn, setWorkspaceSnapshotBuild as xr, getConversation as xt, recordTurnRoute as y, sandboxSkillPathResolution as ya, getSlackToolContext as yi, getExperimentalFeatures as yn, loadSnapshotsForProfile as yr, deadLetterAttempt as yt, upsertConversationMessage as z, getSlackFileId as za, verifySlackDirectCredentialSubject as zi, REVIEW_ITEM_REPLIED_REASON as zn, truncateStatusText as zr, TurnBudgetExceededError as zt };
14611
+ export { loadTurnCheckpoint as $, listConversationAnnotations as $a, isConversationScopedChannel as $i, listReplyActionItems as $n, postSlackMessage as $r, instructionTextForProjection as $t, buildConversationContext as A, createPluginLogger as Aa, STOP_WATCHING_TOOL_NAME as Ai, getOAuthAccountProviders as An, hash as Ar, recordConversationRetry as At, createPluginEgress as B, createPluginConversationEvents as Ba, takeDueTimerWatches as Bi, getPlugins as Bn, startOAuthFlow as Br, TurnSliceLimitExceededError as Bt, projectConversationMessages as C, SANDBOX_WORKSPACE_ROOT as Ca, tryWorkspaceRepoCheckoutPath as Ci, getAgentContextInputLimitTokens as Cn, updateWorkspace as Cr, hasConversationStop as Ct, fallbackShortTitle as D, createPluginState as Da, RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS as Di, createUserTokenStore as Dn, setWorkspaceSnapshot as Dr, listActiveConversationIds as Dt, settleConversationTitleWork as E, sandboxSkillPathResolution as Ea, getSlackToolContext as Ei, setExperimentalFeatures as En, loadSnapshotsForProfile as Er, isInvalidConversationRecordError as Et, markConversationMessage as F, conversationHasParticipantUser as Fa, createWatch as Fi, getPluginRoutes as Fn, proxyVercelSandboxEgressRequest as Fr, startConversationWork as Ft, AuthorizationFlowDisabledError as G, notInheritedByForkChild as Ga, verifyScheduledAutomationCredentialSubject as Gi, setBriefsConfig as Gn, slackMention as Gr, CODEMODE_TOOL_NAME as Gt, createPluginAuthOrchestration as H, readConversationEventPage as Ha, bindScheduledAutomationCredentialSubject as Hi, validatePlugins as Hn, formatSlackLink as Hr, buildTurnErrorResponse as Ht, normalizeConversationText as I, conversationIsMemberRoot as Ia, deliverWatch as Ii, getPluginSlackConversationLink as In, deliverOAuthAuthorization as Ir, steerWebPendingMessages as It, canReusePendingAuthLink as J, readAttachmentVisionSummary as Ja, SlackActionError as Ji, countReviewItemsNeedingUser as Jn, deleteSlackMessage as Jr, getPiMessageRole as Jt, AuthorizationPauseError as K, getSlackFileId as Ka, verifySlackDirectCredentialSubject as Ki, REVIEW_ITEM_REPLIED_REASON as Kn, truncateStatusText as Kr, persistWithRetry as Kt, recordDeliveredAssistantMessage as L, conversationNotArchivedForEmail as La, findMatchingWatches as Li, getPluginSystemPromptContributions as Ln, formatProviderLabel as Lr, stopConversationWork as Lt, estimateConversationContextTokens as M, conversationArchiveTimes as Ma, cancelWatch as Mi, agent_hooks_exports as Mn, ensureDockerDaemon as Mr, removeActiveConversation as Mt, getConversationMessageSlackTs as N, conversationArchivedForEmail as Na, collectEventMatchKeys as Ni, createPluginHookRunner as Nn, getSandboxProvider as Nr, requestAnotherSlice as Nt, resolveTaskTitle as O, createPluginEmbedder as Oa, RESOURCE_SUBSCRIPTION_MAX_TTL_MS as Oi, findLegacyWebActorUserId as On, setWorkspaceSnapshotBuild as Or, markConversationWorkEnqueued as Ot, isHumanConversationMessage as P, conversationArchivedForUser as Pa, createTimerWatch as Pi, getPluginApiRoutes as Pn, isVercelSandboxEgressRequest as Pr, requestConversationWork as Pt, continuableMessages as Q, createPluginAnnotations as Qa, getSlackClient as Qi, insertReviewItem as Qn, postSlackEphemeralMessage as Qr, hasRuntimeTurnContext as Qt, turnHasReply as R, conversationNotArchivedForUser as Ra, getWatch as Ri, getPluginTools as Rn, parseOAuthStatePayload as Rr, TURN_LIMIT_WRAP_UP_MESSAGE as Rt, persistConversationMessages as S, SANDBOX_SKILLS_ROOT as Sa, SANDBOX_RUNTIME as Si, getAgentContextCompactionTriggerTokens as Sn, listWorkspacesByRepository as Sr, getConversationWorkState as St, resolveConversationTitle as T, sandboxSkillFile as Ta, resolveChannelCapabilities as Ti, isExperimentalFeatureEnabled as Tn, invalidateReadySnapshot as Tr, isFinalAttempt as Tt, authorizationId as U, buildSentryConversationUrl as Ua, bindSlackDirectCredentialSubject as Ui, coreTaskRegistrations as Un, normalizeSlackReplyMarkdown as Ur, createTurnLimitGate as Ut, PluginCredentialFailureError as V, readLatestConversationBrief as Va, bindEventAutomationCredentialSubject as Vi, setPlugins as Vn, escapeSlackMrkdwnText as Vr, TurnToolCallLimitExceededError as Vt, AuthPausePersistenceError as W, loadForkHistory as Wa, verifyEventAutomationCredentialSubject as Wi, registration_exports as Wn, normalizeSlackStatusText as Wr, isTurnExecutionLimitExceededError as Wt, getConversationPendingAuth as X, resolveRootVisibility as Xa, getFilePermalink as Xi, getOpenReviewItemByDedupeKey as Xn, openSlackDirectMessage as Xr, getUserMessageInstructionText as Xt, clearPendingAuth as Y, recordSlackAttachment as Ya, downloadPrivateSlackFile as Yi, dismissOpenReviewItems as Yn, getSlackMessagePermalink as Yr, getTerminalAssistantMessages as Yt, wasPendingAuthStopped as Z, saveObjectAnnotations as Za, getHeaderString as Zi, getReviewItem as Zn, openSlackModal as Zr, hasCurrentInstruction as Zt, recordSubscribedReplyRoute as _, runNonInteractiveCommand as _a, parseSandboxEgressCredentialToken as _i, getThreadStopDecision as _n, createWorkspace as _r, completeConversationStop as _t, loadLastModelProfile as a, getWorkspaceTeamId as aa, isAbortError as ai, normalizeToolNameFromResult as an, createDurableLocationConfigurationService as ao, canActOnReviewItem as ar, listTurnSummaries as at, appendConversationMessages as b, SANDBOX_JUNIOR_ROOT as ba, resolveSandboxCommandEnvironment as bi, estimateTextTokens as bn, getWorkspaceByName as br, drainConversationMailbox as bt, loadTurnRoute as c, getDashboardConversationLink as ca, wrapSandboxSetupError as ci, trimTrailingAssistantMessages as cn, piMessageFromHistoryItem as co, isOnlyAssignee as cr, CONVERSATION_WORK_STALE_ENQUEUE_MS as ct, recordAttachmentsDelivered as d, getDashboardTaskLink as da, isWorkspaceSnapshotNotReadyError as di, TURN_CONTEXT_TAG as dn, conversationNoteEvent as do, requireReviewItemLinks as dr, appendInboundMessage as dt, isDmChannel as ea, removeReactionFromMessage as ei, isAssistantMessage as en, listConversationAnnotationsById as eo, listWaitingConversations as er, saveTurnCheckpoint as et, recordAuthenticationLinked as f, setDashboardConversationLinkOptions as fa, workspaceSnapshotNotReadyUserMessage as fi, buildDeterministicAssistantMessageId as fn, getConfigDefaults as fo, reviewItemReaderForUser as fr, beginConversationResume as ft, recordMcpProviderConnected as g, buildNonInteractiveShellScript as ga, createSandboxEgressCredentialToken as gi, getSubscribedReplyPreflightDecision as gn, resolveAssignees as gr, clearExpiredConversationLease as gt, recordGuardianActionReviewed as h, buildCommandScript as ha, consumeSandboxEgressPermissionDeniedSignal as hi, decideSubscribedThreadReply as hn, resolveAssignee as hr, clearConsumedConversationWake as ht, loadConversationProjection as i, sleep$2 as ia, slackExternalRefIdSchema as ii, isToolResultMessage as in, createPluginCache as io, PLUGIN_REVIEW_ITEM_KEY_PREFIX as ir, getTurnRecord as it, createConversationMemoryService as j, readConversationAccessFromSql as ja, cancelSubscriptions as ji, resolvePluginOAuthAccount as jn, isStale as jr, releaseConversationWork as jt, appendThreadContextMessages as k, createPluginModel as ka, RESOURCE_WATCH_TOOL_SOURCE as ki, webActorUserIds as kn, create as kr, recordAttemptFailure as kt, openConversationProjection as l, getDashboardObjectIconLink as la, WorkspaceSnapshotNotReadyError as li, REQUEST_CONTEXT_SECTION_TAG as ln, projectConversationEvents as lo, readReviewItemAgentScope as lr, ackMessages as lt, recordAuthorizationRequested as m, PluginToolDeniedError as ma, consumeSandboxEgressAuthRequiredSignal as mi, SubscribedReplyReason as mn, automationCreatorUserId as mr, checkInConversationWork as mt, commitMessages as n, runWithSlackInstallationToken as na, uploadFilesToConversation as ni, isStandaloneRuntimeContextMessage as nn, resolveUserTimezone as no, takeReviewItem as nr, completeTurnRecord as nt, loadProjection as o, runWithWorkspaceTeamId as oa, isAlreadyExistsError as oi, retainRuntimeTurnContext as on, configValueSchema as oo, canAgentChangeReviewItem as or, recordTurnSummary as ot, recordAuthorizationCompleted as p, ToolInputError as pa, clearSandboxEgressSignals as pi, buildDeterministicTurnId as pn, setConfigDefaults as po, EVERYONE_ASSIGNEE as pr, cancelHumanFacingPendingMessages as pt, abandonReplacedPendingAuth as q, matchSlackAttachments as qa, verifyTimerWatchCredentialSubject as qi, closeReviewItem as qn, addReactionToMessage as qr, extractAssistantText as qt, loadConnectedMcpProviders as r, withSlackRetries as ra, slackEntitySchema as ri, isToolResultError as rn, lookupSlackUser as ro, updateReviewItemContent as rr, failTurnRecord as rt, loadTurnProjection as s, JUNIOR_THREAD_STATE_TTL_MS as sa, throwSandboxOperationError as si, stripRuntimeTurnContext as sn, historyItemFromPiMessage as so, canReadReviewItem as sr, CONVERSATION_WORK_CHECK_IN_INTERVAL_MS as st, commitAcceptedReply as t, normalizeSlackConversationId as ta, updateSlackMessage as ti, isContinuablePiBoundary as tn, defaultTimezone as to, searchReviewItems as tr, abandonTurnRecord as tt, recordAgentsInstructionsUpdated as u, getDashboardReviewItemLink as ua, getWorkspaceSnapshotNotReadyError as ui, SESSION_CONTEXT_SECTION_TAG as un, JUNIOR_NATIVE_EVENT_NAMESPACE as uo, requireReviewItemAssignees as ur, appendExclusiveInboundMessage as ut, recordToolExecutionStarted as v, SANDBOX_COMMAND_PATH as va, sandboxEgressSignalsResponseSchema as vi, calculateContextCompactionTargetTokens as vn, deleteWorkspace as vr, completeConversationWork as vt, persistConversationMessageSummaries as w, sandboxSkillDir as wa, workspaceRepoCheckoutPath as wi, getExperimentalFeatures as wn, WorkspaceValidationError as wr, hasRunnableConversationWork as wt, hydrateConversationMessages as x, SANDBOX_REPOS_ROOT as xa, normalizeSandboxEgressTracePropagationDomains as xi, getAgentBackgroundCompactionMarkTokens as xn, listWorkspaces as xr, getConversation as xt, recordTurnRoute as y, SANDBOX_DATA_ROOT as ya, buildSandboxEgressNetworkPolicy as yi, estimateRequestOverheadTokens as yn, getWorkspace as yr, deadLetterAttempt as yt, upsertConversationMessage as z, viewerConversationMembership as za, listWatches as zi, getPluginUserPromptContributions as zn, resolveBaseUrl as zr, TurnBudgetExceededError as zt };
@@ -1,4 +1,4 @@
1
- import { J as briefOutcomeStatusSchema, X as parseBriefInput, Y as conversationBriefSchema } from "./conversation-BjTo9ZFL.js";
1
+ import { X as conversationBriefSchema, Y as briefOutcomeStatusSchema, Z as parseBriefInput } from "./conversation-DppJ83Hw.js";
2
2
  import { z } from "zod";
3
3
  // src/chat/briefs/generate.ts
4
4
  const MAX_INPUT_CHARS = 6e4;
@@ -1,4 +1,4 @@
1
- import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-DYRS7E8s.js";
1
+ import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-B04X_eCB.js";
2
2
  import { o as isUserActor, s as parseActorUserId } from "./actor-B4DYygOB.js";
3
3
  import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJBompdd.js";
4
4
  import path from "node:path";
@@ -1,6 +1,6 @@
1
- import { Er as getSandboxProvider, Sr as create, Zi as sleep, da as SANDBOX_COMMAND_PATH, ga as SANDBOX_WORKSPACE_ROOT, ua as runNonInteractiveCommand, wr as isStale } from "./projection-CMRrv9Pt.js";
2
- import { E as withSpan, b as setSpanAttributes } from "./logging-DYRS7E8s.js";
3
- import { r as getStateAdapter } from "./adapter-4qThDhgF.js";
1
+ import { Ca as SANDBOX_WORKSPACE_ROOT, Nr as getSandboxProvider, _a as runNonInteractiveCommand, ia as sleep, jr as isStale, kr as create, va as SANDBOX_COMMAND_PATH } from "./projection-6dXaN0n-.js";
2
+ import { E as withSpan, b as setSpanAttributes } from "./logging-B04X_eCB.js";
3
+ import { r as getStateAdapter } from "./adapter-DoPR2jS-.js";
4
4
  import { z } from "zod";
5
5
  // src/chat/sandbox/resources.ts
6
6
  let configuredResources;
@@ -1,14 +1,14 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { at as listTurnSummaries, it as getTurnRecord } from "./projection-CMRrv9Pt.js";
2
+ import { at as listTurnSummaries, it as getTurnRecord } from "./projection-6dXaN0n-.js";
3
3
  import { t as createActor } from "./actor-B4DYygOB.js";
4
- import { M as SYSTEM_IDENTITY_ID } from "./viewer-D25XOUHc.js";
5
- import { f as credentialContextForActor } from "./registry-D92WLl5I.js";
6
- import { Ct as listUnreportedSiblingAgents } from "./agent-runner-CLHM48dh.js";
7
- import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-JEWUUpLW.js";
8
- import { C as markAgentInvocationParentMailboxAppended, a as createAgentInvocationFromLatest, c as getAgentInvocationIdForEvents, f as getAgentInvocationResultMessageId, g as getLatestAgentInvocationForConversation, l as getAgentInvocationIdForMessage, s as getAgentInvocation, u as getAgentInvocationIdForResult, v as isTerminalAgentInvocation } from "./store-BIQYXvoV.js";
9
- import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-CI5qJU7a.js";
10
- import { r as appendAndEnqueueInboundMessage } from "./store-BvI3yBGS.js";
11
- import { i as resolveAgentInvocationId, r as enqueueAgentInvocation, t as createAgentInvocationWorker } from "./work-D12-wcf4.js";
4
+ import { M as SYSTEM_IDENTITY_ID } from "./viewer-CQwBszc7.js";
5
+ import { f as credentialContextForActor } from "./registry-CEqKR_ld.js";
6
+ import { wt as listUnreportedSiblingAgents } from "./agent-runner-sMpA5qGM.js";
7
+ import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-B4fQKGZR.js";
8
+ import { _ as getLatestAgentInvocationForConversation, c as getAgentInvocation, d as getAgentInvocationIdForResult, l as getAgentInvocationIdForEvents, o as createAgentInvocationFromLatest, p as getAgentInvocationResultMessageId, u as getAgentInvocationIdForMessage, w as markAgentInvocationParentMailboxAppended, y as isTerminalAgentInvocation } from "./store-C5uVTx2G.js";
9
+ import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-DK8LuPZW.js";
10
+ import { r as appendAndEnqueueInboundMessage } from "./store-BgH2P3X9.js";
11
+ import { a as resolveAgentInvocationId, i as enqueueAgentInvocation, t as createAgentInvocationWorker } from "./work-BHlShEQ6.js";
12
12
  import { z } from "zod";
13
13
  import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
14
14
  // src/chat/conversations/web-mailbox.ts
@@ -1,14 +1,14 @@
1
- import { A as buildConversationContext, F as markConversationMessage, I as normalizeConversationText, Kt as persistWithRetry, L as recordDeliveredAssistantMessage, S as persistConversationMessages, U as authorizationId, et as saveTurnCheckpoint, o as loadProjection, p as recordAuthorizationCompleted, t as commitAcceptedReply, x as hydrateConversationMessages, z as upsertConversationMessage } from "./projection-CMRrv9Pt.js";
2
- import { S as setTags, T as withLogContext, p as logException } from "./logging-DYRS7E8s.js";
3
- import { M as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-D25XOUHc.js";
4
- import { f as credentialContextForActor } from "./registry-D92WLl5I.js";
5
- import { z as messageCardText } from "./conversation-BjTo9ZFL.js";
6
- import { $ as startActiveTurn, Q as markTurnFailed } from "./store-BIQYXvoV.js";
7
- import { n as getAssistantReplyText } from "./assistant-reply-2IwdFWuQ.js";
8
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-B7O6rZEX.js";
9
- import { a as persistThreadStateById, n as getPersistedSandboxState, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-ngCvtWNa.js";
10
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-DQr2QfvJ.js";
11
- import { i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent, u as loadPendingMessageCards } from "./turn-failure-response-BDT3sT2v.js";
1
+ import { A as buildConversationContext, F as markConversationMessage, I as normalizeConversationText, Kt as persistWithRetry, L as recordDeliveredAssistantMessage, S as persistConversationMessages, U as authorizationId, et as saveTurnCheckpoint, o as loadProjection, p as recordAuthorizationCompleted, t as commitAcceptedReply, x as hydrateConversationMessages, z as upsertConversationMessage } from "./projection-6dXaN0n-.js";
2
+ import { S as setTags, T as withLogContext, p as logException } from "./logging-B04X_eCB.js";
3
+ import { M as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-CQwBszc7.js";
4
+ import { f as credentialContextForActor } from "./registry-CEqKR_ld.js";
5
+ import { B as messageCardText } from "./conversation-DppJ83Hw.js";
6
+ import { $ as markTurnFailed, et as startActiveTurn } from "./store-C5uVTx2G.js";
7
+ import { n as getAssistantReplyText } from "./assistant-reply-DbxKnBQF.js";
8
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-CF6ibonp.js";
9
+ import { a as persistThreadStateById, n as getPersistedSandboxState, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BXjgk1pW.js";
10
+ import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-BwAkjjVE.js";
11
+ import { i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent, u as loadPendingMessageCards } from "./turn-failure-response-CVI57qKL.js";
12
12
  import { randomUUID } from "node:crypto";
13
13
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
14
14
  // src/chat/local/runner.ts
@@ -184,7 +184,7 @@ async function runLocalAgentTurnInContext(input, deps) {
184
184
  runId: currentRunId,
185
185
  instruction: {
186
186
  text,
187
- context: buildConversationContext(conversation, { excludeMessageId: userMessageId })
187
+ context: buildConversationContext(conversation, { excludeMessageIds: [userMessageId] })
188
188
  },
189
189
  history: messages,
190
190
  actor: localActor,
@@ -1,4 +1,4 @@
1
- import { di as sandboxEgressSignalsResponseSchema } from "./projection-CMRrv9Pt.js";
1
+ import { vi as sandboxEgressSignalsResponseSchema } from "./projection-6dXaN0n-.js";
2
2
  // 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;