@sentry/junior 0.275.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-dE2BiWP_.js → adapter-DoPR2jS-.js} +1 -1
  2. package/dist/{admin-CkPaAYuZ.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-bE7aH7ew.js → agent-runner-sMpA5qGM.js} +266 -202
  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-CgkquhZ8.d.ts → app-DTj-yAQt.d.ts} +10 -2
  10. package/dist/app.d.ts +1 -1
  11. package/dist/app.js +192 -86
  12. package/dist/{assistant-reply-CjRU9Z59.js → assistant-reply-DbxKnBQF.js} +1 -1
  13. package/dist/{automation-BGrd03QO.js → automation-B8_mC68r.js} +42 -13
  14. package/dist/{background-compaction-queue-BYuOt3qK.js → background-compaction-queue-Bywqo1WJ.js} +2 -2
  15. package/dist/{briefs-6xUvmGos.js → briefs-IL7QnCCR.js} +4 -4
  16. package/dist/{catalog-runtime-DcJ5NHDW.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-gnKpkpqP.js → client-7diKvInp.js} +2 -2
  25. package/dist/{config-D0GKc9sC.js → config-Cb--cuv-.js} +2 -2
  26. package/dist/{connections-DLqP5Bp1.js → connections-C4-4fxaE.js} +14 -14
  27. package/dist/{conversation-BjTo9ZFL.js → conversation-DppJ83Hw.js} +32 -7
  28. package/dist/{conversation-privacy-BCXFshP9.js → conversation-privacy-DTwdT3Pi.js} +1 -1
  29. package/dist/{credential-sync-BjihXFF2.js → credential-sync-Sl5RQCkS.js} +13 -13
  30. package/dist/{db-BMZhoYKj.d.ts → db-Ck6TXQIx.d.ts} +1 -1
  31. package/dist/{executor-j8VMt-To.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-CFHIO4Vs.js → logging-B04X_eCB.js} +1 -1
  35. package/dist/{message-DH0cqFRS.js → message-DQMFyyE-.js} +9 -9
  36. package/dist/nitro.d.ts +1 -1
  37. package/dist/nitro.js +3 -3
  38. package/dist/{oauth-callback-server-BgU4EZsJ.js → oauth-callback-server-BGq0_vQI.js} +2 -2
  39. package/dist/{projection-CTvLSwcm.js → projection-6dXaN0n-.js} +99 -17
  40. package/dist/{prompt-JEWUUpLW.js → prompt-B4fQKGZR.js} +1 -1
  41. package/dist/{registry-OsyWR4GO.js → registry-CEqKR_ld.js} +1 -1
  42. package/dist/{resolve-DCrKjmVP.js → resolve-8I5DkrfI.js} +3 -3
  43. package/dist/{result-Btdt5bSl.js → result-BgAW90IM.js} +9 -9
  44. package/dist/{runner-C1AwS93W.js → runner-CSKDr_19.js} +12 -12
  45. package/dist/{sandbox-egress-signals-C-5i7Zxm.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-CQIW6At4.js → service-account-CUuVJCKT.js} +3 -3
  49. package/dist/{service-account-DZX1KlQl.js → service-account-CtOab1Xz.js} +3 -3
  50. package/dist/{session-stop-DjIyORJw.js → session-stop-DK8LuPZW.js} +155 -54
  51. package/dist/{skills-BEfAAT6p.js → skills-Bc0D7BGy.js} +2 -2
  52. package/dist/{spawn-Dgj4xxvO.js → spawn-DF_GUcd8.js} +2 -2
  53. package/dist/{stop-DomyNvuv.js → stop-DthSy-z8.js} +130 -81
  54. package/dist/{store-Dp3RMEQd.js → store-BgH2P3X9.js} +3 -3
  55. package/dist/{store-B7Z6zIc7.js → store-C5uVTx2G.js} +11 -9
  56. package/dist/{task-queue-CVQ9cWnC.js → task-queue-C6ROM_XJ.js} +3 -3
  57. package/dist/{task-runner-DHBG47gS.js → task-runner-BwAkjjVE.js} +6 -6
  58. package/dist/{thread-state-BF8VwIxd.js → thread-state-BXjgk1pW.js} +4 -4
  59. package/dist/{turn-failure-response-Di7TbgsF.js → turn-failure-response-CVI57qKL.js} +7 -7
  60. package/dist/{turn-lifecycle-DzXwXmLg.js → turn-lifecycle-CF6ibonp.js} +6 -1
  61. package/dist/{turn-session-routing-CIWhXKeT.js → turn-session-routing-DddybdNu.js} +17 -16
  62. package/dist/{validation-BRmwRaXc.js → validation-BxF1nQbC.js} +1 -1
  63. package/dist/{version-DBVMsgvA.js → version-CTzSbCmR.js} +1 -1
  64. package/dist/version.js +1 -1
  65. package/dist/{viewer-BFADRGP8.js → viewer-CQwBszc7.js} +10 -7
  66. package/dist/{work-DDaoxZAw.js → work-BHlShEQ6.js} +30 -12
  67. package/dist/{worker-Bub0fDtW.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,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-gnKpkpqP.js";
3
- import { _ as normalizeSlackEmojiName, i as getChatConfig, n as botConfig, o as getSlackBotToken } from "./config-D0GKc9sC.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-CFHIO4Vs.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-BCXFshP9.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-BFADRGP8.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-j8VMt-To.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-OsyWR4GO.js";
14
- import { n as pluginCatalogRuntime } from "./catalog-runtime-DcJ5NHDW.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-dE2BiWP_.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;
@@ -10508,6 +10577,15 @@ function positiveInteger(value, fallback) {
10508
10577
  function estimateTextTokens(text) {
10509
10578
  return Math.ceil(text.length / 4);
10510
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
+ }
10511
10589
  /** Derive the automatic compaction threshold from model context capacity. */
10512
10590
  function calculateContextCompactionTriggerTokens(model) {
10513
10591
  const contextWindow = positiveInteger(model.contextWindow, FALLBACK_CONTEXT_WINDOW_TOKENS);
@@ -11242,6 +11320,8 @@ const agentInputSchema = z.object({
11242
11320
  /** Identity of the input author, resolved at ingress. */
11243
11321
  authorIdentityId: z.string().min(1).optional(),
11244
11322
  metadata: z.record(z.string(), z.unknown()).optional(),
11323
+ /** Review item change that this input reports, on any Source. */
11324
+ reviewItemChange: reviewItemChangeRecordSchema.optional(),
11245
11325
  text: z.string()
11246
11326
  }).strict().refine((input) => input.text.trim() || input.attachments?.length, { message: "agent input requires text or attachments" });
11247
11327
  /** Durable delivery modes for pending inbound mailbox work. */
@@ -12116,6 +12196,7 @@ async function cancelHumanFacingPendingMessages(args) {
12116
12196
  }
12117
12197
  /**
12118
12198
  * Mark one author's queued web messages as interrupts without a worker lease.
12199
+ * `authorIds` lists every id that names the author.
12119
12200
  *
12120
12201
  * The active Turn drains them at its next model boundary when it belongs to the
12121
12202
  * same author. Otherwise they start the next Turn ahead of deferred input.
@@ -12128,7 +12209,7 @@ async function steerWebPendingMessages(args) {
12128
12209
  if (!current) return { steeredInboundMessageIds: [] };
12129
12210
  const steeredInboundMessageIds = [];
12130
12211
  const pendingMessages = current.execution.pendingMessages.map((message) => {
12131
- 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;
12132
12213
  steeredInboundMessageIds.push(message.inboundMessageId);
12133
12214
  return {
12134
12215
  ...message,
@@ -12314,6 +12395,7 @@ async function clearExpiredConversationLease(args) {
12314
12395
  if (!current?.execution.lease || current.execution.lease.expiresAtMs > nowMs) return "not_expired";
12315
12396
  const retryCount = (current.execution.retryCount ?? 0) + 1;
12316
12397
  const stopped = retryCount >= 5;
12398
+ if (stopped) await args.beforeWorkStops?.(args.conversationId, current.execution.inboundMessageIds);
12317
12399
  await writeConversation(state, lock, withExecutionUpdate(current, {
12318
12400
  ...current.execution,
12319
12401
  lastEnqueuedAtMs: void 0,
@@ -13497,7 +13579,7 @@ function markConversationMessage(conversation, messageId, patch) {
13497
13579
  * individually instead of treating the whole block as one flat narrative.
13498
13580
  */
13499
13581
  function buildConversationContext(conversation, options = {}) {
13500
- const messages = conversation.messages.filter((entry) => entry.id !== options.excludeMessageId);
13582
+ const messages = conversation.messages.filter((entry) => !options.excludeMessageIds?.includes(entry.id));
13501
13583
  if (messages.length === 0 && conversation.compactions.length === 0) return;
13502
13584
  const lines = [];
13503
13585
  if (conversation.compactions.length > 0) {
@@ -14526,4 +14608,4 @@ async function recordGuardianActionReviewed(args) {
14526
14608
  createdAtMs: Date.now()
14527
14609
  }]);
14528
14610
  }
14529
- export { loadTurnCheckpoint as $, resolveUserTimezone as $a, runWithSlackInstallationToken as $i, takeReviewItem as $n, uploadFilesToConversation as $r, instructionTextForProjection as $t, buildConversationContext as A, conversationArchivedForEmail as Aa, collectEventMatchKeys as Ai, createPluginHookRunner as An, getSandboxProvider as Ar, recordConversationRetry as At, createPluginEgress as B, buildSentryConversationUrl as Ba, bindSlackDirectCredentialSubject as Bi, coreTaskRegistrations as Bn, normalizeSlackReplyMarkdown as Br, TurnSliceLimitExceededError as Bt, projectConversationMessages as C, sandboxSkillPathResolution as Ca, getSlackToolContext as Ci, getExperimentalFeatures as Cn, loadSnapshotsForProfile as Cr, hasConversationStop as Ct, fallbackShortTitle as D, createPluginLogger as Da, STOP_WATCHING_TOOL_NAME as Di, getOAuthAccountProviders as Dn, hash as Dr, listActiveConversationIds as Dt, settleConversationTitleWork as E, createPluginModel as Ea, RESOURCE_WATCH_TOOL_SOURCE as Ei, createUserTokenStore as En, create as Er, isInvalidConversationRecordError as Et, markConversationMessage as F, conversationNotArchivedForUser as Fa, getWatch as Fi, getPluginTools as Fn, parseOAuthStatePayload as Fr, startConversationWork as Ft, AuthorizationFlowDisabledError as G, readAttachmentVisionSummary as Ga, SlackActionError as Gi, countReviewItemsNeedingUser as Gn, deleteSlackMessage as Gr, CODEMODE_TOOL_NAME as Gt, createPluginAuthOrchestration as H, notInheritedByForkChild as Ha, verifyScheduledAutomationCredentialSubject as Hi, setBriefsConfig as Hn, slackMention as Hr, buildTurnErrorResponse as Ht, normalizeConversationText as I, viewerConversationMembership as Ia, listWatches as Ii, getPluginUserPromptContributions as In, resolveBaseUrl as Ir, steerWebPendingMessages as It, canReusePendingAuthLink as J, saveObjectAnnotations as Ja, getHeaderString as Ji, getReviewItem as Jn, openSlackModal as Jr, getPiMessageRole as Jt, AuthorizationPauseError as K, recordSlackAttachment as Ka, downloadPrivateSlackFile as Ki, dismissOpenReviewItems as Kn, getSlackMessagePermalink as Kr, persistWithRetry as Kt, recordDeliveredAssistantMessage as L, createPluginConversationEvents as La, takeDueTimerWatches as Li, getPlugins as Ln, startOAuthFlow as Lr, stopConversationWork as Lt, estimateConversationContextTokens as M, conversationHasParticipantUser as Ma, createWatch as Mi, getPluginRoutes as Mn, proxyVercelSandboxEgressRequest as Mr, removeActiveConversation as Mt, getConversationMessageSlackTs as N, conversationIsMemberRoot as Na, deliverWatch as Ni, getPluginSlackConversationLink as Nn, deliverOAuthAuthorization as Nr, requestAnotherSlice as Nt, resolveTaskTitle as O, readConversationAccessFromSql as Oa, cancelSubscriptions as Oi, resolvePluginOAuthAccount as On, isStale as Or, markConversationWorkEnqueued as Ot, isHumanConversationMessage as P, conversationNotArchivedForEmail as Pa, findMatchingWatches as Pi, getPluginSystemPromptContributions as Pn, formatProviderLabel as Pr, requestConversationWork as Pt, continuableMessages as Q, defaultTimezone as Qa, normalizeSlackConversationId as Qi, searchReviewItems as Qn, updateSlackMessage as Qr, hasRuntimeTurnContext as Qt, turnHasReply as R, readLatestConversationBrief as Ra, bindEventAutomationCredentialSubject as Ri, setPlugins as Rn, escapeSlackMrkdwnText as Rr, TURN_LIMIT_WRAP_UP_MESSAGE as Rt, persistConversationMessages as S, sandboxSkillFile as Sa, resolveChannelCapabilities as Si, getAgentContextInputLimitTokens as Sn, invalidateReadySnapshot as Sr, getConversationWorkState as St, resolveConversationTitle as T, createPluginEmbedder as Ta, RESOURCE_SUBSCRIPTION_MAX_TTL_MS as Ti, setExperimentalFeatures as Tn, setWorkspaceSnapshotBuild as Tr, isFinalAttempt as Tt, authorizationId as U, getSlackFileId as Ua, verifySlackDirectCredentialSubject as Ui, REVIEW_ITEM_REPLIED_REASON as Un, truncateStatusText as Ur, createTurnLimitGate as Ut, PluginCredentialFailureError as V, loadForkHistory as Va, verifyEventAutomationCredentialSubject as Vi, registration_exports as Vn, normalizeSlackStatusText as Vr, TurnToolCallLimitExceededError as Vt, AuthPausePersistenceError as W, matchSlackAttachments as Wa, verifyTimerWatchCredentialSubject as Wi, closeReviewItem as Wn, addReactionToMessage as Wr, isTurnExecutionLimitExceededError as Wt, getConversationPendingAuth as X, listConversationAnnotations as Xa, isConversationScopedChannel as Xi, listReplyActionItems as Xn, postSlackMessage as Xr, getUserMessageInstructionText as Xt, clearPendingAuth as Y, createPluginAnnotations as Ya, getSlackClient as Yi, insertReviewItem as Yn, postSlackEphemeralMessage as Yr, getTerminalAssistantMessages as Yt, wasPendingAuthStopped as Z, listConversationAnnotationsById as Za, isDmChannel as Zi, listWaitingConversations as Zn, removeReactionFromMessage as Zr, hasCurrentInstruction as Zt, recordSubscribedReplyRoute as _, SANDBOX_JUNIOR_ROOT as _a, resolveSandboxCommandEnvironment as _i, getThreadStopDecision as _n, getWorkspaceByName as _r, completeConversationStop as _t, loadLastModelProfile as a, getDashboardConversationLink as aa, wrapSandboxSetupError as ai, normalizeToolNameFromResult as an, piMessageFromHistoryItem as ao, isOnlyAssignee as ar, listTurnSummaries as at, appendConversationMessages as b, SANDBOX_WORKSPACE_ROOT as ba, tryWorkspaceRepoCheckoutPath as bi, getAgentBackgroundCompactionMarkTokens as bn, updateWorkspace as br, drainConversationMailbox as bt, loadTurnRoute as c, getDashboardTaskLink as ca, isWorkspaceSnapshotNotReadyError as ci, trimTrailingAssistantMessages as cn, conversationNoteEvent as co, requireReviewItemLinks as cr, CONVERSATION_WORK_STALE_ENQUEUE_MS as ct, recordAttachmentsDelivered as d, PluginToolDeniedError as da, consumeSandboxEgressAuthRequiredSignal as di, TURN_CONTEXT_TAG as dn, automationCreatorUserId as dr, appendInboundMessage as dt, withSlackRetries as ea, slackEntitySchema as ei, isAssistantMessage as en, lookupSlackUser as eo, updateReviewItemContent as er, saveTurnCheckpoint as et, recordAuthenticationLinked as f, buildCommandScript as fa, consumeSandboxEgressPermissionDeniedSignal as fi, buildDeterministicAssistantMessageId as fn, resolveAssignee as fr, beginConversationResume as ft, recordMcpProviderConnected as g, SANDBOX_DATA_ROOT as ga, buildSandboxEgressNetworkPolicy as gi, getSubscribedReplyPreflightDecision as gn, getWorkspace as gr, clearExpiredConversationLease as gt, recordGuardianActionReviewed as h, SANDBOX_COMMAND_PATH as ha, sandboxEgressSignalsResponseSchema as hi, decideSubscribedThreadReply as hn, deleteWorkspace as hr, clearConsumedConversationWake as ht, loadConversationProjection as i, JUNIOR_THREAD_STATE_TTL_MS as ia, throwSandboxOperationError as ii, isToolResultMessage as in, historyItemFromPiMessage as io, canReadReviewItem as ir, getTurnRecord as it, createConversationMemoryService as j, conversationArchivedForUser as ja, createTimerWatch as ji, getPluginApiRoutes as jn, isVercelSandboxEgressRequest as jr, releaseConversationWork as jt, appendThreadContextMessages as k, conversationArchiveTimes as ka, cancelWatch as ki, agent_hooks_exports as kn, ensureDockerDaemon as kr, recordAttemptFailure as kt, openConversationProjection as l, setDashboardConversationLinkOptions as la, workspaceSnapshotNotReadyUserMessage as li, REQUEST_CONTEXT_SECTION_TAG as ln, getConfigDefaults as lo, reviewItemReaderForUser as lr, ackMessages as lt, recordAuthorizationRequested as m, runNonInteractiveCommand as ma, parseSandboxEgressCredentialToken as mi, SubscribedReplyReason as mn, createWorkspace as mr, checkInConversationWork as mt, commitMessages as n, getWorkspaceTeamId as na, isAbortError as ni, isStandaloneRuntimeContextMessage as nn, createDurableLocationConfigurationService as no, canActOnReviewItem as nr, completeTurnRecord as nt, loadProjection as o, getDashboardObjectIconLink as oa, WorkspaceSnapshotNotReadyError as oi, retainRuntimeTurnContext as on, projectConversationEvents as oo, readReviewItemAgentScope as or, recordTurnSummary as ot, recordAuthorizationCompleted as p, buildNonInteractiveShellScript as pa, createSandboxEgressCredentialToken as pi, buildDeterministicTurnId as pn, resolveAssignees as pr, cancelHumanFacingPendingMessages as pt, abandonReplacedPendingAuth as q, resolveRootVisibility as qa, getFilePermalink as qi, getOpenReviewItemByDedupeKey as qn, openSlackDirectMessage as qr, extractAssistantText as qt, loadConnectedMcpProviders as r, runWithWorkspaceTeamId as ra, isAlreadyExistsError as ri, isToolResultError as rn, configValueSchema as ro, canAgentChangeReviewItem as rr, failTurnRecord as rt, loadTurnProjection as s, getDashboardReviewItemLink as sa, getWorkspaceSnapshotNotReadyError as si, stripRuntimeTurnContext as sn, JUNIOR_NATIVE_EVENT_NAMESPACE as so, requireReviewItemAssignees as sr, CONVERSATION_WORK_CHECK_IN_INTERVAL_MS as st, commitAcceptedReply as t, sleep$2 as ta, slackExternalRefIdSchema as ti, isContinuablePiBoundary as tn, createPluginCache as to, PLUGIN_REVIEW_ITEM_KEY_PREFIX as tr, abandonTurnRecord as tt, recordAgentsInstructionsUpdated as u, ToolInputError as ua, clearSandboxEgressSignals as ui, SESSION_CONTEXT_SECTION_TAG as un, setConfigDefaults as uo, EVERYONE_ASSIGNEE as ur, appendExclusiveInboundMessage as ut, recordToolExecutionStarted as v, SANDBOX_REPOS_ROOT as va, normalizeSandboxEgressTracePropagationDomains as vi, calculateContextCompactionTargetTokens as vn, listWorkspaces as vr, completeConversationWork as vt, persistConversationMessageSummaries as w, createPluginState as wa, RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS as wi, isExperimentalFeatureEnabled as wn, setWorkspaceSnapshot as wr, hasRunnableConversationWork as wt, hydrateConversationMessages as x, sandboxSkillDir as xa, workspaceRepoCheckoutPath as xi, getAgentContextCompactionTriggerTokens as xn, WorkspaceValidationError as xr, getConversation as xt, recordTurnRoute as y, SANDBOX_SKILLS_ROOT as ya, SANDBOX_RUNTIME as yi, estimateTextTokens as yn, listWorkspacesByRepository as yr, deadLetterAttempt as yt, upsertConversationMessage as z, readConversationEventPage as za, bindScheduledAutomationCredentialSubject as zi, validatePlugins as zn, formatSlackLink 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-CFHIO4Vs.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 { Ar as getSandboxProvider, Er as create, Or as isStale, ba as SANDBOX_WORKSPACE_ROOT, ha as SANDBOX_COMMAND_PATH, ma as runNonInteractiveCommand, ta as sleep } from "./projection-CTvLSwcm.js";
2
- import { E as withSpan, b as setSpanAttributes } from "./logging-CFHIO4Vs.js";
3
- import { r as getStateAdapter } from "./adapter-dE2BiWP_.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-CTvLSwcm.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-BFADRGP8.js";
5
- import { f as credentialContextForActor } from "./registry-OsyWR4GO.js";
6
- import { Ct as listUnreportedSiblingAgents } from "./agent-runner-bE7aH7ew.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-B7Z6zIc7.js";
9
- import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-DjIyORJw.js";
10
- import { r as appendAndEnqueueInboundMessage } from "./store-Dp3RMEQd.js";
11
- import { i as resolveAgentInvocationId, r as enqueueAgentInvocation, t as createAgentInvocationWorker } from "./work-DDaoxZAw.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-CTvLSwcm.js";
2
- import { S as setTags, T as withLogContext, p as logException } from "./logging-CFHIO4Vs.js";
3
- import { M as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-BFADRGP8.js";
4
- import { f as credentialContextForActor } from "./registry-OsyWR4GO.js";
5
- import { z as messageCardText } from "./conversation-BjTo9ZFL.js";
6
- import { $ as startActiveTurn, Q as markTurnFailed } from "./store-B7Z6zIc7.js";
7
- import { n as getAssistantReplyText } from "./assistant-reply-CjRU9Z59.js";
8
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DzXwXmLg.js";
9
- import { a as persistThreadStateById, n as getPersistedSandboxState, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BF8VwIxd.js";
10
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-DHBG47gS.js";
11
- import { i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent, u as loadPendingMessageCards } from "./turn-failure-response-Di7TbgsF.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 { hi as sandboxEgressSignalsResponseSchema } from "./projection-CTvLSwcm.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;
@@ -583,6 +583,14 @@ declare const conversationPendingMessageSchema: z.ZodObject<{
583
583
  contentType: z.ZodString;
584
584
  bytes: z.ZodNumber;
585
585
  }, z.core.$strict>>>;
586
+ reviewItemChange: z.ZodOptional<z.ZodObject<{
587
+ kind: z.ZodEnum<{
588
+ dismissed: "dismissed";
589
+ submitted: "submitted";
590
+ taken: "taken";
591
+ }>;
592
+ reviewItemId: z.ZodString;
593
+ }, z.core.$strict>>;
586
594
  redacted: z.ZodOptional<z.ZodLiteral<true>>;
587
595
  }, z.core.$strict>;
588
596
  /** Participant-only authorization prompt for a parked web turn. */
@@ -636,6 +644,14 @@ declare const conversationPendingMessagesReportSchema: z.ZodObject<{
636
644
  contentType: z.ZodString;
637
645
  bytes: z.ZodNumber;
638
646
  }, z.core.$strict>>>;
647
+ reviewItemChange: z.ZodOptional<z.ZodObject<{
648
+ kind: z.ZodEnum<{
649
+ dismissed: "dismissed";
650
+ submitted: "submitted";
651
+ taken: "taken";
652
+ }>;
653
+ reviewItemId: z.ZodString;
654
+ }, z.core.$strict>>;
639
655
  redacted: z.ZodOptional<z.ZodLiteral<true>>;
640
656
  }, z.core.$strict>>;
641
657
  }, z.core.$strict>;
@@ -980,6 +996,14 @@ declare const conversationReportEventDataSchema: z.ZodDiscriminatedUnion<[z.ZodO
980
996
  key: z.ZodString;
981
997
  kind: z.ZodLiteral<"object">;
982
998
  }, z.core.$strict>>>;
999
+ reviewItemChanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
1000
+ kind: z.ZodEnum<{
1001
+ dismissed: "dismissed";
1002
+ submitted: "submitted";
1003
+ taken: "taken";
1004
+ }>;
1005
+ reviewItemId: z.ZodString;
1006
+ }, z.core.$strict>>>;
983
1007
  text: z.ZodOptional<z.ZodString>;
984
1008
  attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
985
1009
  id: z.ZodString;
@@ -1237,6 +1261,14 @@ declare const conversationReportEventSchema: z.ZodObject<{
1237
1261
  key: z.ZodString;
1238
1262
  kind: z.ZodLiteral<"object">;
1239
1263
  }, z.core.$strict>>>;
1264
+ reviewItemChanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
1265
+ kind: z.ZodEnum<{
1266
+ dismissed: "dismissed";
1267
+ submitted: "submitted";
1268
+ taken: "taken";
1269
+ }>;
1270
+ reviewItemId: z.ZodString;
1271
+ }, z.core.$strict>>>;
1240
1272
  text: z.ZodOptional<z.ZodString>;
