@sentry/junior 0.280.0 → 0.281.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 (67) hide show
  1. package/dist/{adapter-DVN3iwf9.js → adapter-RVQGEa98.js} +1 -1
  2. package/dist/{admin-Q_UI--9W.js → admin-DQpHx6Og.js} +1 -1
  3. package/dist/{agent-runner-_PYLv4Qo.js → agent-runner-B229gXUY.js} +998 -975
  4. package/dist/api/schema.d.ts +2 -2
  5. package/dist/api/schema.js +5 -5
  6. package/dist/api.d.ts +1 -1
  7. package/dist/api.js +39 -33
  8. package/dist/{app-CL2zzzE0.d.ts → app-BQ9RZS43.d.ts} +2 -2
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +42 -34
  11. package/dist/{assistant-reply-DbebsAxi.js → assistant-reply-DQbtwc6j.js} +1 -1
  12. package/dist/{automation-CPqRFjIa.js → automation-sIsmIXH7.js} +1 -1
  13. package/dist/{background-compaction-queue-B9lmh8Ml.js → background-compaction-queue-oegyrxSe.js} +2 -2
  14. package/dist/{briefs-Dej7V0Bz.js → briefs-BwzGWJgR.js} +4 -8
  15. package/dist/{catalog-runtime-DpN0sWQ6.js → catalog-runtime-ClKzLvbN.js} +1 -1
  16. package/dist/cli/chat.js +14 -14
  17. package/dist/cli/check.js +3 -3
  18. package/dist/cli/main.js +3 -3
  19. package/dist/cli/plugins.js +4 -4
  20. package/dist/cli/snapshot-create.js +4 -4
  21. package/dist/cli/upgrade.d.ts +1 -1
  22. package/dist/cli/upgrade.js +3 -3
  23. package/dist/{client-h2A2ZPzY.js → client-DkG0Tj53.js} +2 -2
  24. package/dist/{config-CusBFORe.js → config-3AZ11aSM.js} +1 -1
  25. package/dist/{connections-C4h6mGha.js → connections-C0ut_6RW.js} +10 -10
  26. package/dist/{conversation-DExTZw8B.js → conversation-DNtcULyX.js} +29 -8
  27. package/dist/{conversation-pending-messages-Dgz6hrJs.js → conversation-pending-messages-LlFnr9-m.js} +10 -2
  28. package/dist/{conversation-privacy-2cm6OpNg.js → conversation-privacy-DAgeBGLN.js} +1 -1
  29. package/dist/{credential-sync-DK06Jgt-.js → credential-sync-Bg8NPuvj.js} +13 -13
  30. package/dist/{db-Dsvk1Tp1.d.ts → db-BCFM0CUX.d.ts} +1 -1
  31. package/dist/{executor-Cmr0J8W3.js → executor-DLKnzP6S.js} +2 -2
  32. package/dist/instrumentation.js +2 -2
  33. package/dist/{logging-CGnh65_X.js → logging-DHzrobea.js} +1 -1
  34. package/dist/{message-RpAnqHPY.js → message-LR8z5jXJ.js} +9 -9
  35. package/dist/nitro.d.ts +1 -1
  36. package/dist/nitro.js +3 -3
  37. package/dist/{oauth-callback-server-BBnhVKuX.js → oauth-callback-server-EWdpj0_y.js} +2 -2
  38. package/dist/{projection-C1MghKyI.js → projection-Bhz1tp0G.js} +60 -27
  39. package/dist/{prompt-BcHg-BMy.js → prompt-DI6KCtwb.js} +5 -26
  40. package/dist/{registry-DR7DjX9H.js → registry-EjhulgQW.js} +1 -1
  41. package/dist/{resolve-0Ful4oDv.js → resolve-Cw6OW4Fj.js} +3 -3
  42. package/dist/{result-Dd9kCuQ-.js → result-BoD0jevy.js} +9 -9
  43. package/dist/{runner-yiY8gUUu.js → runner-D22bsBDS.js} +11 -11
  44. package/dist/{sandbox-egress-signals-BzQVHCMz.js → sandbox-egress-signals-BG5GYacQ.js} +1 -1
  45. package/dist/{schema-C5pEgfHc.js → schema-BN34Jy-U.js} +3 -3
  46. package/dist/{schema-BkMmF552.d.ts → schema-CsqJzkP5.d.ts} +68 -9
  47. package/dist/{service-account-PIMpWZHF.js → service-account-Dd1nnAQZ.js} +3 -3
  48. package/dist/{service-account-Cu7HFLZQ.js → service-account-xo-CeMqI.js} +3 -3
  49. package/dist/{session-stop-CDEMsNtv.js → session-stop-CHSYB2uw.js} +12 -12
  50. package/dist/{skills-B2xIoe0f.js → skills-BGJr6xtW.js} +2 -2
  51. package/dist/{spawn-C0DySQRV.js → spawn-Cl8WS7zi.js} +2 -2
  52. package/dist/{stop-Dj5-nrAo.js → stop-C9lHWpvl.js} +120 -48
  53. package/dist/{store-QzOfDwKA.js → store-C4z8gOgZ.js} +3 -3
  54. package/dist/{store-Dlio-o6u.js → store-DeTnwVJt.js} +4 -4
  55. package/dist/{task-queue-Cp1V_XW3.js → task-queue-BBos68l0.js} +3 -3
  56. package/dist/{task-runner-CQkkUj3o.js → task-runner-BSF9zO-H.js} +6 -6
  57. package/dist/{thread-state-Bn87cfzE.js → thread-state-DGq1o5JX.js} +4 -4
  58. package/dist/{turn-failure-response-CQebxByj.js → turn-failure-response--9bA4uLP.js} +7 -7
  59. package/dist/{turn-lifecycle-CJJsOhXB.js → turn-lifecycle-t5fimxwQ.js} +1 -1
  60. package/dist/{turn-session-routing-bmG330Cf.js → turn-session-routing-RBtUe-3y.js} +9 -9
  61. package/dist/{validation-D1wcf7hp.js → validation-DrR0leBT.js} +1 -1
  62. package/dist/{version-BeHSXUK6.js → version-D_HFt_Dq.js} +1 -1
  63. package/dist/version.js +1 -1
  64. package/dist/{viewer-BZ0Hp5Nb.js → viewer-DWlpSFdj.js} +7 -5
  65. package/dist/{work-BTcCIbWu.js → work-pPoqtRea.js} +10 -10
  66. package/dist/{worker-D3fDK6zc.js → worker-CoVKgJ-O.js} +6 -6
  67. package/package.json +4 -4
package/dist/cli/check.js CHANGED
@@ -1,6 +1,6 @@
1
- import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-CGnh65_X.js";
2
- import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-DR7DjX9H.js";
3
- import { i as parseSkillFile } from "../skills-B2xIoe0f.js";
1
+ import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-DHzrobea.js";
2
+ import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-EjhulgQW.js";
3
+ import { i as parseSkillFile } from "../skills-BGJr6xtW.js";
4
4
  import path from "node:path";
5
5
  import fs from "node:fs/promises";
6
6
  import { pathToFileURL } from "node:url";
package/dist/cli/main.js CHANGED
@@ -25,13 +25,13 @@ async function runChat(argv, pluginSet) {
25
25
  return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
26
26
  }
27
27
  async function runAdmin(argv) {
28
- return await (await import("../admin-Q_UI--9W.js")).runAdmin(argv);
28
+ return await (await import("../admin-DQpHx6Og.js")).runAdmin(argv);
29
29
  }
30
30
  async function runServiceAccount(argv) {
31
- return await (await import("../service-account-Cu7HFLZQ.js")).runServiceAccount(argv);
31
+ return await (await import("../service-account-xo-CeMqI.js")).runServiceAccount(argv);
32
32
  }
33
33
  async function runBriefs(argv) {
34
- return await (await import("../briefs-Dej7V0Bz.js")).runBriefs(argv);
34
+ return await (await import("../briefs-BwzGWJgR.js")).runBriefs(argv);
35
35
  }