1241
1273
  attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1242
1274
  id: z.ZodString;
@@ -1504,6 +1536,9 @@ declare const conversationModelUsageSchema: z.ZodObject<{
1504
1536
  declare const forkConversationBodySchema: z.ZodObject<{
1505
1537
  messageId: z.ZodString;
1506
1538
  idempotencyKey: z.ZodString;
1539
+ quickQuestion: z.ZodOptional<z.ZodObject<{
1540
+ quote: z.ZodString;
1541
+ }, z.core.$strict>>;
1507
1542
  }, z.core.$strict>;
1508
1543
  declare const forkConversationResponseSchema: z.ZodObject<{
1509
1544
  conversationId: z.ZodString;
@@ -1901,6 +1936,14 @@ declare const conversationDetailReportSchema: z.ZodObject<{
1901
1936
  key: z.ZodString;
1902
1937
  kind: z.ZodLiteral<"object">;
1903
1938
  }, z.core.$strict>>>;
1939
+ reviewItemChanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
1940
+ kind: z.ZodEnum<{
1941
+ dismissed: "dismissed";
1942
+ submitted: "submitted";
1943
+ taken: "taken";
1944
+ }>;
1945
+ reviewItemId: z.ZodString;
1946
+ }, z.core.$strict>>>;
1904
1947
  text: z.ZodOptional<z.ZodString>;
1905
1948
  attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1906
1949
  id: z.ZodString;
@@ -2220,6 +2263,14 @@ declare const conversationEventPageSchema: z.ZodObject<{
2220
2263
  key: z.ZodString;
2221
2264
  kind: z.ZodLiteral<"object">;
2222
2265
  }, z.core.$strict>>>;
2266
+ reviewItemChanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
2267
+ kind: z.ZodEnum<{
2268
+ dismissed: "dismissed";
2269
+ submitted: "submitted";
2270
+ taken: "taken";
2271
+ }>;
2272
+ reviewItemId: z.ZodString;
2273
+ }, z.core.$strict>>>;
2223
2274
  text: z.ZodOptional<z.ZodString>;
2224
2275
  attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
2225
2276
  id: z.ZodString;
@@ -3051,7 +3102,7 @@ type ConversationChildAgentsReport = z.infer<typeof conversationChildAgentsRepor
3051
3102
  * below it created.
3052
3103
  *
3053
3104
  * Viewers who cannot see private content get the resource type, event types,
3054
- * and times, but not the label, intent, or match filter.
3105
+ * and times, but not the label, intent, match filter, or url.
3055
3106
  */
3056
3107
  declare const conversationWatchSchema: z.ZodObject<{
3057
3108
  childAgent: z.ZodOptional<z.ZodObject<{
@@ -3069,6 +3120,7 @@ declare const conversationWatchSchema: z.ZodObject<{
3069
3120
  namespace: z.ZodString;
3070
3121
  redacted: z.ZodOptional<z.ZodLiteral<true>>;
3071
3122
  resourceType: z.ZodString;
3123
+ url: z.ZodOptional<z.ZodString>;
3072
3124
  }, z.core.$strict>;
3073
3125
  /** Active Watches that one Conversation owns, oldest first. */
3074
3126
  declare const conversationWatchesReportSchema: z.ZodObject<{
@@ -3089,6 +3141,7 @@ declare const conversationWatchesReportSchema: z.ZodObject<{
3089
3141
  namespace: z.ZodString;
3090
3142
  redacted: z.ZodOptional<z.ZodLiteral<true>>;
3091
3143
  resourceType: z.ZodString;
3144
+ url: z.ZodOptional<z.ZodString>;
3092
3145
  }, z.core.$strict>>;
3093
3146
  }, z.core.$strict>;
3094
3147
  type ConversationWatch = z.infer<typeof conversationWatchSchema>;
@@ -5405,10 +5458,10 @@ declare const automationUpdateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5405
5458
  tuesday: "tuesday";
5406
5459
  wednesday: "wednesday";
5407
5460
  }>>>>;
5408
- dayOfMonth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5409
5461
  month: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5410
- startDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5411
5462
  timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5463
+ dayOfMonth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5464
+ startDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5412
5465
  }, z.core.$strict>]>>;