36
36
  function topLevelCommand(argv) {
37
37
  return (argv[0] === "--" ? argv.slice(1) : argv)[0];
@@ -1,7 +1,7 @@
1
- import { Aa as createPluginLogger, Rn as setPlugins, zn as validatePlugins } from "../projection-C1MghKyI.js";
2
- import { S as getDb } from "../viewer-BZ0Hp5Nb.js";
3
- import { n as pluginCatalogRuntime } from "../catalog-runtime-DpN0sWQ6.js";
4
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-D1wcf7hp.js";
1
+ import { Aa as createPluginLogger, Rn as setPlugins, zn as validatePlugins } from "../projection-Bhz1tp0G.js";
2
+ import { S as getDb } from "../viewer-DWlpSFdj.js";
3
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-ClKzLvbN.js";
4
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DrR0leBT.js";
5
5
  import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-HYh_JOdw.js";
6
6
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
7
7
  import { stderr, stdout } from "node:process";
@@ -1,7 +1,7 @@
1
- import { ai as create } from "../projection-C1MghKyI.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-DpN0sWQ6.js";
3
- import { t as disconnectStateAdapter } from "../adapter-DVN3iwf9.js";
4
- import { n as resolve } from "../resolve-0Ful4oDv.js";
1
+ import { ai as create } from "../projection-Bhz1tp0G.js";
2
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-ClKzLvbN.js";
3
+ import { t as disconnectStateAdapter } from "../adapter-RVQGEa98.js";
4
+ import { n as resolve } from "../resolve-Cw6OW4Fj.js";
5
5
  // src/cli/snapshot-create.ts
6
6
  const DEFAULT_RUNTIME = "node22";
7
7
  const DEFAULT_TIMEOUT_MS = 6e5;
@@ -1,4 +1,4 @@
1
- import "../db-Dsvk1Tp1.js";
1
+ import "../db-BCFM0CUX.js";
2
2
  import { n as JuniorPluginSet } from "../plugins-DtmjkTza.js";
3
3
  interface UpgradeIo {
4
4
  info: (line: string) => void;
@@ -1,6 +1,6 @@
1
- import { i as getChatConfig } from "../config-CusBFORe.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-Cmr0J8W3.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-DR7DjX9H.js";
1
+ import { i as getChatConfig } from "../config-3AZ11aSM.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-DLKnzP6S.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-EjhulgQW.js";
4
4
  import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-HYh_JOdw.js";
5
5
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
6
6
  import { basename, dirname, join, resolve } from "node:path";
@@ -1,5 +1,5 @@
1
- import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-CGnh65_X.js";
2
- import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-2cm6OpNg.js";
1
+ import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-DHzrobea.js";
2
+ import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-DAgeBGLN.js";
3
3
  import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
4
4
  import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
5
5
  import { createGatewayProvider } from "@ai-sdk/gateway";
@@ -1,5 +1,5 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { c as resolveGatewayModel, w as toOptionalTrimmed } from "./client-h2A2ZPzY.js";
2
+ import { c as resolveGatewayModel, w as toOptionalTrimmed } from "./client-DkG0Tj53.js";
3
3
  import { AwsClient } from "aws4fetch";
4
4
  import * as z from "zod";
5
5
  // src/chat/attachments/s3.ts
@@ -1,13 +1,13 @@
1
- import { X as loadTurnCheckpoint, et as failTurnRecord, gi as startOAuthFlow, tt as getTurnRecord } from "./projection-C1MghKyI.js";
2
- import { n as botConfig } from "./config-CusBFORe.js";
3
- import { C as getSqlExecutor, R as deleteProviderIdentityForSlackUser, y as getConversationEventStore, z as deleteProviderIdentityForUser } from "./viewer-BZ0Hp5Nb.js";
4
- import { u as hasRequiredOAuthScope } from "./registry-DR7DjX9H.js";
5
- import { n as pluginCatalogRuntime } from "./catalog-runtime-DpN0sWQ6.js";
6
- import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-_PYLv4Qo.js";
7
- import { r as getStateAdapter } from "./adapter-DVN3iwf9.js";
8
- import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-B9lmh8Ml.js";
9
- import { m as ensureConversationWake, w as requestConversationWork } from "./store-QzOfDwKA.js";
10
- import { n as resolveTurnSessionRouting } from "./turn-session-routing-bmG330Cf.js";
1
+ import { X as loadTurnCheckpoint, et as failTurnRecord, gi as startOAuthFlow, tt as getTurnRecord } from "./projection-Bhz1tp0G.js";
2
+ import { n as botConfig } from "./config-3AZ11aSM.js";
3
+ import { C as getSqlExecutor, R as deleteProviderIdentityForSlackUser, y as getConversationEventStore, z as deleteProviderIdentityForUser } from "./viewer-DWlpSFdj.js";
4
+ import { u as hasRequiredOAuthScope } from "./registry-EjhulgQW.js";
5
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-ClKzLvbN.js";
6
+ import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-B229gXUY.js";
7
+ import { r as getStateAdapter } from "./adapter-RVQGEa98.js";
8
+ import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-oegyrxSe.js";
9
+ import { m as ensureConversationWake, w as requestConversationWork } from "./store-C4z8gOgZ.js";
10
+ import { n as resolveTurnSessionRouting } from "./turn-session-routing-RBtUe-3y.js";
11
11
  import { randomBytes, randomUUID } from "node:crypto";
12
12
  import * as z from "zod";
13
13
  // src/chat/task-execution/authorized-turn.ts
@@ -75,14 +75,18 @@ const conversationBriefSchema = z.object({
75
75
  "assumed"
76
76
  ])
77
77
  }).strict()).max(20),
78
- openDecisions: z.array(z.object({
79
- text: lineSchema,
80
- owner: lineSchema.optional()
81
- }).strict()).max(20),
82
78
  facts: z.array(lineSchema).max(30),
83
79
  links: z.array(briefLinkSchema).max(40),
84
80
  keywords: z.array(z.string().trim().toLowerCase().min(1).max(400)).max(12)
85
81
  }).strict();