5413
5466
  kind: z.ZodLiteral<"scheduled">;
5414
5467
  revision: z.ZodString;
@@ -5547,10 +5600,10 @@ declare const automationScheduleIntentSchema: z.ZodUnion<readonly [z.ZodObject<{
5547
5600
  tuesday: "tuesday";
5548
5601
  wednesday: "wednesday";
5549
5602
  }>>>>;
5550
- dayOfMonth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5551
5603
  month: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5552
- startDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5553
5604
  timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5605
+ dayOfMonth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5606
+ startDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5554
5607
  }, z.core.$strict>]>;
5555
5608
  declare const automationSchedulePreviewSchema: z.ZodObject<{
5556
5609
  schedule: z.ZodObject<{
@@ -5795,6 +5848,21 @@ type PluginPackageContentItemReport = z.infer<typeof pluginPackageContentItemRep
5795
5848
  type PluginPackageContentReport = z.infer<typeof pluginPackageContentReportSchema>;
5796
5849
  type PluginOperationalReport = z.infer<typeof pluginOperationalReportSchema>;
5797
5850
  type PluginOperationalReportFeed = z.infer<typeof pluginOperationalReportFeedSchema>;
5851
+ /**
5852
+ * The person change to a Review item that one message records. Each inbound
5853
+ * message and saved Message that reports a take, answer, or dismiss carries
5854
+ * its own record, so the dashboard shows what that message did, not what the
5855
+ * item looks like now.
5856
+ */
5857
+ declare const reviewItemChangeRecordSchema: z.ZodObject<{
5858
+ kind: z.ZodEnum<{
5859
+ dismissed: "dismissed";
5860
+ submitted: "submitted";
5861
+ taken: "taken";
5862
+ }>;
5863
+ reviewItemId: z.ZodString;
5864
+ }, z.core.$strict>;
5865
+ type ReviewItemChangeRecord = z.output<typeof reviewItemChangeRecordSchema>;
5798
5866
  /** One Review item as the viewer sees it. */
5799
5867
  declare const reviewItemSchema: z.ZodObject<{
5800
5868
  addedByConversationId: z.ZodString;
@@ -5990,4 +6058,4 @@ declare const reviewItemActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5990
6058
  }, z.core.$strict>;
5991
6059
  }, z.core.$strict>], "action">;
5992
6060
  type ReviewItemActionBody = z.output<typeof reviewItemActionSchema>;
5993
- export { automationExecutionStatusDaySchema as $, ConversationPendingMessageDelivery as $n, codeChangeSummarySchema as $r, LocationSummaryReport as $t, StatsReport as A, ConversationMetricDay as An, conversationPendingAuthorizationSchema as Ar, createPersonalTokenBodySchema as At, AutomationRun as B, CancelConversationPendingMessagesBody as Bn, forkConversationResponseSchema as Br, startServiceAccountSignInResponseSchema as Bt, pluginPackageContentReportSchema as C, MAX_INPUT_IMAGE_BYTES as Ci, ConversationChildAgentsReport as Cn, conversationDetailReportSchema as Cr, workspaceListSchema as Ct, skillReportSchema as D, conversationReadPositionSchema as Dn, conversationFeedQuerySchema as Dr, USER_CUSTOMIZATION_MAX_CHARS as Dt, runtimeInfoReportSchema as E, ConversationReadPosition as En, conversationEventsQuerySchema as Er, workspaceSchema as Et, AutomationExecutionDay as F, conversationStatsReportSchema as Fn, conversationReportEventSchema as Fr, revokePersonalTokenResponseSchema as Ft, AutomationUpdate as G, ConversationCost as Gn, CodeActivityDay as Gr, startConnectionResponseSchema as Gt, AutomationRunWindows as H, ConversationActivityPreview as Hn, steerConversationPendingMessagesResponseSchema as Hr, connectionParamsSchema as Ht, AutomationExecutionList as I, AcceptedConversationMessage as In, conversationSummaryReportSchema as Ir, disconnectServiceAccountResponseSchema as It, automationEditErrorSchema as J, ConversationEventPage as Jn, CodePersonReport as Jr, LocationActivityDayReport as Jt, AutomationVersionList as K, ConversationDetailReport as Kn, CodeChangeSummaryReport as Kr, ApiError as Kt, AutomationExecutionStatusDay as L, ActorIdentity as Ln, createConversationBodySchema as Lr, serviceAccountListSchema as Lt, statsReportSchema as M, ConversationStatsReport as Mn, conversationPendingMessageSchema as Mr, personalTokenListSchema as Mt, AutomationEdit as N, GuardianMetricDay as Nn, conversationPendingMessagesReportSchema as Nr, personalTokenMetadataSchema as Nt, skillReportsSchema as O, StopConversationTurnResponse as On, conversationFeedSchema as Or, userCustomizationSchema as Ot, AutomationExecution as P, GuardianStats as Pn, conversationReportEventDataSchema as Pr, personalTokenParamsSchema as Pt, automationExecutionSchema as Q, ConversationPendingMessage as Qn, codeChangeSummaryReportSchema as Qr, LocationParams as Qt, AutomationList as R, ArchiveConversationBody as Rn, createConversationMessageBodySchema as Rr, serviceAccountParamsSchema as Rt, pluginPackageContentItemReportSchema as S, MAX_INPUT_IMAGES as Si, ConversationChildAgent as Sn, conversationDetailQuerySchema as Sr, workspaceBodySchema as St, pluginsSchema as T, INPUT_IMAGE_TYPES as Ti, conversationChildAgentsReportSchema as Tn, conversationEventPageSchema as Tr, workspaceRepoSchema as Tt, AutomationScheduleIntent as U, ConversationAgentTreeNode as Un, conversationTurnFailureCodeSchema as Ur, connectionSchema as Ut, AutomationRunList as V, CancelConversationPendingMessagesResponse as Vn, steerConversationPendingMessagesBodySchema as Vr, connectionListSchema as Vt, AutomationSummary as W, ConversationAuxiliaryCosts as Wn, conversationTurnFailureReasonSchema as Wr, disconnectConnectionResponseSchema as Wt, automationEventCatalogSchema as X, ConversationModelUsage as Xn, CodeRepositorySummary as Xr, LocationDetailReport as Xt, automationEditSchema as Y, ConversationFeed as Yn, CodeRepositoryReport as Yr, LocationActorSummaryReport as Yt, automationExecutionListSchema as Z, ConversationParams as Zn, codeActivityDaySchema as Zr, LocationDirectoryReport as Zt, SkillReport as _, buttonUserInputField as _i, personalSpendReportSchema as _n, archiveConversationResponseSchema as _r, BaselineSnapshotReport as _t, reviewItemCountSchema as a, ConversationChildAgentTotals as ai, ActorDirectoryReport as an, ConversationSourceTask as ar, automationRunSchema as at, pluginOperationalReportFeedSchema as b, webMessageId as bi, conversationWatchSchema as bn, conversationActivityPreviewSchema as br, baselineSnapshotSchema as bt, reviewItemWaitingConversationsSchema as c, dailyConversationActivitySchema as ci, ActorSummaryReport as cn, ConversationTurnFailureCode as cr, automationSchedulePreviewSchema as ct, PluginOperationalReport as d, resolveMessageCards as di, PeopleActivityDayReport as dn, CreateConversationBody as dr, automationVersionActivateSchema as dt, codeOverviewReportSchema as ei, locationActivityDayReportSchema as en, ConversationPendingMessagesReport as er, automationExecutionStatusSchema as et, PluginOperationalReportFeed as f, AutomationCard as fi, PersonParams as fn, CreateConversationMessageBody as fr, automationVersionListSchema as ft, RuntimeInfoReport as g, UserInputRequest as gi, personParamsSchema as gn, archiveConversationBodySchema as gr, scheduledAutomationSummarySchema as gt, Plugins as h, UserInputField as hi, actorProfileReportSchema as hn, acceptedConversationMessageSchema as hr, eventAutomationSummarySchema as ht, reviewItemActionSchema as i, codeRepositorySummarySchema as ii, ActorActivityDayReport as in, ConversationReportStatus as ir, automationRunListSchema as it, statSchema as j, ConversationStatsItem as jn, conversationPendingMessageDeliverySchema as jr, createdPersonalTokenSchema as jt, StatReport as k, stopConversationTurnResponseSchema as kn, conversationParamsSchema as kr, PersonalTokenMetadata as kt, HealthReport as l, MessageCard as li, ActorTotalsReport as ln, ConversationTurnFailureReason as lr, automationSummarySchema as lt, PluginPackageContentReport as m, UserInputAnswer as mi, actorDirectoryReportSchema as mn, SteerConversationPendingMessagesResponse as mr, automationVersionSchema as mt, ReviewItemActionBody as n, codeRepositoryParamsSchema as ni, locationDirectoryReportSchema as nn, ConversationReportEventData as nr, automationListSchema as nt, reviewItemListSchema as o, conversationChildAgentTotalsSchema as oi, ActorDirectoryWindows as on, ConversationSummaryReport as or, automationRunWindowsSchema as ot, PluginPackageContentItemReport as p, USER_INPUT_NOTE as pi, PersonalSpendReport as pn, SteerConversationPendingMessagesBody as pr, automationVersionParamsSchema as pt, ListedAutomationVersion as q, ConversationEventHistory as qn, CodeOverviewReport as qr, apiErrorSchema as qt, ReviewItemPayload as r, codeRepositoryReportSchema as ri, locationParamsSchema as rn, ConversationReportMessageEvent as rr, automationParamsSchema as rt, reviewItemSchema as s, DailyConversationActivity as si, ActorProfileReport as sn, ConversationSurface as sr, automationScheduleIntentSchema as st, OwnedObjectAnnotation$1 as t, codePersonReportSchema as ti, locationDetailReportSchema as tn, ConversationReportEvent as tr, automationListQuerySchema as tt, Plugin as u, messageCardText as ui, ActorWindowMetrics as un, ConversationUsage as ur, automationUpdateSchema as ut, SkillReports as v, isEmptyUserInputAnswer as vi, ConversationWatch as vn, cancelConversationPendingMessagesBodySchema as vr, WorkspaceListReport as vt, pluginSchema as w, MessageAttachment as wi, conversationChildAgentSchema as wn, conversationEventHistorySchema as wr, workspaceParamsSchema as wt, pluginOperationalReportSchema as x, InputImage as xi, conversationWatchesReportSchema as xn, conversationAuxiliaryCostsSchema as xr, deleteWorkspaceResponseSchema as xt, healthReportSchema as y, normalizeUserInputAnswer as yi, ConversationWatchesReport as yn, cancelConversationPendingMessagesResponseSchema as yr, WorkspaceReport as yt, AutomationListQuery as z, ArchiveConversationResponse as zn, forkConversationBodySchema as zr, serviceAccountSchema as zt };
6061
+ export { automationExecutionSchema as $, ConversationPendingMessage as $n, codeChangeSummaryReportSchema as $r, LocationParams as $t, StatReport as A, stopConversationTurnResponseSchema as An, conversationParamsSchema as Ar, PersonalTokenMetadata as At, AutomationListQuery as B, ArchiveConversationResponse as Bn, forkConversationBodySchema as Br, serviceAccountSchema as Bt, pluginPackageContentItemReportSchema as C, MAX_INPUT_IMAGES as Ci, ConversationChildAgent as Cn, conversationDetailQuerySchema as Cr, workspaceBodySchema as Ct, runtimeInfoReportSchema as D, ConversationReadPosition as Dn, conversationEventsQuerySchema as Dr, workspaceSchema as Dt, pluginsSchema as E, INPUT_IMAGE_TYPES as Ei, conversationChildAgentsReportSchema as En, conversationEventPageSchema as Er, workspaceRepoSchema as Et, AutomationExecution as F, GuardianStats as Fn, conversationReportEventDataSchema as Fr, personalTokenParamsSchema as Ft, AutomationSummary as G, ConversationAuxiliaryCosts as Gn, conversationTurnFailureReasonSchema as Gr, disconnectConnectionResponseSchema as Gt, AutomationRunList as H, CancelConversationPendingMessagesResponse as Hn, steerConversationPendingMessagesBodySchema as Hr, connectionListSchema as Ht, AutomationExecutionDay as I, conversationStatsReportSchema as In, conversationReportEventSchema as Ir, revokePersonalTokenResponseSchema as It, ListedAutomationVersion as J, ConversationEventHistory as Jn, CodeOverviewReport as Jr, apiErrorSchema as Jt, AutomationUpdate as K, ConversationCost as Kn, CodeActivityDay as Kr, startConnectionResponseSchema as Kt, AutomationExecutionList as L, AcceptedConversationMessage as Ln, conversationSummaryReportSchema as Lr, disconnectServiceAccountResponseSchema as Lt, statSchema as M, ConversationStatsItem as Mn, conversationPendingMessageDeliverySchema as Mr, createdPersonalTokenSchema as Mt, statsReportSchema as N, ConversationStatsReport as Nn, conversationPendingMessageSchema as Nr, personalTokenListSchema as Nt, skillReportSchema as O, conversationReadPositionSchema as On, conversationFeedQuerySchema as Or, USER_CUSTOMIZATION_MAX_CHARS as Ot, AutomationEdit as P, GuardianMetricDay as Pn, conversationPendingMessagesReportSchema as Pr, personalTokenMetadataSchema as Pt, automationExecutionListSchema as Q, ConversationParams as Qn, codeActivityDaySchema as Qr, LocationDirectoryReport as Qt, AutomationExecutionStatusDay as R, ActorIdentity as Rn, createConversationBodySchema as Rr, serviceAccountListSchema as Rt, pluginOperationalReportSchema as S, InputImage as Si, conversationWatchesReportSchema as Sn, conversationAuxiliaryCostsSchema as Sr, deleteWorkspaceResponseSchema as St, pluginSchema as T, MessageAttachment as Ti, conversationChildAgentSchema as Tn, conversationEventHistorySchema as Tr, workspaceParamsSchema as Tt, AutomationRunWindows as U, ConversationActivityPreview as Un, steerConversationPendingMessagesResponseSchema as Ur, connectionParamsSchema as Ut, AutomationRun as V, CancelConversationPendingMessagesBody as Vn, forkConversationResponseSchema as Vr, startServiceAccountSignInResponseSchema as Vt, AutomationScheduleIntent as W, ConversationAgentTreeNode as Wn, conversationTurnFailureCodeSchema as Wr, connectionSchema as Wt, automationEditSchema as X, ConversationFeed as Xn, CodeRepositoryReport as Xr, LocationActorSummaryReport as Xt, automationEditErrorSchema as Y, ConversationEventPage as Yn, CodePersonReport as Yr, LocationActivityDayReport as Yt, automationEventCatalogSchema as Z, ConversationModelUsage as Zn, CodeRepositorySummary as Zr, LocationDetailReport as Zt, RuntimeInfoReport as _, UserInputRequest as _i, personParamsSchema as _n, archiveConversationBodySchema as _r, scheduledAutomationSummarySchema as _t, reviewItemCountSchema as a, codeRepositorySummarySchema as ai, ActorActivityDayReport as an, ConversationReportStatus as ar, automationRunListSchema as at, healthReportSchema as b, normalizeUserInputAnswer as bi, ConversationWatchesReport as bn, cancelConversationPendingMessagesResponseSchema as br, WorkspaceReport as bt, reviewItemWaitingConversationsSchema as c, DailyConversationActivity as ci, ActorProfileReport as cn, ConversationSurface as cr, automationScheduleIntentSchema as ct, Plugin as d, messageCardText as di, ActorWindowMetrics as dn, ConversationUsage as dr, automationUpdateSchema as dt, codeChangeSummarySchema as ei, LocationSummaryReport as en, ConversationPendingMessageDelivery as er, automationExecutionStatusDaySchema as et, PluginOperationalReport as f, resolveMessageCards as fi, PeopleActivityDayReport as fn, CreateConversationBody as fr, automationVersionActivateSchema as ft, Plugins as g, UserInputField as gi, actorProfileReportSchema as gn, acceptedConversationMessageSchema as gr, eventAutomationSummarySchema as gt, PluginPackageContentReport as h, UserInputAnswer as hi, actorDirectoryReportSchema as hn, SteerConversationPendingMessagesResponse as hr, automationVersionSchema as ht, reviewItemActionSchema as i, codeRepositoryReportSchema as ii, locationParamsSchema as in, ConversationReportMessageEvent as ir, automationParamsSchema as it, StatsReport as j, ConversationMetricDay as jn, conversationPendingAuthorizationSchema as jr, createPersonalTokenBodySchema as jt, skillReportsSchema as k, StopConversationTurnResponse as kn, conversationFeedSchema as kr, userCustomizationSchema as kt, ReviewItemChangeRecord as l, dailyConversationActivitySchema as li, ActorSummaryReport as ln, ConversationTurnFailureCode as lr, automationSchedulePreviewSchema as lt, PluginPackageContentItemReport as m, USER_INPUT_NOTE as mi, PersonalSpendReport as mn, SteerConversationPendingMessagesBody as mr, automationVersionParamsSchema as mt, ReviewItemActionBody as n, codePersonReportSchema as ni, locationDetailReportSchema as nn, ConversationReportEvent as nr, automationListQuerySchema as nt, reviewItemListSchema as o, ConversationChildAgentTotals as oi, ActorDirectoryReport as on, ConversationSourceTask as or, automationRunSchema as ot, PluginOperationalReportFeed as p, AutomationCard as pi, PersonParams as pn, CreateConversationMessageBody as pr, automationVersionListSchema as pt, AutomationVersionList as q, ConversationDetailReport as qn, CodeChangeSummaryReport as qr, ApiError as qt, ReviewItemPayload as r, codeRepositoryParamsSchema as ri, locationDirectoryReportSchema as rn, ConversationReportEventData as rr, automationListSchema as rt, reviewItemSchema as s, conversationChildAgentTotalsSchema as si, ActorDirectoryWindows as sn, ConversationSummaryReport as sr, automationRunWindowsSchema as st, OwnedObjectAnnotation$1 as t, codeOverviewReportSchema as ti, locationActivityDayReportSchema as tn, ConversationPendingMessagesReport as tr, automationExecutionStatusSchema as tt, HealthReport as u, MessageCard as ui, ActorTotalsReport as un, ConversationTurnFailureReason as ur, automationSummarySchema as ut, SkillReport as v, buttonUserInputField as vi, personalSpendReportSchema as vn, archiveConversationResponseSchema as vr, BaselineSnapshotReport as vt, pluginPackageContentReportSchema as w, MAX_INPUT_IMAGE_BYTES as wi, ConversationChildAgentsReport as wn, conversationDetailReportSchema as wr, workspaceListSchema as wt, pluginOperationalReportFeedSchema as x, webMessageId as xi, conversationWatchSchema as xn, conversationActivityPreviewSchema as xr, baselineSnapshotSchema as xt, SkillReports as y, isEmptyUserInputAnswer as yi, ConversationWatch as yn, cancelConversationPendingMessagesBodySchema as yr, WorkspaceListReport as yt, AutomationList as z, ArchiveConversationBody as zn, createConversationMessageBodySchema as zr, serviceAccountParamsSchema as zt };
@@ -1,7 +1,7 @@
1
- import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-C1RNOCs8.js";
2
- import { E as conversationSummaryReportSchema, F as conversationChildAgentTotalsSchema, O as conversationUsageSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema } from "./conversation-BjTo9ZFL.js";
1
+ import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-CUWrrzkc.js";
2
+ import { E as conversationSummaryReportSchema, F as conversationChildAgentTotalsSchema, O as conversationUsageSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema } from "./conversation-DppJ83Hw.js";
3
3
  import { i as fillUtcHours, r as fillUtcDays, s as sumUtcHoursIntoSixHours, y as userInputRequestSchema } from "./reporting-window-DgHgwQB3.js";