82
+ /** Parse a stored Brief row, dropping fields that older versions wrote. */
83
+ function parseStoredBrief(content) {
84
+ if (content && typeof content === "object" && "openDecisions" in content) {
85
+ const { openDecisions: _openDecisions, ...rest } = content;
86
+ return conversationBriefSchema.parse(rest);
87
+ }
88
+ return conversationBriefSchema.parse(content);
89
+ }
86
90
  const briefEntrySchema = z.object({
87
91
  index: z.number().int().nonnegative(),
88
92
  role: z.enum([
@@ -290,10 +294,16 @@ const conversationDetailQuerySchema = z.object({
290
294
  /** Also return `unreadPage` when the detail has an `unreadCursor`. */
291
295
  unreadPage: z.stringbool().optional(),
292
296
  /**
293
- * Also return `mailbox`, read before history, and never answer 304. A
294
- * first load gets both in one request.
297
+ * Also return `mailbox`, read before history. A sent version that still
298
+ * matches gets `{ unchanged: true, mailbox }` instead of 304, so a poll
299
+ * needs one request.
300
+ */
301
+ mailbox: z.stringbool().optional(),
302
+ /**
303
+ * An `appendCursor` from an earlier detail. Events then hold only newer
304
+ * events, with `appended: true`, while the cursor still applies.
295
305
  */
296
- mailbox: z.stringbool().optional()
306
+ after: z.string().min(1).optional()
297
307
  }).strict();
298
308
  const conversationEventsLimitSchema = z.coerce.number().int().min(1).max(1e3).default(150);
299
309
  /**
@@ -840,6 +850,17 @@ const conversationDetailReportSchema = conversationSummaryReportSchema.extend({
840
850
  */
841
851
  authors: z.record(z.string(), actorIdentitySchema).optional(),
842
852
  events: z.array(conversationReportEventSchema),
853
+ /**
854
+ * Events hold only the events after the request's `after` cursor. The
855
+ * report omits `previousCursor` and `unreadCursor`: the reader keeps its
856
+ * own.
857
+ */
858
+ appended: z.literal(true).optional(),
859
+ /**
860
+ * Pass as `after` on the next detail read to get only newer events.
861
+ * Absent after a purge.
862
+ */
863
+ appendCursor: z.string().min(1).optional(),
843
864
  eventHistory: conversationEventHistorySchema,
844
865
  previousCursor: z.string().min(1).optional(),
845
866
  generatedAt: z.string(),
@@ -851,4 +872,4 @@ const conversationFeedSchema = z.object({
851
872
  source: z.literal("conversation_index"),
852
873
  generatedAt: z.string()
853
874
  }).strict();
854
- export { messageCardRef as A, briefLinkSchema as B, createConversationMessageBodySchema as C, conversationReadPositionSchema as D, conversationChildAgentTotalsSchema as E, MAX_INPUT_IMAGES as F, conversationBriefSchema as H, MAX_INPUT_IMAGE_BYTES as I, messageAttachmentSchema as L, readMessageCardRefs as M, removedCardSchema as N, reviewItemChangeRecordSchema as O, resolveMessageCards as P, readMessageAttachments as R, createConversationBodySchema as S, forkConversationResponseSchema as T, parseBriefInput as U, briefOutcomeStatusSchema as V, conversationReportMessageEventSchema as _, conversationAttachmentParamsSchema as a, conversationSurfaceSchema as b, conversationDetailReportSchema as c, conversationEventsQuerySchema as d, conversationFeedQuerySchema as f, conversationReportEventSchema as g, conversationReportEventDataSchema as h, conversationActivityPreviewSchema as i, messageCardText as j, annotationCard as k, conversationEventHistorySchema as l, conversationParamsSchema as m, acceptedConversationMessageSchema as n, conversationAuxiliaryCostsSchema as o, conversationFeedSchema as p, actorIdentitySchema as r, conversationDetailQuerySchema as s, CONVERSATION_DETAIL_VERSION_HEADER as t, conversationEventPageSchema as u, conversationReportStatusSchema as v, forkConversationBodySchema as w, conversationUsageSchema as x, conversationSummaryReportSchema as y, briefCodeChangeSchema as z };
875
+ export { messageCardRef as A, briefLinkSchema as B, createConversationMessageBodySchema as C, conversationReadPositionSchema as D, conversationChildAgentTotalsSchema as E, MAX_INPUT_IMAGES as F, conversationBriefSchema as H, MAX_INPUT_IMAGE_BYTES as I, messageAttachmentSchema as L, readMessageCardRefs as M, removedCardSchema as N, reviewItemChangeRecordSchema as O, resolveMessageCards as P, readMessageAttachments as R, createConversationBodySchema as S, forkConversationResponseSchema as T, parseBriefInput as U, briefOutcomeStatusSchema as V, parseStoredBrief as W, conversationReportMessageEventSchema as _, conversationAttachmentParamsSchema as a, conversationSurfaceSchema as b, conversationDetailReportSchema as c, conversationEventsQuerySchema as d, conversationFeedQuerySchema as f, conversationReportEventSchema as g, conversationReportEventDataSchema as h, conversationActivityPreviewSchema as i, messageCardText as j, annotationCard as k, conversationEventHistorySchema as l, conversationParamsSchema as m, acceptedConversationMessageSchema as n, conversationAuxiliaryCostsSchema as o, conversationFeedSchema as p, actorIdentitySchema as r, conversationDetailQuerySchema as s, CONVERSATION_DETAIL_VERSION_HEADER as t, conversationEventPageSchema as u, conversationReportStatusSchema as v, forkConversationBodySchema as w, conversationUsageSchema as x, conversationSummaryReportSchema as y, briefCodeChangeSchema as z };
@@ -1,4 +1,4 @@
1
- import { L as messageAttachmentSchema, O as reviewItemChangeRecordSchema, c as conversationDetailReportSchema, r as actorIdentitySchema } from "./conversation-DExTZw8B.js";
1
+ import { L as messageAttachmentSchema, O as reviewItemChangeRecordSchema, c as conversationDetailReportSchema, r as actorIdentitySchema } from "./conversation-DNtcULyX.js";
2
2
  import * as z from "zod";
3
3
  // src/reporting-schema.ts
4
4
  const healthReportSchema = z.object({
@@ -152,6 +152,14 @@ const conversationPendingMessagesReportSchema = z.object({
152
152
  }).strict();
153
153
  /** Detail report with the mailbox that was read before its history. */
154
154
  const conversationDetailWithMailboxReportSchema = conversationDetailReportSchema.extend({ mailbox: conversationPendingMessagesReportSchema });
155
+ /**
156
+ * Answer to a `mailbox=true` poll whose detail version still matches. The
157
+ * client keeps its cached detail and takes the new mailbox.
158
+ */
159
+ const conversationUnchangedDetailWithMailboxSchema = z.object({
160
+ mailbox: conversationPendingMessagesReportSchema,
161
+ unchanged: z.literal(true)
162
+ }).strict();
155
163
  /** Optional filters for cancelling accepted mailbox rows. */
156
164
  const cancelConversationPendingMessagesBodySchema = z.object({
157
165
  inboundMessageIds: z.array(z.string().min(1)).min(1).optional(),
@@ -170,4 +178,4 @@ const steerConversationPendingMessagesResponseSchema = z.object({
170
178
  conversationId: z.string().min(1),
171
179
  steeredInboundMessageIds: z.array(z.string().min(1))
172
180
  }).strict();
173
- export { pluginsSchema as _, conversationPendingMessageDeliverySchema as a, skillReportsSchema as b, steerConversationPendingMessagesBodySchema as c, healthReportSchema as d, pluginOperationalReportFeedSchema as f, pluginSchema as g, pluginPackageContentReportSchema as h, conversationPendingAuthorizationSchema as i, steerConversationPendingMessagesResponseSchema as l, pluginPackageContentItemReportSchema as m, cancelConversationPendingMessagesResponseSchema as n, conversationPendingMessageSchema as o, pluginOperationalReportSchema as p, conversationDetailWithMailboxReportSchema as r, conversationPendingMessagesReportSchema as s, cancelConversationPendingMessagesBodySchema as t, apiErrorSchema as u, runtimeInfoReportSchema as v, skillReportSchema as y };
181
+ export { pluginSchema as _, conversationPendingMessageDeliverySchema as a, skillReportSchema as b, conversationUnchangedDetailWithMailboxSchema as c, apiErrorSchema as d, healthReportSchema as f, pluginPackageContentReportSchema as g, pluginPackageContentItemReportSchema as h, conversationPendingAuthorizationSchema as i, steerConversationPendingMessagesBodySchema as l, pluginOperationalReportSchema as m, cancelConversationPendingMessagesResponseSchema as n, conversationPendingMessageSchema as o, pluginOperationalReportFeedSchema as p, conversationDetailWithMailboxReportSchema as r, conversationPendingMessagesReportSchema as s, cancelConversationPendingMessagesBodySchema as t, steerConversationPendingMessagesResponseSchema as u, pluginsSchema as v, skillReportsSchema as x, runtimeInfoReportSchema as y };
@@ -1,4 +1,4 @@
1
- import { h as logWarn } from "./logging-CGnh65_X.js";
1
+ import { h as logWarn } from "./logging-DHzrobea.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  // src/chat/conversation-privacy.ts
4
4
  const SAFE_METADATA_KEY_LIMIT = 20;
@@ -1,19 +1,19 @@
1
- import { On as resolvePluginOAuthAccount, d as recordAuthorizationCompleted, hi as resolveBaseUrl, ki as postSlackMessage, mi as parseOAuthStatePayload, pi as formatProviderLabel, q as getConversationPendingAuth, tt as getTurnRecord, u as recordAuthenticationLinked, wn as createUserTokenStore, zi as getSlackClient } from "./projection-C1MghKyI.js";
2
- import { m as escapeXml } from "./client-h2A2ZPzY.js";
3
- import { a as getRuntimeMetadata, n as botConfig } from "./config-CusBFORe.js";
4
- import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-CGnh65_X.js";
1
+ import { On as resolvePluginOAuthAccount, d as recordAuthorizationCompleted, hi as resolveBaseUrl, ki as postSlackMessage, mi as parseOAuthStatePayload, pi as formatProviderLabel, q as getConversationPendingAuth, tt as getTurnRecord, u as recordAuthenticationLinked, wn as createUserTokenStore, zi as getSlackClient } from "./projection-Bhz1tp0G.js";
2
+ import { m as escapeXml } from "./client-DkG0Tj53.js";
3
+ import { a as getRuntimeMetadata, n as botConfig } from "./config-3AZ11aSM.js";
4
+ import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-DHzrobea.js";
5
5
  import { p as parseSlackUserId } from "./actor-6jsm_v96.js";
6
- import { B as findUserByVerifiedEmails, C as getSqlExecutor, I as resolveActorIdentityId, W as upsertLinkedIdentity, o as readIdentityById } from "./viewer-BZ0Hp5Nb.js";
6
+ import { B as findUserByVerifiedEmails, C as getSqlExecutor, I as resolveActorIdentityId, W as upsertLinkedIdentity, o as readIdentityById } from "./viewer-DWlpSFdj.js";
7
7
  import { i as homeDir } from "./package-discovery-DJhGdS4c.js";
8
- import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-DR7DjX9H.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-DpN0sWQ6.js";
10
- import { t as discoverSkills } from "./skills-B2xIoe0f.js";
11
- import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-_PYLv4Qo.js";
8
+ import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-EjhulgQW.js";
9
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-ClKzLvbN.js";
10
+ import { t as discoverSkills } from "./skills-BGJr6xtW.js";
11
+ import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-B229gXUY.js";
12
12
  import { r as acquireActiveLock } from "./locks-D-0h111u.js";
13
- import { r as getStateAdapter } from "./adapter-DVN3iwf9.js";
14
- import { _ as getMcpProviderErrorAttributes } from "./service-account-PIMpWZHF.js";
15
- import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-Bn87cfzE.js";
16
- import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-C4h6mGha.js";
13
+ import { r as getStateAdapter } from "./adapter-RVQGEa98.js";
14
+ import { _ as getMcpProviderErrorAttributes } from "./service-account-Dd1nnAQZ.js";
15
+ import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-DGq1o5JX.js";
16
+ import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-C0ut_6RW.js";
17
17
  import { n as relayLocalOAuthCallback } from "./oauth-relay-D6xxVywK.js";
18
18
  import path from "node:path";
19
19
  import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
@@ -1,4 +1,4 @@
1
- import "./schema-BkMmF552.js";
1
+ import "./schema-CsqJzkP5.js";
2
2
  import * as z from "zod";
3
3
  import { Destination, Source, locationSchema } from "@sentry/junior-plugin-api";
4
4
  import "drizzle-orm/pg-core";
@@ -1,5 +1,5 @@
1
- import "./config-CusBFORe.js";
2
- import { p as logException } from "./logging-CGnh65_X.js";
1
+ import "./config-3AZ11aSM.js";
2
+ import { p as logException } from "./logging-DHzrobea.js";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  import { getTableColumns, sql } from "drizzle-orm";
5
5
  import { bigint, boolean, check, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, timestamp, uniqueIndex, uuid } from "drizzle-orm/pg-core";
@@ -1,6 +1,6 @@
1
1
  import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData } from "./sentry-BRTJqumy.js";
2
- import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-CGnh65_X.js";
3
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-2cm6OpNg.js";
2
+ import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-DHzrobea.js";
3
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-DAgeBGLN.js";
4
4
  import { n as redactSandboxEgressProxyPath } from "./proxy-path-BHYoKZdq.js";
5
5
  import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
6
6
  import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
@@ -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-BRTJqumy.js";
2
- import { t as JUNIOR_VERSION } from "./version-BeHSXUK6.js";
2
+ import { t as JUNIOR_VERSION } from "./version-D_HFt_Dq.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";
@@ -1,13 +1,13 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { Ma as readConversationAccessFromSql, ja as canAccessConversation } from "./projection-C1MghKyI.js";
3
- import { n as botConfig } from "./config-CusBFORe.js";
4
- import { F as SYSTEM_IDENTITY_ID, S as getDb, x as getConversationStore } from "./viewer-BZ0Hp5Nb.js";
5
- import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-_PYLv4Qo.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-Dlio-o6u.js";
7
- import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-CDEMsNtv.js";
8
- import { r as appendAndEnqueueInboundMessage } from "./store-QzOfDwKA.js";
9
- import { r as enqueueAgentMessageToParent } from "./result-Dd9kCuQ-.js";
10
- import { i as enqueueAgentInvocation } from "./work-BTcCIbWu.js";
2
+ import { Ma as readConversationAccessFromSql, ja as canAccessConversation } from "./projection-Bhz1tp0G.js";
3
+ import { n as botConfig } from "./config-3AZ11aSM.js";
4
+ import { F as SYSTEM_IDENTITY_ID, S as getDb, x as getConversationStore } from "./viewer-DWlpSFdj.js";
5
+ import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-B229gXUY.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-DeTnwVJt.js";
7
+ import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-CHSYB2uw.js";
8
+ import { r as appendAndEnqueueInboundMessage } from "./store-C4z8gOgZ.js";
9
+ import { r as enqueueAgentMessageToParent } from "./result-BoD0jevy.js";
10
+ import { i as enqueueAgentInvocation } from "./work-pPoqtRea.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-CL2zzzE0.js";
1
+ import { i as JuniorDashboardOptions } from "./app-BQ9RZS43.js";
2
2
  import { n as JuniorPluginSet } from "./plugins-DtmjkTza.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_CONVERSATION_WORK_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_ROUTE, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_RETENTION_CRON_SCHEDULE, R as getDeploymentServiceVersion, j as JUNIOR_HEARTBEAT_CRON_SCHEDULE, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE } from "./logging-CGnh65_X.js";
1
+ import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_ROUTE, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_RETENTION_CRON_SCHEDULE, R as getDeploymentServiceVersion, j as JUNIOR_HEARTBEAT_CRON_SCHEDULE, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE } from "./logging-DHzrobea.js";
2
2
  import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJhGdS4c.js";
3
- import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-B9lmh8Ml.js";
3
+ import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-oegyrxSe.js";
4
4
  import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-HYh_JOdw.js";
5
- import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-Cp1V_XW3.js";
5
+ import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-BBos68l0.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";
@@ -1,5 +1,5 @@
1
- import { wn as createUserTokenStore } from "./projection-C1MghKyI.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DK06Jgt-.js";
1
+ import { wn as createUserTokenStore } from "./projection-Bhz1tp0G.js";
2
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Bg8NPuvj.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,19 +1,19 @@
1
- import { a as getClient$1, n as captureMessage, r as continueTrace, v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { a as completeText, c as resolveGatewayModel, i as completeObject, m as escapeXml, o as embedTexts, p as unwrapCurrentInstruction, r as completeDecision, s as rerankTexts, t as GEN_AI_PROVIDER_NAME, w as toOptionalTrimmed, x as isProviderRetryError } from "./client-h2A2ZPzY.js";
3
- import { i as getChatConfig, n as botConfig, o as getSlackBotToken, v as normalizeSlackEmojiName } from "./config-CusBFORe.js";
4
- import { E as withSpan, G as toOptionalNumber, K as toOptionalString, W as isRecord$2, _ as runBestEffort, 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-CGnh65_X.js";
5
- import { t as canExposeConversationPayload } from "./conversation-privacy-2cm6OpNg.js";
1
+ import { a as getClient$1, h as startSpan, n as captureMessage, r as continueTrace, v as __exportAll } from "./sentry-BRTJqumy.js";
2
+ import { a as completeText, c as resolveGatewayModel, i as completeObject, m as escapeXml, o as embedTexts, p as unwrapCurrentInstruction, r as completeDecision, s as rerankTexts, t as GEN_AI_PROVIDER_NAME, w as toOptionalTrimmed, x as isProviderRetryError } from "./client-DkG0Tj53.js";
3
+ import { i as getChatConfig, n as botConfig, o as getSlackBotToken, v as normalizeSlackEmojiName } from "./config-3AZ11aSM.js";
4
+ import { E as withSpan, G as toOptionalNumber, K as toOptionalString, W as isRecord$2, _ as runBestEffort, 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-DHzrobea.js";
5
+ import { t as canExposeConversationPayload } from "./conversation-privacy-DAgeBGLN.js";
6
6
  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-6jsm_v96.js";
7
- import { C as getSqlExecutor, D as createSqlConversationEventStore, G as bindProviderConversation, I as resolveActorIdentityId, O as eventFromRow, P as startLocationThread, S as getDb, U as saveUserTimezone, V as readUserTimezone, X as addAgentTurnUsage, at as sameDestination, et as hasAgentTurnUsage, g as createCache, i as readActorIdentity, j as createSqlStore, k as withConversationEventLock, l as resolveViewerUser, n as findUserByEmailFromSql, o as readIdentityById, p as parseAvatarUrl, q as conversationDetailTouch, rt as parseDestination, s as readIdentityByIdFromSql, tt as resolveRootConversationId, x as getConversationStore, y as getConversationEventStore } from "./viewer-BZ0Hp5Nb.js";
8
- import { A as juniorIdentities, D as juniorAttachments, E as juniorCodeRepositories, M as juniorDestinations, S as juniorConversationEvents, T as juniorCodeChanges, _ as juniorConversationParticipants, a as juniorReviewItemAssignees, c as juniorReviewItems, d as juniorAutomations, i as juniorWorkspaces, j as juniorUsers, k as juniorConversations, n as juniorSnapshots, o as juniorReviewItemConversations, p as juniorLocationConfigurations, r as juniorWorkspaceRepos, w as juniorConversationAnnotations, y as juniorConversationBriefs } from "./executor-Cmr0J8W3.js";
7
+ import { C as getSqlExecutor, D as createSqlConversationEventStore, G as bindProviderConversation, I as resolveActorIdentityId, O as eventFromRow, P as startLocationThread, S as getDb, U as saveUserTimezone, V as readUserTimezone, X as addAgentTurnUsage, at as sameDestination, et as hasAgentTurnUsage, g as createCache, i as readActorIdentity, j as createSqlStore, k as withConversationEventLock, l as resolveViewerUser, n as findUserByEmailFromSql, o as readIdentityById, p as parseAvatarUrl, q as conversationDetailTouch, rt as parseDestination, s as readIdentityByIdFromSql, tt as resolveRootConversationId, x as getConversationStore, y as getConversationEventStore } from "./viewer-DWlpSFdj.js";
8
+ import { A as juniorIdentities, D as juniorAttachments, E as juniorCodeRepositories, M as juniorDestinations, S as juniorConversationEvents, T as juniorCodeChanges, _ as juniorConversationParticipants, a as juniorReviewItemAssignees, c as juniorReviewItems, d as juniorAutomations, i as juniorWorkspaces, j as juniorUsers, k as juniorConversations, n as juniorSnapshots, o as juniorReviewItemConversations, p as juniorLocationConfigurations, r as juniorWorkspaceRepos, w as juniorConversationAnnotations, y as juniorConversationBriefs } from "./executor-DLKnzP6S.js";
9
9
  import { a as agentHistoryItemSchema, g as instructionProvenanceFor, h as instructionActors, m as contextProvenance } from "./media-Dq9_svfQ.js";
10
- import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, f as credentialContextForActor, h as credentialSubjectSchema, m as credentialLogContext, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-DR7DjX9H.js";
11
- import { n as pluginCatalogRuntime } from "./catalog-runtime-DpN0sWQ6.js";
10
+ import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, f as credentialContextForActor, h as credentialSubjectSchema, m as credentialLogContext, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-EjhulgQW.js";
11
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-ClKzLvbN.js";
12
12
  import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS, r as acquireActiveLock } from "./locks-D-0h111u.js";
13
- import { n as getDefaultRedisStateAdapterFor, r as getStateAdapter } from "./adapter-DVN3iwf9.js";
13
+ import { n as getDefaultRedisStateAdapterFor, r as getStateAdapter } from "./adapter-RVQGEa98.js";
14
14
  import { i as isValidTimeZone } from "./cadence-R7Em4RjE.js";
15
- import { A as messageCardRef, H as conversationBriefSchema, M as readMessageCardRefs, O as reviewItemChangeRecordSchema, R as readMessageAttachments, U as parseBriefInput, _ as conversationReportMessageEventSchema, g as conversationReportEventSchema } from "./conversation-DExTZw8B.js";
16
- import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-BcHg-BMy.js";
15
+ import { A as messageCardRef, H as conversationBriefSchema, M as readMessageCardRefs, O as reviewItemChangeRecordSchema, R as readMessageAttachments, U as parseBriefInput, W as parseStoredBrief, _ as conversationReportMessageEventSchema, g as conversationReportEventSchema } from "./conversation-DNtcULyX.js";
16
+ import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-DI6KCtwb.js";
17
17
  import { n as redactSandboxEgressProxyPath, t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
18
18
  import path from "node:path";
19
19
  import { isDeepStrictEqual } from "node:util";
@@ -808,8 +808,14 @@ async function resolveRootVisibility(executor, conversationId) {
808
808
  return readCandidateVisibility(executor, candidate);
809
809
  }
810
810
  // src/chat/briefs/events.ts
811
- /** Durable cost and size record for one stored Brief version. */
812
- const briefUpdatedEvent = defineConversationEvent({
811
+ function renderBriefUpdated(event) {
812
+ return {
813
+ icon: "activity",
814
+ title: `Brief updated (v${event.version})`
815
+ };
816
+ }
817
+ /** Previous stored Brief event shape retained for transcript rendering. */
818
+ const briefUpdatedEventV1 = defineConversationEvent({
813
819
  name: "brief_updated",
814
820
  version: 1,
815
821
  schema: z.object({
@@ -820,12 +826,20 @@ const briefUpdatedEvent = defineConversationEvent({
820
826
  openDecisions: z.number().int().nonnegative(),
821
827
  links: z.number().int().nonnegative()
822
828
  }).strict(),
823
- renderEvent(event) {
824
- return {
825
- icon: "activity",
826
- title: `Brief updated (v${event.version})`
827
- };
828
- }
829
+ renderEvent: renderBriefUpdated
830
+ });
831
+ /** Durable cost and size record for one stored Brief version. */
832
+ const briefUpdatedEvent = defineConversationEvent({
833
+ name: "brief_updated",
834
+ version: 2,
835
+ schema: z.object({
836
+ version: z.number().int().positive(),
837
+ modelId: z.string().min(1),
838
+ costUsd: z.number().finite().nonnegative().optional(),
839
+ decisions: z.number().int().nonnegative(),
840
+ links: z.number().int().nonnegative()
841
+ }).strict(),
842
+ renderEvent: renderBriefUpdated
829
843
  });
830
844
  // src/chat/slack/attachments.ts
831
845
  /** Save the vision summary for a stored Slack attachment. */
@@ -849,6 +863,15 @@ async function matchSlackAttachments(args) {
849
863
  filename: juniorAttachments.filename
850
864
  }).from(juniorAttachments).where(and(eq(juniorAttachments.conversationId, args.conversationId), eq(juniorAttachments.provider, "slack"), inArray(juniorAttachments.providerId, args.providerIds), isNull(juniorAttachments.deleteRequestedAt)));
851
865
  }
866
+ /**
867
+ * Fingerprint the live Slack attachments that `matchSlackAttachments` can
868
+ * return for a Conversation. It changes when one is stored or deleted, so a
869
+ * reader can tell that stored messages may now show other files.
870
+ */
871
+ async function readSlackAttachmentsVersion(db, conversationId) {
872
+ const [row] = await db.db().select({ version: sql`coalesce(md5(string_agg(${juniorAttachments.id}, ',' order by ${juniorAttachments.id})), '')` }).from(juniorAttachments).where(and(eq(juniorAttachments.conversationId, conversationId), eq(juniorAttachments.provider, "slack"), isNull(juniorAttachments.deleteRequestedAt)));
873
+ return row?.version ?? "";
874
+ }
852
875
  /** Read the Slack file identity retained by the Chat SDK. */
853
876
  function getSlackFileId(attachment) {
854
877
  const metadataId = attachment.fetchMetadata?.fileId;
@@ -1463,6 +1486,13 @@ async function readFirstTurnStart(executor, conversationId) {
1463
1486
  });
1464
1487
  return row ? eventFromRow(row) : void 0;
1465
1488
  }
1489
+ function projectEventPage(args) {
1490
+ return startSpan({
1491
+ attributes: { "app.conversation.event.count": args.events.length },
1492
+ name: "Project conversation events",
1493
+ op: "function"
1494
+ }, () => projectConversationReportEventPage(args));
1495
+ }
1466
1496
  /** Resolve entity starts that precede the page, then project it once. */
1467
1497
  async function projectConversationEvents(executor, args) {
1468
1498
  const events = args.events.sort((left, right) => left.seq - right.seq);
@@ -1504,7 +1534,7 @@ async function projectConversationEvents(executor, args) {
1504
1534
  }),
1505
1535
  args.canExposePayload ? hydrateMessageAttachments(executor, args.conversationId, events) : void 0
1506
1536
  ]);
1507
- return projectConversationReportEventPage({
1537
+ return projectEventPage({
1508
1538
  canExposePayload: args.canExposePayload,
1509
1539
  events,
1510
1540
  ...args.firstTurnStart ? { firstTurnStart: args.firstTurnStart } : void 0,
@@ -1537,9 +1567,13 @@ async function scanConversationEventPage(executor, args) {
1537
1567
  }), firstTurnStartRead]);
1538
1568
  firstTurnStart = turnStart;
1539
1569
  if (batch.length === 0) break;
1540
- const decoded = batch.map(eventFromRow).sort((left, right) => left.seq - right.seq);
1570
+ const decoded = startSpan({
1571
+ attributes: { "app.conversation.event.count": batch.length },
1572
+ name: "Decode conversation events",
1573
+ op: "function"
1574
+ }, () => batch.map(eventFromRow).sort((left, right) => left.seq - right.seq));
1541
1575
  events.push(...decoded);
1542
- counted += projectConversationReportEventPage({
1576
+ counted += projectEventPage({
1543
1577
  canExposePayload: args.canExposePayload,
1544
1578
  events: decoded,
1545
1579
  ...firstTurnStart ? { firstTurnStart } : void 0
@@ -1800,7 +1834,7 @@ function briefVersionFromRow(row) {
1800
1834
  version: row.version,
1801
1835
  turnId: row.turnId,
1802
1836
  throughSeq: row.throughSeq,
1803
- content: conversationBriefSchema.parse(row.content),
1837
+ content: parseStoredBrief(row.content),
1804
1838
  searchText: row.searchText,
1805
1839
  modelId: row.modelId,
1806
1840
  ...row.costUsd !== null ? { costUsd: row.costUsd } : void 0,
@@ -1881,7 +1915,6 @@ async function emitBriefUpdated(context, stored) {
1881
1915
  modelId: stored.modelId,
1882
1916
  ...stored.costUsd !== void 0 ? { costUsd: stored.costUsd } : void 0,
1883
1917
  decisions: stored.content.decisions.length,
1884
- openDecisions: stored.content.openDecisions.length,
1885
1918
  links: stored.content.links.length
1886
1919
  }));
1887
1920
  }
@@ -1955,7 +1988,7 @@ const briefsTaskRegistration = {
1955
1988
  displayName: "Briefs",
1956
1989
  description: "Durable Conversation Brief generation"
1957
1990
  },
1958
- conversationEvents: [briefUpdatedEvent],
1991
+ conversationEvents: [briefUpdatedEventV1, briefUpdatedEvent],
1959
1992
  hooks: { async operationalReport(context) {
1960
1993
  return await buildBriefsOperationalReport({
1961
1994
  briefDays: await context.eventStats.costsByDay({
@@ -14854,4 +14887,4 @@ async function recordGuardianActionReviewed(args) {
14854
14887
  createdAtMs: Date.now()
14855
14888
  }]);
14856
14889
  }
14857
- export { completeTurnRecord as $, notInheritedByForkChild as $a, isWorkspaceSnapshotNotReadyError as $i, takeReviewItem as $n, updateWorkspace as $r, isStandaloneRuntimeContextMessage as $t, getConversationMessageSlackTs as A, createPluginLogger as Aa, removeReactionFromMessage as Ai, createPluginHookRunner as An, takeDueTimerWatches as Ar, requestAnotherSlice as At, authorizationId as B, conversationViewerMarks as Ba, isConversationScopedChannel as Bi, coreTaskRegistrations as Bn, getDashboardObjectIconLink as Br, createTurnLimitGate as Bt, settleConversationTitleWork as C, sandboxSkillDir as Ca, addReactionToMessage as Ci, setExperimentalFeatures as Cn, collectEventMatchKeys as Cr, isInvalidConversationRecordError as Ct, buildConversationContext as D, buildNonInteractiveShellScript as Da, openSlackModal as Di, getOAuthAccountProviders as Dn, findMatchingWatches as Dr, recordConversationRetry as Dt, appendThreadContextMessages as E, buildCommandScript as Ea, openSlackDirectMessage as Ei, webActorUserIds as En, deliverWatch as Er, recordAttemptFailure as Et, turnHasReply as F, conversationHasParticipantUser as Fa, SlackActionError as Fi, getPluginTools as Fn, verifyScheduledAutomationCredentialSubject as Fr, TURN_LIMIT_WRAP_UP_MESSAGE as Ft, canReusePendingAuthLink as G, readLatestConversationBrief as Ga, getWorkspaceTeamId as Gi, countReviewItemsNeedingUser as Gn, createPluginState as Gr, getPiMessageRole as Gt, AuthorizationFlowDisabledError as H, viewerConversationMembership as Ha, normalizeSlackConversationId as Hi, setBriefsConfig as Hn, getDashboardTaskLink as Hr, CODEMODE_TOOL_NAME as Ht, upsertConversationMessage as I, conversationIsMemberRoot as Ia, downloadPrivateSlackFile as Ii, getPluginUserPromptContributions as In, verifySlackDirectCredentialSubject as Ir, TurnBudgetExceededError as It, wasPendingAuthStopped as J, readConversationEventPageAround as Ja, isAlreadyExistsError as Ji, getReviewItem as Jn, deleteWorkspace as Jr, hasCurrentInstruction as Jt, clearPendingAuth as K, readConversationEventPage as Ka, runWithWorkspaceTeamId as Ki, dismissOpenReviewItems as Kn, renderToolResultNudge as Kr, getTerminalAssistantMessages as Kt, createPluginEgress as L, conversationNotArchivedForEmail as La, getFilePermalink as Li, getPlugins as Ln, verifyTimerWatchCredentialSubject as Lr, TurnSliceLimitExceededError as Lt, markConversationMessage as M, readConversationAccessFromSql as Ma, uploadFilesToConversation as Mi, getPluginRoutes as Mn, bindScheduledAutomationCredentialSubject as Mr, startConversationWork as Mt, normalizeConversationText as N, conversationArchivedForEmail as Na, slackEntitySchema as Ni, getPluginSlackConversationLink as Nn, bindSlackDirectCredentialSubject as Nr, steerWebPendingMessages as Nt, createConversationMemoryService as O, runNonInteractiveCommand as Oa, postSlackEphemeralMessage as Oi, resolvePluginOAuthAccount as On, getWatch as Or, releaseConversationWork as Ot, recordDeliveredAssistantMessage as P, conversationArchivedForUser as Pa, slackExternalRefIdSchema as Pi, getPluginSystemPromptContributions as Pn, verifyEventAutomationCredentialSubject as Pr, stopConversationWork as Pt, abandonTurnRecord as Q, loadForkHistory as Qa, getWorkspaceSnapshotNotReadyError as Qi, searchReviewItems as Qn, listWorkspacesByRepository as Qr, isContinuablePiBoundary as Qt, PluginCredentialFailureError as R, conversationNotArchivedForUser as Ra, getHeaderString as Ri, setPlugins as Rn, JUNIOR_THREAD_STATE_TTL_MS as Rr, TurnToolCallLimitExceededError as Rt, resolveConversationTitle as S, SANDBOX_WORKSPACE_ROOT as Sa, truncateStatusText as Si, isExperimentalFeatureEnabled as Sn, cancelWatch as Sr, isFinalAttempt as St, resolveTaskTitle as T, sandboxSkillPathResolution as Ta, getSlackMessagePermalink as Ti, findLegacyWebActorUserId as Tn, createWatch as Tr, markConversationWorkEnqueued as Tt, AuthorizationPauseError as U, createPluginConversationEvents as Ua, runWithSlackInstallationToken as Ui, REVIEW_ITEM_REPLIED_REASON as Un, setDashboardConversationLinkOptions as Ur, persistWithRetry as Ut, AuthPausePersistenceError as V, readConversationViewerMarks as Va, isDmChannel as Vi, registration_exports as Vn, getDashboardReviewItemLink as Vr, isTurnExecutionLimitExceededError as Vt, abandonReplacedPendingAuth as W, readConversationBriefThrough as Wa, withSlackRetries as Wi, closeReviewItem as Wn, ToolInputError as Wr, extractAssistantText as Wt, loadTurnCheckpoint as X, readConversationMessageEventSeq as Xa, wrapSandboxSetupError as Xi, listReplyActionItems as Xn, getWorkspaceByName as Xr, instructionTextForProjection as Xt, continuableMessages as Y, readConversationLastEventSeq as Ya, throwSandboxOperationError as Yi, insertReviewItem as Yn, getWorkspace as Yr, hasRuntimeTurnContext as Yt, saveTurnCheckpoint as Z, buildSentryConversationUrl as Za, WorkspaceSnapshotNotReadyError as Zi, listWaitingConversations as Zn, listWorkspaces as Zr, isAssistantMessage as Zt, appendConversationMessages as _, SANDBOX_COMMAND_PATH as _a, escapeSlackMrkdwnText as _i, estimateTextTokens as _n, projectConversationEvents$1 as _o, RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS as _r, drainConversationMailbox as _t, loadProjection as a, parseSandboxEgressCredentialToken as aa, create as ai, trimTrailingAssistantMessages as an, saveObjectAnnotations as ao, isOnlyAssignee as ar, CONVERSATION_WORK_STALE_ENQUEUE_MS as at, projectConversationMessages as b, SANDBOX_REPOS_ROOT as ba, normalizeSlackStatusText as bi, getAgentContextInputLimitTokens as bn, getConfigDefaults as bo, STOP_WATCHING_TOOL_NAME as br, hasConversationStop as bt, recordAgentsInstructionsUpdated as c, resolveSandboxCommandEnvironment as ca, ensureDockerDaemon as ci, TURN_CONTEXT_TAG as cn, listConversationAnnotationsById as co, requireReviewItemLinks as cr, appendInboundMessage as ct, recordAuthorizationCompleted as d, sleep$2 as da, proxyVercelSandboxEgressRequest as di, SubscribedReplyReason as dn, lookupSlackUser as do, EVERYONE_ASSIGNEE as dr, checkInConversationWork as dt, workspaceSnapshotNotReadyUserMessage as ea, WorkspaceValidationError as ei, isToolResultError as en, getSlackFileId as eo, updateReviewItemContent as er, failTurnRecord as et, recordAuthorizationRequested as f, tryWorkspaceRepoCheckoutPath as fa, deliverOAuthAuthorization as fi, decideSubscribedThreadReply as fn, createPluginCache as fo, automationCreatorUserId as fr, clearConsumedConversationWake as ft, recordToolExecutionStarted as g, createPluginModel as ga, startOAuthFlow as gi, estimateRequestOverheadTokens as gn, piMessageFromHistoryItem as go, getSlackToolContext as gr, deadLetterAttempt as gt, recordSubscribedReplyRoute as h, createPluginEmbedder as ha, resolveBaseUrl as hi, calculateContextCompactionTargetTokens as hn, historyItemFromPiMessage as ho, resolveChannelCapabilities as hr, completeConversationWork as ht, loadConversationProjection as i, createSandboxEgressCredentialToken as ia, setWorkspaceSnapshotBuild as ii, stripRuntimeTurnContext as in, resolveRootVisibility as io, canReadReviewItem as ir, CONVERSATION_WORK_CHECK_IN_INTERVAL_MS as it, isHumanConversationMessage as j, canAccessConversation as ja, updateSlackMessage as ji, getPluginApiRoutes as jn, bindEventAutomationCredentialSubject as jr, requestConversationWork as jt, estimateConversationContextTokens as k, createPluginModelCostRecorder as ka, postSlackMessage as ki, agent_hooks_exports as kn, listWatches as kr, removeActiveConversation as kt, recordAttachmentsDelivered as l, normalizeSandboxEgressTracePropagationDomains as la, getSandboxProvider as li, buildDeterministicAssistantMessageId as ln, defaultTimezone as lo, reviewItemNeedsUser as lr, beginConversationResume as lt, recordMcpProviderConnected as m, PluginToolDeniedError as ma, parseOAuthStatePayload as mi, getThreadStopDecision as mn, configValueSchema as mo, resolveAssignees as mr, completeConversationStop as mt, commitMessages as n, consumeSandboxEgressAuthRequiredSignal as na, loadSnapshotsForProfile as ni, normalizeToolNameFromResult as nn, readAttachmentVisionSummary as no, canActOnReviewItem as nr, listTurnSummaries as nt, loadTurnProjection as o, sandboxEgressSignalsResponseSchema as oa, hash as oi, REQUEST_CONTEXT_SECTION_TAG as on, createPluginAnnotations as oo, readReviewItemAgentScope as or, ackMessages as ot, recordGuardianActionReviewed as p, workspaceRepoCheckoutPath as pa, formatProviderLabel as pi, getSubscribedReplyPreflightDecision as pn, createDurableLocationConfigurationService as po, resolveAssignee as pr, clearExpiredConversationLease as pt, getConversationPendingAuth as q, readConversationEventPageAfter as qa, isAbortError as qi, getOpenReviewItemByDedupeKey as qn, createWorkspace as qr, getUserMessageInstructionText as qt, loadConnectedMcpProviders as r, consumeSandboxEgressPermissionDeniedSignal as ra, setWorkspaceSnapshot as ri, retainRuntimeTurnContext as rn, recordSlackAttachment as ro, canAgentChangeReviewItem as rr, recordTurnSummary as rt, openConversationProjection as s, buildSandboxEgressNetworkPolicy as sa, isStale as si, SESSION_CONTEXT_SECTION_TAG as sn, listConversationAnnotations as so, requireReviewItemAssignees as sr, appendExclusiveInboundMessage as st, commitAcceptedReply as t, clearSandboxEgressSignals as ta, invalidateReadySnapshot as ti, isToolResultMessage as tn, matchSlackAttachments as to, PLUGIN_REVIEW_ITEM_KEY_PREFIX as tr, getTurnRecord as tt, recordAuthenticationLinked as u, SANDBOX_RUNTIME as ua, isVercelSandboxEgressRequest as ui, buildDeterministicTurnId as un, resolveUserTimezone as uo, reviewItemReaderForUser as ur, cancelHumanFacingPendingMessages as ut, hydrateConversationMessages as v, SANDBOX_DATA_ROOT as va, formatSlackLink as vi, getAgentBackgroundCompactionMarkTokens as vn, JUNIOR_NATIVE_EVENT_NAMESPACE as vo, RESOURCE_SUBSCRIPTION_MAX_TTL_MS as vr, getConversation as vt, fallbackShortTitle as w, sandboxSkillFile as wa, deleteSlackMessage as wi, createUserTokenStore as wn, createTimerWatch as wr, listActiveConversationIds as wt, persistConversationMessageSummaries as x, SANDBOX_SKILLS_ROOT as xa, slackMention as xi, getExperimentalFeatures as xn, setConfigDefaults as xo, cancelSubscriptions as xr, hasRunnableConversationWork as xt, persistConversationMessages as y, SANDBOX_JUNIOR_ROOT as ya, normalizeSlackReplyMarkdown as yi, getAgentContextCompactionTriggerTokens as yn, conversationNoteEvent as yo, RESOURCE_WATCH_TOOL_SOURCE as yr, getConversationWorkState as yt, createPluginAuthOrchestration as z, conversationPinnedForUser as za, getSlackClient as zi, validatePlugins as zn, getDashboardConversationLink as zr, buildTurnErrorResponse as zt };
14890
+ export { completeTurnRecord as $, notInheritedByForkChild as $a, isWorkspaceSnapshotNotReadyError as $i, takeReviewItem as $n, updateWorkspace as $r, isStandaloneRuntimeContextMessage as $t, getConversationMessageSlackTs as A, createPluginLogger as Aa, removeReactionFromMessage as Ai, createPluginHookRunner as An, takeDueTimerWatches as Ar, requestAnotherSlice as At, authorizationId as B, conversationViewerMarks as Ba, isConversationScopedChannel as Bi, coreTaskRegistrations as Bn, getDashboardObjectIconLink as Br, createTurnLimitGate as Bt, settleConversationTitleWork as C, sandboxSkillDir as Ca, addReactionToMessage as Ci, setExperimentalFeatures as Cn, collectEventMatchKeys as Cr, isInvalidConversationRecordError as Ct, buildConversationContext as D, buildNonInteractiveShellScript as Da, openSlackModal as Di, getOAuthAccountProviders as Dn, findMatchingWatches as Dr, recordConversationRetry as Dt, appendThreadContextMessages as E, buildCommandScript as Ea, openSlackDirectMessage as Ei, webActorUserIds as En, deliverWatch as Er, recordAttemptFailure as Et, turnHasReply as F, conversationHasParticipantUser as Fa, SlackActionError as Fi, getPluginTools as Fn, verifyScheduledAutomationCredentialSubject as Fr, TURN_LIMIT_WRAP_UP_MESSAGE as Ft, canReusePendingAuthLink as G, readLatestConversationBrief as Ga, getWorkspaceTeamId as Gi, countReviewItemsNeedingUser as Gn, createPluginState as Gr, getPiMessageRole as Gt, AuthorizationFlowDisabledError as H, viewerConversationMembership as Ha, normalizeSlackConversationId as Hi, setBriefsConfig as Hn, getDashboardTaskLink as Hr, CODEMODE_TOOL_NAME as Ht, upsertConversationMessage as I, conversationIsMemberRoot as Ia, downloadPrivateSlackFile as Ii, getPluginUserPromptContributions as In, verifySlackDirectCredentialSubject as Ir, TurnBudgetExceededError as It, wasPendingAuthStopped as J, readConversationEventPageAround as Ja, isAlreadyExistsError as Ji, getReviewItem as Jn, deleteWorkspace as Jr, hasCurrentInstruction as Jt, clearPendingAuth as K, readConversationEventPage as Ka, runWithWorkspaceTeamId as Ki, dismissOpenReviewItems as Kn, renderToolResultNudge as Kr, getTerminalAssistantMessages as Kt, createPluginEgress as L, conversationNotArchivedForEmail as La, getFilePermalink as Li, getPlugins as Ln, verifyTimerWatchCredentialSubject as Lr, TurnSliceLimitExceededError as Lt, markConversationMessage as M, readConversationAccessFromSql as Ma, uploadFilesToConversation as Mi, getPluginRoutes as Mn, bindScheduledAutomationCredentialSubject as Mr, startConversationWork as Mt, normalizeConversationText as N, conversationArchivedForEmail as Na, slackEntitySchema as Ni, getPluginSlackConversationLink as Nn, bindSlackDirectCredentialSubject as Nr, steerWebPendingMessages as Nt, createConversationMemoryService as O, runNonInteractiveCommand as Oa, postSlackEphemeralMessage as Oi, resolvePluginOAuthAccount as On, getWatch as Or, releaseConversationWork as Ot, recordDeliveredAssistantMessage as P, conversationArchivedForUser as Pa, slackExternalRefIdSchema as Pi, getPluginSystemPromptContributions as Pn, verifyEventAutomationCredentialSubject as Pr, stopConversationWork as Pt, abandonTurnRecord as Q, loadForkHistory as Qa, getWorkspaceSnapshotNotReadyError as Qi, searchReviewItems as Qn, listWorkspacesByRepository as Qr, isContinuablePiBoundary as Qt, PluginCredentialFailureError as R, conversationNotArchivedForUser as Ra, getHeaderString as Ri, setPlugins as Rn, JUNIOR_THREAD_STATE_TTL_MS as Rr, TurnToolCallLimitExceededError as Rt, resolveConversationTitle as S, SANDBOX_WORKSPACE_ROOT as Sa, truncateStatusText as Si, isExperimentalFeatureEnabled as Sn, setConfigDefaults as So, cancelWatch as Sr, isFinalAttempt as St, resolveTaskTitle as T, sandboxSkillPathResolution as Ta, getSlackMessagePermalink as Ti, findLegacyWebActorUserId as Tn, createWatch as Tr, markConversationWorkEnqueued as Tt, AuthorizationPauseError as U, createPluginConversationEvents as Ua, runWithSlackInstallationToken as Ui, REVIEW_ITEM_REPLIED_REASON as Un, setDashboardConversationLinkOptions as Ur, persistWithRetry as Ut, AuthPausePersistenceError as V, readConversationViewerMarks as Va, isDmChannel as Vi, registration_exports as Vn, getDashboardReviewItemLink as Vr, isTurnExecutionLimitExceededError as Vt, abandonReplacedPendingAuth as W, readConversationBriefThrough as Wa, withSlackRetries as Wi, closeReviewItem as Wn, ToolInputError as Wr, extractAssistantText as Wt, loadTurnCheckpoint as X, readConversationMessageEventSeq as Xa, wrapSandboxSetupError as Xi, listReplyActionItems as Xn, getWorkspaceByName as Xr, instructionTextForProjection as Xt, continuableMessages as Y, readConversationLastEventSeq as Ya, throwSandboxOperationError as Yi, insertReviewItem as Yn, getWorkspace as Yr, hasRuntimeTurnContext as Yt, saveTurnCheckpoint as Z, buildSentryConversationUrl as Za, WorkspaceSnapshotNotReadyError as Zi, listWaitingConversations as Zn, listWorkspaces as Zr, isAssistantMessage as Zt, appendConversationMessages as _, SANDBOX_COMMAND_PATH as _a, escapeSlackMrkdwnText as _i, estimateTextTokens as _n, piMessageFromHistoryItem as _o, RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS as _r, drainConversationMailbox as _t, loadProjection as a, parseSandboxEgressCredentialToken as aa, create as ai, trimTrailingAssistantMessages as an, resolveRootVisibility as ao, isOnlyAssignee as ar, CONVERSATION_WORK_STALE_ENQUEUE_MS as at, projectConversationMessages as b, SANDBOX_REPOS_ROOT as ba, normalizeSlackStatusText as bi, getAgentContextInputLimitTokens as bn, conversationNoteEvent as bo, STOP_WATCHING_TOOL_NAME as br, hasConversationStop as bt, recordAgentsInstructionsUpdated as c, resolveSandboxCommandEnvironment as ca, ensureDockerDaemon as ci, TURN_CONTEXT_TAG as cn, listConversationAnnotations as co, requireReviewItemLinks as cr, appendInboundMessage as ct, recordAuthorizationCompleted as d, sleep$2 as da, proxyVercelSandboxEgressRequest as di, SubscribedReplyReason as dn, resolveUserTimezone as do, EVERYONE_ASSIGNEE as dr, checkInConversationWork as dt, workspaceSnapshotNotReadyUserMessage as ea, WorkspaceValidationError as ei, isToolResultError as en, getSlackFileId as eo, updateReviewItemContent as er, failTurnRecord as et, recordAuthorizationRequested as f, tryWorkspaceRepoCheckoutPath as fa, deliverOAuthAuthorization as fi, decideSubscribedThreadReply as fn, lookupSlackUser as fo, automationCreatorUserId as fr, clearConsumedConversationWake as ft, recordToolExecutionStarted as g, createPluginModel as ga, startOAuthFlow as gi, estimateRequestOverheadTokens as gn, historyItemFromPiMessage as go, getSlackToolContext as gr, deadLetterAttempt as gt, recordSubscribedReplyRoute as h, createPluginEmbedder as ha, resolveBaseUrl as hi, calculateContextCompactionTargetTokens as hn, configValueSchema as ho, resolveChannelCapabilities as hr, completeConversationWork as ht, loadConversationProjection as i, createSandboxEgressCredentialToken as ia, setWorkspaceSnapshotBuild as ii, stripRuntimeTurnContext as in, recordSlackAttachment as io, canReadReviewItem as ir, CONVERSATION_WORK_CHECK_IN_INTERVAL_MS as it, isHumanConversationMessage as j, canAccessConversation as ja, updateSlackMessage as ji, getPluginApiRoutes as jn, bindEventAutomationCredentialSubject as jr, requestConversationWork as jt, estimateConversationContextTokens as k, createPluginModelCostRecorder as ka, postSlackMessage as ki, agent_hooks_exports as kn, listWatches as kr, removeActiveConversation as kt, recordAttachmentsDelivered as l, normalizeSandboxEgressTracePropagationDomains as la, getSandboxProvider as li, buildDeterministicAssistantMessageId as ln, listConversationAnnotationsById as lo, reviewItemNeedsUser as lr, beginConversationResume as lt, recordMcpProviderConnected as m, PluginToolDeniedError as ma, parseOAuthStatePayload as mi, getThreadStopDecision as mn, createDurableLocationConfigurationService as mo, resolveAssignees as mr, completeConversationStop as mt, commitMessages as n, consumeSandboxEgressAuthRequiredSignal as na, loadSnapshotsForProfile as ni, normalizeToolNameFromResult as nn, readAttachmentVisionSummary as no, canActOnReviewItem as nr, listTurnSummaries as nt, loadTurnProjection as o, sandboxEgressSignalsResponseSchema as oa, hash as oi, REQUEST_CONTEXT_SECTION_TAG as on, saveObjectAnnotations as oo, readReviewItemAgentScope as or, ackMessages as ot, recordGuardianActionReviewed as p, workspaceRepoCheckoutPath as pa, formatProviderLabel as pi, getSubscribedReplyPreflightDecision as pn, createPluginCache as po, resolveAssignee as pr, clearExpiredConversationLease as pt, getConversationPendingAuth as q, readConversationEventPageAfter as qa, isAbortError as qi, getOpenReviewItemByDedupeKey as qn, createWorkspace as qr, getUserMessageInstructionText as qt, loadConnectedMcpProviders as r, consumeSandboxEgressPermissionDeniedSignal as ra, setWorkspaceSnapshot as ri, retainRuntimeTurnContext as rn, readSlackAttachmentsVersion as ro, canAgentChangeReviewItem as rr, recordTurnSummary as rt, openConversationProjection as s, buildSandboxEgressNetworkPolicy as sa, isStale as si, SESSION_CONTEXT_SECTION_TAG as sn, createPluginAnnotations as so, requireReviewItemAssignees as sr, appendExclusiveInboundMessage as st, commitAcceptedReply as t, clearSandboxEgressSignals as ta, invalidateReadySnapshot as ti, isToolResultMessage as tn, matchSlackAttachments as to, PLUGIN_REVIEW_ITEM_KEY_PREFIX as tr, getTurnRecord as tt, recordAuthenticationLinked as u, SANDBOX_RUNTIME as ua, isVercelSandboxEgressRequest as ui, buildDeterministicTurnId as un, defaultTimezone as uo, reviewItemReaderForUser as ur, cancelHumanFacingPendingMessages as ut, hydrateConversationMessages as v, SANDBOX_DATA_ROOT as va, formatSlackLink as vi, getAgentBackgroundCompactionMarkTokens as vn, projectConversationEvents$1 as vo, RESOURCE_SUBSCRIPTION_MAX_TTL_MS as vr, getConversation as vt, fallbackShortTitle as w, sandboxSkillFile as wa, deleteSlackMessage as wi, createUserTokenStore as wn, createTimerWatch as wr, listActiveConversationIds as wt, persistConversationMessageSummaries as x, SANDBOX_SKILLS_ROOT as xa, slackMention as xi, getExperimentalFeatures as xn, getConfigDefaults as xo, cancelSubscriptions as xr, hasRunnableConversationWork as xt, persistConversationMessages as y, SANDBOX_JUNIOR_ROOT as ya, normalizeSlackReplyMarkdown as yi, getAgentContextCompactionTriggerTokens as yn, JUNIOR_NATIVE_EVENT_NAMESPACE as yo, RESOURCE_WATCH_TOOL_SOURCE as yr, getConversationWorkState as yt, createPluginAuthOrchestration as z, conversationPinnedForUser as za, getSlackClient as zi, validatePlugins as zn, getDashboardConversationLink as zr, buildTurnErrorResponse as zt };