4
- import "./automation-BGrd03QO.js";
4
+ import "./automation-B8_mC68r.js";
5
5
  import "./common-Eu6sx09c.js";
6
6
  import { z } from "zod";
7
7
  import { codeChangeStateSchema, eventMatchSchema } from "@sentry/junior-plugin-api";
@@ -127,7 +127,7 @@ const conversationChildAgentsReportSchema = z.object({
127
127
  * below it created.
128
128
  *
129
129
  * Viewers who cannot see private content get the resource type, event types,
130
- * and times, but not the label, intent, or match filter.
130
+ * and times, but not the label, intent, match filter, or url.
131
131
  */
132
132
  const conversationWatchSchema = z.object({
133
133
  /** Absent when the Conversation itself created the Watch. */
@@ -146,15 +146,17 @@ const conversationWatchSchema = z.object({
146
146
  match: eventMatchSchema.optional(),
147
147
  namespace: z.string().min(1),
148
148
  redacted: z.literal(true).optional(),
149
- resourceType: z.string().min(1)
149
+ resourceType: z.string().min(1),
150
+ /** The web page of the watched resource, when its plugin names one. */
151
+ url: z.string().url().optional()
150
152
  }).strict().superRefine((data, context) => {
151
153
  if (data.label === void 0 === (data.redacted !== true)) context.addIssue({
152
154
  code: "custom",
153
155
  message: "watch label must be text or explicitly redacted"
154
156
  });
155
- if (data.redacted && (data.intent || data.match)) context.addIssue({
157
+ if (data.redacted && (data.intent || data.match || data.url)) context.addIssue({
156
158
  code: "custom",
157
- message: "redacted watches must not expose an intent or match"
159
+ message: "redacted watches must not expose an intent, match, or url"
158
160
  });
159
161
  });
160
162
  /** Active Watches that one Conversation owns, oldest first. */