@sentry/junior 0.286.0 → 0.287.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 (69) hide show
  1. package/dist/{adapter-JQZaJ-B_.js → adapter-CL-HUKgd.js} +1 -1
  2. package/dist/{admin-Dm2bimJ-.js → admin-C9urXVfi.js} +2 -1
  3. package/dist/{agent-runner-DGCwOEyL.js → agent-runner-Bfnw551N.js} +644 -312
  4. package/dist/api/schema.d.ts +2 -2
  5. package/dist/api/schema.js +7 -7
  6. package/dist/api.d.ts +1 -1
  7. package/dist/api.js +36 -53
  8. package/dist/{app-BKq0JzWx.d.ts → app-DBY5TnfY.d.ts} +2 -2
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +62 -29
  11. package/dist/{assistant-reply-CAPafcUY.js → assistant-reply-u_PRYzuz.js} +1 -1
  12. package/dist/{automation-B-jJN_gM.js → automation-DksGNDRO.js} +3 -6
  13. package/dist/{background-compaction-queue-Btu2oab_.js → background-compaction-queue-CYI909P5.js} +3 -3
  14. package/dist/{briefs-UMeYehUe.js → briefs-DaXiMWzT.js} +6 -5
  15. package/dist/{catalog-runtime-Bym8GVdh.js → catalog-runtime-BCIuBe4d.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-B0aAs7wC.js → config-CkHcUMN7.js} +580 -3
  24. package/dist/{connections-CQ7p0aNJ.js → connections-BnIj0wtx.js} +9 -9
  25. package/dist/{conversation-BusI2uzj.js → conversation-E7ZPJx2H.js} +8 -1
  26. package/dist/{conversation-pending-messages-DwehU0Fd.js → conversation-pending-messages-DVch6YQw.js} +2 -5
  27. package/dist/{conversation-privacy-Cd_nZZBM.js → conversation-privacy-DF1hW0ja.js} +1 -1
  28. package/dist/{credential-sync-DmiJi_At.js → credential-sync-CzMar9hq.js} +13 -13
  29. package/dist/{viewer-CH-ASQzh.js → db-DJ11eZqq.js} +37 -343
  30. package/dist/{db-C5zi4ecs.d.ts → db-YDKKDxlh.d.ts} +1 -1
  31. package/dist/{executor-Dipi2Ixl.js → executor-BY9TB31g.js} +11 -4
  32. package/dist/instrumentation.js +2 -2
  33. package/dist/{logging-CMFhLLj4.js → logging-BO5zU6Mt.js} +1 -1
  34. package/dist/{media-B-BpXo41.js → media-Cz1ZiV1U.js} +2 -2
  35. package/dist/{message-D1xLljUF.js → message-CsUbuEc8.js} +10 -10
  36. package/dist/nitro.d.ts +1 -1
  37. package/dist/nitro.js +2 -2
  38. package/dist/{oauth-callback-server-DCAFIUQr.js → oauth-callback-server-hiDKK0_n.js} +2 -2
  39. package/dist/{projection-CoeMNxJ4.js → projection-CL_YWeGf.js} +82 -160
  40. package/dist/{prompt-C9OQEfan.js → prompt-BHOEQSmf.js} +182 -2
  41. package/dist/{registry-u-sFYtx_.js → registry-BriFLnaJ.js} +1 -1
  42. package/dist/{reporting-window-B4TwyuJo.js → reporting-window-B3Ze-Qnt.js} +4 -1
  43. package/dist/{resolve-DYqgL3Eo.js → resolve-Bt6GgAiA.js} +3 -3
  44. package/dist/{result-CescSwAw.js → result-Bo1TZu0Q.js} +8 -8
  45. package/dist/{runner-Cr67a8TB.js → runner-D3YeCQgt.js} +8 -8
  46. package/dist/{sandbox-egress-signals-DLOazy5W.js → sandbox-egress-signals-CcnSPP4S.js} +1 -1
  47. package/dist/{schema-BUSi3sgv.js → schema-BWE3RJEB.js} +17 -5
  48. package/dist/{schema-Ih60j59-.d.ts → schema-C6fsEwjo.d.ts} +46 -1
  49. package/dist/{service-account-CGEqz9wG.js → service-account-DiQQuuw7.js} +3 -3
  50. package/dist/{service-account-CsKxktLk.js → service-account-r6fl0b-9.js} +3 -3
  51. package/dist/{session-stop-CGz5DByb.js → session-stop-B2Nut40V.js} +18 -18
  52. package/dist/{skills-COCqf61f.js → skills-CD5aJdzg.js} +2 -2
  53. package/dist/spawn-CalgZQiu.js +79 -0
  54. package/dist/{stop-GyFZkHuQ.js → stop-kujZLbi0.js} +56 -240
  55. package/dist/{store-D0-8plWp.js → store-DdIEUL1q.js} +3 -3
  56. package/dist/{task-runner-xPuQmEot.js → task-runner-D_RDr2Hu.js} +12 -11
  57. package/dist/{turn-failure-response-BOviBdT-.js → turn-failure-response-B5nV1Er-.js} +16 -11
  58. package/dist/{validation-DZDKorGz.js → validation-K4pqwoVZ.js} +1 -1
  59. package/dist/{version-BTIz7fGi.js → version-DBvhk1X9.js} +1 -1
  60. package/dist/version.js +1 -1
  61. package/dist/viewer-DrMmFUul.js +337 -0
  62. package/dist/{work-C75_IM5e.js → work-ljRoODGu.js} +30 -19
  63. package/dist/{worker-Dl47I729.js → worker-CYO1Q0Js.js} +5 -6
  64. package/migrations/0088_conversation_unsubscribe.sql +1 -0
  65. package/migrations/meta/0088_snapshot.json +4372 -0
  66. package/migrations/meta/_journal.json +7 -0
  67. package/package.json +4 -4
  68. package/dist/config-B9f9Lqo5.js +0 -579
  69. package/dist/spawn-C8F_iXWO.js +0 -42
@@ -1,4 +1,4 @@
1
- import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-CMFhLLj4.js";
1
+ import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-BO5zU6Mt.js";
2
2
  import { o as isUserActor, s as parseActorUserId } from "./actor-6jsm_v96.js";
3
3
  import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJhGdS4c.js";
4
4
  import path from "node:path";
@@ -160,6 +160,9 @@ function formatUserInputAnswer(request, answer) {
160
160
  if (normalized.other) lines.push(answerLine(`Other: ${normalized.other}`));
161
161
  return lines.join("\n");
162
162
  }
163
+ // src/api/schema/common.ts
164
+ /** Stable error body returned by Junior-owned REST endpoints. */
165
+ const apiErrorSchema = z.object({ error: z.string().min(1) }).strict();
163
166
  // src/chat/conversations/web-message-id.ts
164
167
  /**
165
168
  * Build the retry-stable Message id shared by web ingress and browser sends.
@@ -292,4 +295,4 @@ function sumUtcHoursIntoSixHours(args) {
292
295
  rows: bySix
293
296
  });
294
297
  }
295
- export { AGENT_INVOCATION_STATUSES as C, userCustomizationTextSchema as E, AGENT_INVOCATION_PARENT_MAILBOX_STATUSES as S, userCustomizationSchema as T, formatUserInputAnswer as _, fillUtcSixHours as a, userInputRequestSchema as b, trailingUtcDayWindow as c, utcDayKey as d, utcHourKey as f, buttonUserInputField as g, USER_INPUT_NOTE as h, fillUtcHours as i, trailingUtcHourWindow as l, USER_INPUT_LIMITS as m, HOUR_MS as n, startOfUtcHour as o, webMessageId as p, fillUtcDays as r, sumUtcHoursIntoSixHours as s, DAY_MS as t, trailingUtcSixHourWindow as u, isEmptyUserInputAnswer as v, USER_CUSTOMIZATION_MAX_CHARS as w, AGENT_INVOCATION_MAILBOX_STATUSES as x, normalizeUserInputAnswer as y };
298
+ export { AGENT_INVOCATION_PARENT_MAILBOX_STATUSES as C, userCustomizationTextSchema as D, userCustomizationSchema as E, AGENT_INVOCATION_MAILBOX_STATUSES as S, USER_CUSTOMIZATION_MAX_CHARS as T, buttonUserInputField as _, fillUtcSixHours as a, normalizeUserInputAnswer as b, trailingUtcDayWindow as c, utcDayKey as d, utcHourKey as f, USER_INPUT_NOTE as g, USER_INPUT_LIMITS as h, fillUtcHours as i, trailingUtcHourWindow as l, apiErrorSchema as m, HOUR_MS as n, startOfUtcHour as o, webMessageId as p, fillUtcDays as r, sumUtcHoursIntoSixHours as s, DAY_MS as t, trailingUtcSixHourWindow as u, formatUserInputAnswer as v, AGENT_INVOCATION_STATUSES as w, userInputRequestSchema as x, isEmptyUserInputAnswer as y };
@@ -1,6 +1,6 @@
1
- import { Di as create, Na as sleep, Ua as SANDBOX_WORKSPACE_ROOT, Ya as runNonInteractiveCommand, ji as getSandboxProvider, ki as isStale, za as SANDBOX_COMMAND_PATH } from "./projection-CoeMNxJ4.js";
2
- import { E as withSpan, b as setSpanAttributes } from "./logging-CMFhLLj4.js";
3
- import { r as getStateAdapter } from "./adapter-JQZaJ-B_.js";
1
+ import { Fa as sleep, Ga as SANDBOX_WORKSPACE_ROOT, Ni as getSandboxProvider, Va as SANDBOX_COMMAND_PATH, Za as runNonInteractiveCommand, ji as isStale, ki as create } from "./projection-CL_YWeGf.js";
2
+ import { E as withSpan, b as setSpanAttributes } from "./logging-BO5zU6Mt.js";
3
+ import { r as getStateAdapter } from "./adapter-CL-HUKgd.js";
4
4
  import * as z from "zod";
5
5
  // src/chat/sandbox/resources.ts
6
6
  let configuredResources;
@@ -1,12 +1,12 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { yn as renderUntrustedTag } from "./projection-CoeMNxJ4.js";
3
- import { V as SYSTEM_IDENTITY_ID } from "./viewer-CH-ASQzh.js";
4
- import { f as credentialContextForActor } from "./registry-u-sFYtx_.js";
5
- import { Vt as listUnreportedSiblingAgents } from "./agent-runner-DGCwOEyL.js";
6
- import { C as isTerminalAgentInvocation, G as getAgentInvocationIdForMessage, J as getAgentInvocationResultMessageId, K as getAgentInvocationIdForResult, W as getAgentInvocationIdForEvents, k as markAgentInvocationParentMailboxAppended, x as getLatestAgentInvocationForConversation, y as getAgentInvocation } from "./turn-failure-response-BOviBdT-.js";
7
- import { D as timerWatchCredentialSubject, E as renderEventBatchInputs, S as EVENT_WAIT_MS, T as isEventMailboxMetadata, f as getEventBatchDelayMs, m as parseEventMessages, n as isWatchEvent, s as eventReviewItemInputs } from "./session-stop-CGz5DByb.js";
8
- import { r as appendAndEnqueueInboundMessage } from "./store-D0-8plWp.js";
9
- import { a as enqueueAgentInvocation, l as createAgentInvocationFromLatest, o as resolveAgentInvocationId, t as createAgentInvocationWorker } from "./work-C75_IM5e.js";
2
+ import { bn as renderUntrustedTag } from "./projection-CL_YWeGf.js";
3
+ import { T as SYSTEM_IDENTITY_ID } from "./db-DJ11eZqq.js";
4
+ import { f as credentialContextForActor } from "./registry-BriFLnaJ.js";
5
+ import { Jt as listUnreportedSiblingAgents } from "./agent-runner-Bfnw551N.js";
6
+ import { C as isTerminalAgentInvocation, G as getAgentInvocationIdForEvents, K as getAgentInvocationIdForMessage, Y as getAgentInvocationResultMessageId, k as markAgentInvocationParentMailboxAppended, q as getAgentInvocationIdForResult, x as getLatestAgentInvocationForConversation, y as getAgentInvocation } from "./turn-failure-response-B5nV1Er-.js";
7
+ import { D as timerWatchCredentialSubject, E as renderEventBatchInputs, S as EVENT_WAIT_MS, T as isEventMailboxMetadata, f as getEventBatchDelayMs, m as parseEventMessages, n as isWatchEvent, s as eventReviewItemInputs } from "./session-stop-B2Nut40V.js";
8
+ import { r as appendAndEnqueueInboundMessage } from "./store-DdIEUL1q.js";
9
+ import { a as enqueueAgentInvocation, l as createAgentInvocationFromLatest, o as resolveAgentInvocationId, t as createAgentInvocationWorker } from "./work-ljRoODGu.js";
10
10
  import { n as isAgentInvocationResultEventType, t as agentInvocationResultEventType } from "./result-event-type-DD6BAgT7.js";
11
11
  // src/chat/agent-invocations/result.ts
12
12
  var result_exports = /* @__PURE__ */ __exportAll({
@@ -1,11 +1,11 @@
1
- import { L as upsertConversationMessage, M as markConversationMessage, N as normalizeConversationText, P as recordDeliveredAssistantMessage, V as authorizationId, Yt as persistWithRetry, a as loadProjection, b as persistConversationMessages, d as recordAuthorizationCompleted, et as saveTurnCheckpoint, j as latestConversationMessageSeq, t as commitAcceptedReply, v as hydrateConversationMessages } from "./projection-CoeMNxJ4.js";
2
- import { S as setTags, T as withLogContext, p as logException } from "./logging-CMFhLLj4.js";
3
- import { V as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-CH-ASQzh.js";
4
- import { f as credentialContextForActor } from "./registry-u-sFYtx_.js";
5
- import { N as messageCardText } from "./conversation-BusI2uzj.js";
6
- import { dt as startActiveTurn, f as ConversationTurnLifecycleService, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, m as loadPendingMessageCards, t as finalizeFailedTurnReplyWithEvent, u as buildTurnThreadContext, ut as markTurnFailed } from "./turn-failure-response-BOviBdT-.js";
7
- import { n as getAssistantReplyText } from "./assistant-reply-CAPafcUY.js";
8
- import { _t as getPersistedThreadState, bt as coerceThreadConversationState, gt as getPersistedSandboxState, n as scheduleSessionCompletedPluginTasks, t as processPluginTask, yt as persistThreadStateById } from "./task-runner-xPuQmEot.js";
1
+ import { L as upsertConversationMessage, M as markConversationMessage, N as normalizeConversationText, P as recordDeliveredAssistantMessage, V as authorizationId, Yt as persistWithRetry, a as loadProjection, b as persistConversationMessages, d as recordAuthorizationCompleted, et as saveTurnCheckpoint, j as latestConversationMessageSeq, t as commitAcceptedReply, v as hydrateConversationMessages } from "./projection-CL_YWeGf.js";
2
+ import { S as setTags, T as withLogContext, p as logException } from "./logging-BO5zU6Mt.js";
3
+ import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, r as getConversationEventStore } from "./db-DJ11eZqq.js";
4
+ import { f as credentialContextForActor } from "./registry-BriFLnaJ.js";
5
+ import { N as messageCardText } from "./conversation-E7ZPJx2H.js";
6
+ import { dt as markTurnFailed, f as ConversationTurnLifecycleService, ft as startActiveTurn, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, m as loadPendingMessageCards, t as finalizeFailedTurnReplyWithEvent, u as buildTurnThreadContext } from "./turn-failure-response-B5nV1Er-.js";
7
+ import { n as getAssistantReplyText } from "./assistant-reply-u_PRYzuz.js";
8
+ import { _t as getPersistedThreadState, bt as coerceThreadConversationState, gt as getPersistedSandboxState, n as scheduleSessionCompletedPluginTasks, t as processPluginTask, yt as persistThreadStateById } from "./task-runner-D_RDr2Hu.js";
9
9
  import { randomUUID } from "node:crypto";
10
10
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
11
11
  // src/chat/local/runner.ts
@@ -1,4 +1,4 @@
1
- import { Oa as sandboxEgressSignalsResponseSchema } from "./projection-CoeMNxJ4.js";
1
+ import { Aa as sandboxEgressSignalsResponseSchema } from "./projection-CL_YWeGf.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;
@@ -1,8 +1,8 @@
1
1
  import { r as notificationScheduleSchema } from "./schedule-BTp__wrw.js";
2
- import { D as conversationChildAgentTotalsSchema, S as conversationUsageSchema, b as conversationSummaryReportSchema, i as actorIdentitySchema, s as conversationAuxiliaryCostsSchema } from "./conversation-BusI2uzj.js";
3
- import { C as AGENT_INVOCATION_STATUSES, b as userInputRequestSchema, i as fillUtcHours, r as fillUtcDays, s as sumUtcHoursIntoSixHours } from "./reporting-window-B4TwyuJo.js";
4
- import "./automation-B-jJN_gM.js";
5
- import "./conversation-pending-messages-DwehU0Fd.js";
2
+ import { D as conversationChildAgentTotalsSchema, S as conversationUsageSchema, b as conversationSummaryReportSchema, i as actorIdentitySchema, s as conversationAuxiliaryCostsSchema } from "./conversation-E7ZPJx2H.js";
3
+ import { i as fillUtcHours, r as fillUtcDays, s as sumUtcHoursIntoSixHours, w as AGENT_INVOCATION_STATUSES, x as userInputRequestSchema } from "./reporting-window-B3Ze-Qnt.js";
4
+ import "./automation-DksGNDRO.js";
5
+ import "./conversation-pending-messages-DVch6YQw.js";
6
6
  import { t as isPushServiceEndpoint } from "./push-endpoint-CO-nomUd.js";
7
7
  import * as z from "zod";
8
8
  import { codeChangeStateSchema, eventMatchSchema } from "@sentry/junior-plugin-api";
@@ -33,6 +33,18 @@ const pinConversationResponseSchema = z.object({ pinnedAt: z.string().datetime()
33
33
  const reorderPinnedConversationsBodySchema = z.object({ conversationIds: z.array(z.string().min(1)).min(1).max(500).refine((ids) => new Set(ids).size === ids.length, { message: "Each Conversation can appear once." }) }).strict();
34
34
  /** The pinned Conversations that got a new place, in order. */
35
35
  const reorderPinnedConversationsResponseSchema = z.object({ conversationIds: z.array(z.string()) }).strict();
36
+ // src/api/schema/conversation-subscription.ts
37
+ /** Subscribe to or unsubscribe from one Conversation for the viewer. */
38
+ const conversationSubscriptionBodySchema = z.object({ subscribed: z.boolean() }).strict();
39
+ /**
40
+ * The viewer's subscription after the change. `archivedAt` is set when the
41
+ * viewer was the last subscriber, so the unsubscribe archived the
42
+ * Conversation for everyone.
43
+ */
44
+ const conversationSubscriptionResponseSchema = z.object({
45
+ archivedAt: z.string().datetime().nullable(),
46
+ subscribed: z.boolean()
47
+ }).strict();
36
48
  // src/api/schema/conversation-unread.ts
37
49
  /** Mark one Conversation read or unread for the signed-in viewer. */
38
50
  const markConversationUnreadBodySchema = z.object({ unread: z.boolean() }).strict();
@@ -768,4 +780,4 @@ const versionsSchema = z.object({
768
780
  /** The viewer's rolling model spend. */
769
781
  spend: z.string().min(1)
770
782
  }).strict();
771
- export { codeChangeSummaryReportSchema as $, actorDirectoryReportSchema as A, activityHours as B, startServiceAccountSignInResponseSchema as C, pinConversationBodySchema as Ct, personalTokenMetadataSchema as D, conversationCatchUpBodySchema as Dt, personalTokenListSchema as E, reorderPinnedConversationsResponseSchema as Et, locationActivityDayReportSchema as F, pushSubscriptionDeleteBodySchema as G, dailyConversationActivitySchema as H, locationDetailReportSchema as I, connectionParamsSchema as J, testNotificationResponseSchema as K, locationDirectoryReportSchema as L, avatarParamsSchema as M, personParamsSchema as N, personalTokenParamsSchema as O, conversationCatchUpSchema as Ot, personalSpendReportSchema as P, codeActivityDaySchema as Q, locationParamsSchema as R, serviceAccountSchema as S, markConversationUnreadBodySchema as St, createdPersonalTokenSchema as T, reorderPinnedConversationsBodySchema as Tt, notificationSettingsSchema as U, activitySixHours as V, pushSubscriptionBodySchema as W, disconnectConnectionResponseSchema as X, connectionSchema as Y, startConnectionResponseSchema as Z, reviewItemSchema as _, archiveConversationBodySchema as _t, baselineSnapshotSchema as a, codeRepositorySummarySchema as at, serviceAccountListSchema as b, conversationAutoArchiveSchema as bt, workspaceListSchema as c, conversationChildAgentSchema as ct, workspaceSchema as d, continueConversationInSlackResponseSchema as dt, codeChangeSummarySchema as et, reviewItemActionSchema as f, stopConversationTurnResponseSchema as ft, reviewItemParamsSchema as g, renameConversationResponseSchema as gt, reviewItemListSchema as h, renameConversationBodySchema as ht, statsReportSchema as i, codeRepositoryReportSchema as it, actorProfileReportSchema as j, revokePersonalTokenResponseSchema as k, workspaceParamsSchema as l, conversationChildAgentsReportSchema as lt, reviewItemListQuerySchema as m, CONVERSATION_TITLE_MAX_LENGTH as mt, versionsSchema as n, codePersonReportSchema as nt, deleteWorkspaceResponseSchema as o, conversationWatchSchema as ot, reviewItemCountSchema as p, conversationStatsReportSchema as pt, connectionListSchema as q, statSchema as r, codeRepositoryParamsSchema as rt, workspaceBodySchema as s, conversationWatchesReportSchema as st, versionsQuerySchema as t, codeOverviewReportSchema as tt, workspaceRepoSchema as u, continueConversationInSlackBodySchema as ut, reviewItemWaitingConversationsSchema as v, archiveConversationResponseSchema as vt, createPersonalTokenBodySchema as w, pinConversationResponseSchema as wt, serviceAccountParamsSchema as x, conversationUnreadSchema as xt, disconnectServiceAccountResponseSchema as y, archiveDoneConversationsResponseSchema as yt, activityDays as z };
783
+ export { codeChangeSummaryReportSchema as $, actorDirectoryReportSchema as A, conversationCatchUpSchema as At, activityHours as B, startServiceAccountSignInResponseSchema as C, conversationSubscriptionBodySchema as Ct, personalTokenMetadataSchema as D, reorderPinnedConversationsBodySchema as Dt, personalTokenListSchema as E, pinConversationResponseSchema as Et, locationActivityDayReportSchema as F, pushSubscriptionDeleteBodySchema as G, dailyConversationActivitySchema as H, locationDetailReportSchema as I, connectionParamsSchema as J, testNotificationResponseSchema as K, locationDirectoryReportSchema as L, avatarParamsSchema as M, personParamsSchema as N, personalTokenParamsSchema as O, reorderPinnedConversationsResponseSchema as Ot, personalSpendReportSchema as P, codeActivityDaySchema as Q, locationParamsSchema as R, serviceAccountSchema as S, markConversationUnreadBodySchema as St, createdPersonalTokenSchema as T, pinConversationBodySchema as Tt, notificationSettingsSchema as U, activitySixHours as V, pushSubscriptionBodySchema as W, disconnectConnectionResponseSchema as X, connectionSchema as Y, startConnectionResponseSchema as Z, reviewItemSchema as _, archiveConversationBodySchema as _t, baselineSnapshotSchema as a, codeRepositorySummarySchema as at, serviceAccountListSchema as b, conversationAutoArchiveSchema as bt, workspaceListSchema as c, conversationChildAgentSchema as ct, workspaceSchema as d, continueConversationInSlackResponseSchema as dt, codeChangeSummarySchema as et, reviewItemActionSchema as f, stopConversationTurnResponseSchema as ft, reviewItemParamsSchema as g, renameConversationResponseSchema as gt, reviewItemListSchema as h, renameConversationBodySchema as ht, statsReportSchema as i, codeRepositoryReportSchema as it, actorProfileReportSchema as j, revokePersonalTokenResponseSchema as k, conversationCatchUpBodySchema as kt, workspaceParamsSchema as l, conversationChildAgentsReportSchema as lt, reviewItemListQuerySchema as m, CONVERSATION_TITLE_MAX_LENGTH as mt, versionsSchema as n, codePersonReportSchema as nt, deleteWorkspaceResponseSchema as o, conversationWatchSchema as ot, reviewItemCountSchema as p, conversationStatsReportSchema as pt, connectionListSchema as q, statSchema as r, codeRepositoryParamsSchema as rt, workspaceBodySchema as s, conversationWatchesReportSchema as st, versionsQuerySchema as t, codeOverviewReportSchema as tt, workspaceRepoSchema as u, continueConversationInSlackBodySchema as ut, reviewItemWaitingConversationsSchema as v, archiveConversationResponseSchema as vt, createPersonalTokenBodySchema as w, conversationSubscriptionResponseSchema as wt, serviceAccountParamsSchema as x, conversationUnreadSchema as xt, disconnectServiceAccountResponseSchema as y, archiveDoneConversationsResponseSchema as yt, activityDays as z };
@@ -1074,6 +1074,10 @@ declare const conversationReportEventDataSchema: z.ZodDiscriminatedUnion<[z.ZodO
1074
1074
  startedSeq: z.ZodNumber;
1075
1075
  startedAt: z.ZodString;
1076
1076
  childConversationId: z.ZodString;
1077
+ childKind: z.ZodEnum<{
1078
+ task: "task";
1079
+ thread: "thread";
1080
+ }>;
1077
1081
  subagentKind: z.ZodString;
1078
1082
  agentName: z.ZodOptional<z.ZodString>;
1079
1083
  task: z.ZodOptional<z.ZodString>;
@@ -1325,6 +1329,10 @@ declare const conversationReportEventSchema: z.ZodObject<{
1325
1329
  startedSeq: z.ZodNumber;
1326
1330
  startedAt: z.ZodString;
1327
1331
  childConversationId: z.ZodString;
1332
+ childKind: z.ZodEnum<{
1333
+ task: "task";
1334
+ thread: "thread";
1335
+ }>;
1328
1336
  subagentKind: z.ZodString;
1329
1337
  agentName: z.ZodOptional<z.ZodString>;
1330
1338
  task: z.ZodOptional<z.ZodString>;
@@ -1656,6 +1664,10 @@ declare const conversationEventPageSchema: z.ZodObject<{
1656
1664
  startedSeq: z.ZodNumber;
1657
1665
  startedAt: z.ZodString;
1658
1666
  childConversationId: z.ZodString;
1667
+ childKind: z.ZodEnum<{
1668
+ task: "task";
1669
+ thread: "thread";
1670
+ }>;
1659
1671
  subagentKind: z.ZodString;
1660
1672
  agentName: z.ZodOptional<z.ZodString>;
1661
1673
  task: z.ZodOptional<z.ZodString>;
@@ -1961,6 +1973,7 @@ declare const conversationDetailReportSchema: z.ZodObject<{
1961
1973
  autoArchive: z.ZodOptional<z.ZodBoolean>;
1962
1974
  canFork: z.ZodOptional<z.ZodBoolean>;
1963
1975
  canContinueInSlack: z.ZodOptional<z.ZodLiteral<true>>;
1976
+ subscribed: z.ZodOptional<z.ZodBoolean>;
1964
1977
  readPosition: z.ZodOptional<z.ZodObject<{
1965
1978
  lastReadSeq: z.ZodNumber;
1966
1979
  }, z.core.$strict>>;
@@ -2203,6 +2216,10 @@ declare const conversationDetailReportSchema: z.ZodObject<{
2203
2216
  startedSeq: z.ZodNumber;
2204
2217
  startedAt: z.ZodString;
2205
2218
  childConversationId: z.ZodString;
2219
+ childKind: z.ZodEnum<{
2220
+ task: "task";
2221
+ thread: "thread";
2222
+ }>;
2206
2223
  subagentKind: z.ZodString;
2207
2224
  agentName: z.ZodOptional<z.ZodString>;
2208
2225
  task: z.ZodOptional<z.ZodString>;
@@ -2605,6 +2622,10 @@ declare const conversationDetailReportSchema: z.ZodObject<{
2605
2622
  startedSeq: z.ZodNumber;
2606
2623
  startedAt: z.ZodString;
2607
2624
  childConversationId: z.ZodString;
2625
+ childKind: z.ZodEnum<{
2626
+ task: "task";
2627
+ thread: "thread";
2628
+ }>;
2608
2629
  subagentKind: z.ZodString;
2609
2630
  agentName: z.ZodOptional<z.ZodString>;
2610
2631
  task: z.ZodOptional<z.ZodString>;
@@ -3063,6 +3084,7 @@ declare const conversationDetailWithMailboxReportSchema: z.ZodObject<{
3063
3084
  autoArchive: z.ZodOptional<z.ZodBoolean>;
3064
3085
  canFork: z.ZodOptional<z.ZodBoolean>;
3065
3086
  canContinueInSlack: z.ZodOptional<z.ZodLiteral<true>>;
3087
+ subscribed: z.ZodOptional<z.ZodBoolean>;
3066
3088
  readPosition: z.ZodOptional<z.ZodObject<{
3067
3089
  lastReadSeq: z.ZodNumber;
3068
3090
  }, z.core.$strict>>;
@@ -3305,6 +3327,10 @@ declare const conversationDetailWithMailboxReportSchema: z.ZodObject<{
3305
3327
  startedSeq: z.ZodNumber;
3306
3328
  startedAt: z.ZodString;
3307
3329
  childConversationId: z.ZodString;
3330
+ childKind: z.ZodEnum<{
3331
+ task: "task";
3332
+ thread: "thread";
3333
+ }>;
3308
3334
  subagentKind: z.ZodString;
3309
3335
  agentName: z.ZodOptional<z.ZodString>;
3310
3336
  task: z.ZodOptional<z.ZodString>;
@@ -3707,6 +3733,10 @@ declare const conversationDetailWithMailboxReportSchema: z.ZodObject<{
3707
3733
  startedSeq: z.ZodNumber;
3708
3734
  startedAt: z.ZodString;
3709
3735
  childConversationId: z.ZodString;
3736
+ childKind: z.ZodEnum<{
3737
+ task: "task";
3738
+ thread: "thread";
3739
+ }>;
3710
3740
  subagentKind: z.ZodString;
3711
3741
  agentName: z.ZodOptional<z.ZodString>;
3712
3742
  task: z.ZodOptional<z.ZodString>;
@@ -4201,6 +4231,21 @@ declare const reorderPinnedConversationsResponseSchema: z.ZodObject<{
4201
4231
  }, z.core.$strict>;
4202
4232
  type ReorderPinnedConversationsBody = z.infer<typeof reorderPinnedConversationsBodySchema>;
4203
4233
  type ReorderPinnedConversationsResponse = z.infer<typeof reorderPinnedConversationsResponseSchema>;
4234
+ /** Subscribe to or unsubscribe from one Conversation for the viewer. */
4235
+ declare const conversationSubscriptionBodySchema: z.ZodObject<{
4236
+ subscribed: z.ZodBoolean;
4237
+ }, z.core.$strict>;
4238
+ /**
4239
+ * The viewer's subscription after the change. `archivedAt` is set when the
4240
+ * viewer was the last subscriber, so the unsubscribe archived the
4241
+ * Conversation for everyone.
4242
+ */
4243
+ declare const conversationSubscriptionResponseSchema: z.ZodObject<{
4244
+ archivedAt: z.ZodNullable<z.ZodString>;
4245
+ subscribed: z.ZodBoolean;
4246
+ }, z.core.$strict>;
4247
+ type ConversationSubscriptionBody = z.infer<typeof conversationSubscriptionBodySchema>;
4248
+ type ConversationSubscriptionResponse = z.infer<typeof conversationSubscriptionResponseSchema>;
4204
4249
  /** Mark one Conversation read or unread for the signed-in viewer. */
4205
4250
  declare const markConversationUnreadBodySchema: z.ZodObject<{
4206
4251
  unread: z.ZodBoolean;
@@ -7408,4 +7453,4 @@ declare const versionsSchema: z.ZodObject<{
7408
7453
  spend: z.ZodString;
7409
7454
  }, z.core.$strict>;
7410
7455
  type Versions = z.output<typeof versionsSchema>;
7411
- export { automationEventCatalogSchema as $, dailyConversationActivitySchema as $i, ConversationCatchUp as $n, ConversationEventPage as $r, connectionSchema as $t, skillReportSchema as A, createConversationBodySchema as Ai, conversationWatchSchema as An, ConversationPendingMessagesReport as Ar, USER_CUSTOMIZATION_MAX_CHARS as At, AutomationExecutionStatusDay as B, CodeRepositoryReport as Bi, renameConversationResponseSchema as Bn, conversationUnchangedDetailWithMailboxSchema as Br, serviceAccountListSchema as Bt, pluginOperationalReportFeedSchema as C, conversationEventsQuerySchema as Ci, PersonalSpendReport as Cn, archiveConversationResponseSchema as Cr, baselineSnapshotSchema as Ct, pluginSchema as D, conversationReportEventDataSchema as Di, personalSpendReportSchema as Dn, CancelConversationPendingMessagesResponse as Dr, workspaceParamsSchema as Dt, pluginPackageContentReportSchema as E, conversationParamsSchema as Ei, personParamsSchema as En, CancelConversationPendingMessagesBody as Er, workspaceListSchema as Et, statsReportSchema as F, conversationTurnFailureReasonSchema as Fi, conversationChildAgentsReportSchema as Fn, conversationDetailWithMailboxReportSchema as Fr, personalTokenListSchema as Ft, AutomationRunWindows as G, codeOverviewReportSchema as Gi, PinConversationBody as Gn, CONVERSATION_DETAIL_VERSION_HEADER as Gr, notificationSettingsSchema as Gt, AutomationListQuery as H, codeActivityDaySchema as Hi, MarkConversationUnreadBody as Hn, steerConversationPendingMessagesResponseSchema as Hr, serviceAccountSchema as Ht, AutomationEdit as I, CodeActivityDay as Ii, CONVERSATION_TITLE_MAX_LENGTH as In, conversationPendingAuthorizationSchema as Ir, personalTokenMetadataSchema as It, AutomationUpdate as J, codeRepositoryReportSchema as Ji, ReorderPinnedConversationsResponse as Jn, ConversationAgentTreeNode as Jr, NotificationSchedule as Jt, AutomationScheduleIntent as K, codePersonReportSchema as Ki, PinConversationResponse as Kn, CONVERSATION_VERSION_HEADER as Kr, testNotificationResponseSchema as Kt, AutomationExecution as L, CodeChangeSummaryReport as Li, RenameConversationBody as Ln, conversationPendingMessageDeliverySchema as Lr, personalTokenParamsSchema as Lt, StatReport as M, forkConversationBodySchema as Mi, ConversationChildAgent as Mn, SteerConversationPendingMessagesResponse as Mr, PersonalTokenMetadata as Mt, StatsReport as N, forkConversationResponseSchema as Ni, ConversationChildAgentsReport as Nn, cancelConversationPendingMessagesBodySchema as Nr, createPersonalTokenBodySchema as Nt, pluginsSchema as O, conversationReportEventSchema as Oi, ConversationWatch as On, ConversationPendingMessage as Or, workspaceRepoSchema as Ot, statSchema as P, conversationTurnFailureCodeSchema as Pi, conversationChildAgentSchema as Pn, cancelConversationPendingMessagesResponseSchema as Pr, createdPersonalTokenSchema as Pt, automationEditSchema as Q, DailyConversationActivity as Qi, reorderPinnedConversationsResponseSchema as Qn, ConversationEventHistory as Qr, connectionParamsSchema as Qt, AutomationExecutionDay as R, CodeOverviewReport as Ri, RenameConversationResponse as Rn, conversationPendingMessageSchema as Rr, revokePersonalTokenResponseSchema as Rt, healthReportSchema as S, conversationEventPageSchema as Si, PersonParams as Sn, archiveConversationBodySchema as Sr, WorkspaceReport as St, pluginPackageContentItemReportSchema as T, conversationFeedSchema as Ti, actorProfileReportSchema as Tn, conversationAutoArchiveSchema as Tr, workspaceBodySchema as Tt, AutomationRun as U, codeChangeSummaryReportSchema as Ui, conversationUnreadSchema as Un, AcceptedConversationMessage as Ur, startServiceAccountSignInResponseSchema as Ut, AutomationList as V, CodeRepositorySummary as Vi, ConversationUnread as Vn, steerConversationPendingMessagesBodySchema as Vr, serviceAccountParamsSchema as Vt, AutomationRunList as W, codeChangeSummarySchema as Wi, markConversationUnreadBodySchema as Wn, ActorIdentity as Wr, NotificationSettings as Wt, ListedAutomationVersion as X, ConversationChildAgentTotals as Xi, pinConversationResponseSchema as Xn, ConversationCost as Xr, notificationScheduleSchema as Xt, AutomationVersionList as Y, codeRepositorySummarySchema as Yi, pinConversationBodySchema as Yn, ConversationAuxiliaryCosts as Yr, isWithinNotificationSchedule as Yt, automationEditErrorSchema as Z, conversationChildAgentTotalsSchema as Zi, reorderPinnedConversationsBodySchema as Zn, ConversationDetailReport as Zr, connectionListSchema as Zt, PluginPackageContentReport as _, INLINE_VIDEO_TYPES as _a, conversationActivityPreviewSchema as _i, ActorProfileReport as _n, GuardianStats as _r, automationVersionSchema as _t, ReviewItemPayload as a, UserInputAnswer as aa, ConversationReportEventData as ai, LocationActorSummaryReport as an, conversationReadPositionSchema as ar, automationListSchema as at, SkillReport as b, conversationDetailReportSchema as bi, ActorWindowMetrics as bn, ArchiveConversationResponse as br, BaselineSnapshotReport as bt, reviewItemListSchema as c, buttonUserInputField as ca, ConversationSourceTask as ci, LocationParams as cn, ContinueConversationInSlackResponse as cr, automationRunSchema as ct, ReviewItemChangeRecord as d, webMessageId as da, ConversationTurnFailureCode as di, locationDetailReportSchema as dn, StopConversationTurnResponse as dr, automationSchedulePreviewSchema as dt, MessageCard as ea, ConversationFeed as ei, disconnectConnectionResponseSchema as en, ConversationCatchUpBody as er, automationExecutionListSchema as et, HealthReport as f, isAgentInvocationResultEventType as fa, ConversationTurnFailureReason as fi, locationDirectoryReportSchema as fn, stopConversationTurnResponseSchema as fr, automationSummarySchema as ft, PluginPackageContentItemReport as g, MessageAttachment as ga, acceptedConversationMessageSchema as gi, ActorDirectoryWindows as gn, GuardianMetricDay as gr, automationVersionParamsSchema as gt, PluginOperationalReportFeed as h, MAX_INPUT_IMAGE_BYTES as ha, CreateConversationMessageBody as hi, ActorDirectoryReport as hn, ConversationStatsReport as hr, automationVersionListSchema as ht, ReviewItemActionBody as i, USER_INPUT_NOTE as ia, ConversationReportEvent as ii, LocationActivityDayReport as in, ConversationReadReport as ir, automationListQuerySchema as it, skillReportsSchema as j, createConversationMessageBodySchema as ji, conversationWatchesReportSchema as jn, SteerConversationPendingMessagesBody as jr, userCustomizationSchema as jt, runtimeInfoReportSchema as k, conversationSummaryReportSchema as ki, ConversationWatchesReport as kn, ConversationPendingMessageDelivery as kr, workspaceSchema as kt, reviewItemSchema as l, isEmptyUserInputAnswer as la, ConversationSummaryReport as li, LocationSummaryReport as ln, continueConversationInSlackBodySchema as lr, automationRunWindowsSchema as lt, PluginOperationalReport as m, MAX_INPUT_IMAGES as ma, CreateConversationBody as mi, ActorActivityDayReport as mn, ConversationStatsItem as mr, automationVersionActivateSchema as mt, Versions as n, resolveMessageCards as na, ConversationModelUsage as ni, ApiError as nn, conversationCatchUpSchema as nr, automationExecutionStatusDaySchema as nt, reviewItemActionSchema as o, UserInputField as oa, ConversationReportMessageEvent as oi, LocationDetailReport as on, conversationReadReportSchema as or, automationParamsSchema as ot, Plugin as p, InputImage as pa, ConversationUsage as pi, locationParamsSchema as pn, ConversationMetricDay as pr, automationUpdateSchema as pt, AutomationSummary as q, codeRepositoryParamsSchema as qi, ReorderPinnedConversationsBody as qn, ConversationActivityPreview as qr, DEFAULT_NOTIFICATION_SCHEDULE as qt, versionsSchema as r, AutomationCard as ra, ConversationParams as ri, apiErrorSchema as rn, ConversationReadPosition as rr, automationExecutionStatusSchema as rt, reviewItemCountSchema as s, UserInputRequest as sa, ConversationReportStatus as si, LocationDirectoryReport as sn, ContinueConversationInSlackBody as sr, automationRunListSchema as st, OwnedObjectAnnotation$1 as t, messageCardText as ta, ConversationFeedItem as ti, startConnectionResponseSchema as tn, conversationCatchUpBodySchema as tr, automationExecutionSchema as tt, reviewItemWaitingConversationsSchema as u, normalizeUserInputAnswer as ua, ConversationSurface as ui, locationActivityDayReportSchema as un, continueConversationInSlackResponseSchema as ur, automationScheduleIntentSchema as ut, Plugins as v, INPUT_IMAGE_TYPES as va, conversationAuxiliaryCostsSchema as vi, ActorSummaryReport as vn, conversationStatsReportSchema as vr, eventAutomationSummarySchema as vt, pluginOperationalReportSchema as w, conversationFeedQuerySchema as wi, actorDirectoryReportSchema as wn, archiveDoneConversationsResponseSchema as wr, deleteWorkspaceResponseSchema as wt, SkillReports as x, conversationEventHistorySchema as xi, PeopleActivityDayReport as xn, ConversationAutoArchive as xr, WorkspaceListReport as xt, RuntimeInfoReport as y, conversationDetailQuerySchema as yi, ActorTotalsReport as yn, ArchiveConversationBody as yr, scheduledAutomationSummarySchema as yt, AutomationExecutionList as z, CodePersonReport as zi, renameConversationBodySchema as zn, conversationPendingMessagesReportSchema as zr, disconnectServiceAccountResponseSchema as zt };
7456
+ export { automationEventCatalogSchema as $, codeRepositorySummarySchema as $i, pinConversationBodySchema as $n, ConversationAuxiliaryCosts as $r, connectionSchema as $t, skillReportSchema as A, conversationParamsSchema as Ai, conversationWatchSchema as An, CancelConversationPendingMessagesBody as Ar, USER_CUSTOMIZATION_MAX_CHARS as At, AutomationExecutionStatusDay as B, CodeActivityDay as Bi, renameConversationResponseSchema as Bn, conversationPendingAuthorizationSchema as Br, serviceAccountListSchema as Bt, pluginOperationalReportFeedSchema as C, conversationDetailQuerySchema as Ci, PersonalSpendReport as Cn, ArchiveConversationBody as Cr, baselineSnapshotSchema as Ct, pluginSchema as D, conversationEventsQuerySchema as Di, personalSpendReportSchema as Dn, archiveConversationResponseSchema as Dr, workspaceParamsSchema as Dt, pluginPackageContentReportSchema as E, conversationEventPageSchema as Ei, personParamsSchema as En, archiveConversationBodySchema as Er, workspaceListSchema as Et, statsReportSchema as F, createConversationMessageBodySchema as Fi, conversationChildAgentsReportSchema as Fn, SteerConversationPendingMessagesBody as Fr, personalTokenListSchema as Ft, AutomationRunWindows as G, CodeRepositorySummary as Gi, ConversationSubscriptionBody as Gn, steerConversationPendingMessagesBodySchema as Gr, notificationSettingsSchema as Gt, AutomationListQuery as H, CodeOverviewReport as Hi, MarkConversationUnreadBody as Hn, conversationPendingMessageSchema as Hr, serviceAccountSchema as Ht, AutomationEdit as I, forkConversationBodySchema as Ii, CONVERSATION_TITLE_MAX_LENGTH as In, SteerConversationPendingMessagesResponse as Ir, personalTokenMetadataSchema as It, AutomationUpdate as J, codeChangeSummarySchema as Ji, conversationSubscriptionResponseSchema as Jn, ActorIdentity as Jr, NotificationSchedule as Jt, AutomationScheduleIntent as K, codeActivityDaySchema as Ki, ConversationSubscriptionResponse as Kn, steerConversationPendingMessagesResponseSchema as Kr, testNotificationResponseSchema as Kt, AutomationExecution as L, forkConversationResponseSchema as Li, RenameConversationBody as Ln, cancelConversationPendingMessagesBodySchema as Lr, personalTokenParamsSchema as Lt, StatReport as M, conversationReportEventSchema as Mi, ConversationChildAgent as Mn, ConversationPendingMessage as Mr, PersonalTokenMetadata as Mt, StatsReport as N, conversationSummaryReportSchema as Ni, ConversationChildAgentsReport as Nn, ConversationPendingMessageDelivery as Nr, createPersonalTokenBodySchema as Nt, pluginsSchema as O, conversationFeedQuerySchema as Oi, ConversationWatch as On, archiveDoneConversationsResponseSchema as Or, workspaceRepoSchema as Ot, statSchema as P, createConversationBodySchema as Pi, conversationChildAgentSchema as Pn, ConversationPendingMessagesReport as Pr, createdPersonalTokenSchema as Pt, automationEditSchema as Q, codeRepositoryReportSchema as Qi, ReorderPinnedConversationsResponse as Qn, ConversationAgentTreeNode as Qr, connectionParamsSchema as Qt, AutomationExecutionDay as R, conversationTurnFailureCodeSchema as Ri, RenameConversationResponse as Rn, cancelConversationPendingMessagesResponseSchema as Rr, revokePersonalTokenResponseSchema as Rt, healthReportSchema as S, INPUT_IMAGE_TYPES as Sa, conversationAuxiliaryCostsSchema as Si, PersonParams as Sn, conversationStatsReportSchema as Sr, WorkspaceReport as St, pluginPackageContentItemReportSchema as T, conversationEventHistorySchema as Ti, actorProfileReportSchema as Tn, ConversationAutoArchive as Tr, workspaceBodySchema as Tt, AutomationRun as U, CodePersonReport as Ui, conversationUnreadSchema as Un, conversationPendingMessagesReportSchema as Ur, startServiceAccountSignInResponseSchema as Ut, AutomationList as V, CodeChangeSummaryReport as Vi, ConversationUnread as Vn, conversationPendingMessageDeliverySchema as Vr, serviceAccountParamsSchema as Vt, AutomationRunList as W, CodeRepositoryReport as Wi, markConversationUnreadBodySchema as Wn, conversationUnchangedDetailWithMailboxSchema as Wr, NotificationSettings as Wt, ListedAutomationVersion as X, codePersonReportSchema as Xi, PinConversationResponse as Xn, CONVERSATION_VERSION_HEADER as Xr, notificationScheduleSchema as Xt, AutomationVersionList as Y, codeOverviewReportSchema as Yi, PinConversationBody as Yn, CONVERSATION_DETAIL_VERSION_HEADER as Yr, isWithinNotificationSchedule as Yt, automationEditErrorSchema as Z, codeRepositoryParamsSchema as Zi, ReorderPinnedConversationsBody as Zn, ConversationActivityPreview as Zr, connectionListSchema as Zt, PluginPackageContentReport as _, InputImage as _a, ConversationUsage as _i, ActorProfileReport as _n, ConversationMetricDay as _r, automationVersionSchema as _t, ReviewItemPayload as a, messageCardText as aa, ConversationFeedItem as ai, LocationActorSummaryReport as an, conversationCatchUpBodySchema as ar, automationListSchema as at, SkillReport as b, MessageAttachment as ba, acceptedConversationMessageSchema as bi, ActorWindowMetrics as bn, GuardianMetricDay as br, BaselineSnapshotReport as bt, reviewItemListSchema as c, USER_INPUT_NOTE as ca, ConversationReportEvent as ci, LocationParams as cn, ConversationReadReport as cr, automationRunSchema as ct, ReviewItemChangeRecord as d, UserInputRequest as da, ConversationReportStatus as di, locationDetailReportSchema as dn, ContinueConversationInSlackBody as dr, automationSchedulePreviewSchema as dt, ConversationChildAgentTotals as ea, ConversationCost as ei, disconnectConnectionResponseSchema as en, pinConversationResponseSchema as er, automationExecutionListSchema as et, HealthReport as f, buttonUserInputField as fa, ConversationSourceTask as fi, locationDirectoryReportSchema as fn, ContinueConversationInSlackResponse as fr, automationSummarySchema as ft, PluginPackageContentItemReport as g, isAgentInvocationResultEventType as ga, ConversationTurnFailureReason as gi, ActorDirectoryWindows as gn, stopConversationTurnResponseSchema as gr, automationVersionParamsSchema as gt, PluginOperationalReportFeed as h, webMessageId as ha, ConversationTurnFailureCode as hi, ActorDirectoryReport as hn, StopConversationTurnResponse as hr, automationVersionListSchema as ht, ReviewItemActionBody as i, MessageCard as ia, ConversationFeed as ii, LocationActivityDayReport as in, ConversationCatchUpBody as ir, automationListQuerySchema as it, skillReportsSchema as j, conversationReportEventDataSchema as ji, conversationWatchesReportSchema as jn, CancelConversationPendingMessagesResponse as jr, userCustomizationSchema as jt, runtimeInfoReportSchema as k, conversationFeedSchema as ki, ConversationWatchesReport as kn, conversationAutoArchiveSchema as kr, workspaceSchema as kt, reviewItemSchema as l, UserInputAnswer as la, ConversationReportEventData as li, LocationSummaryReport as ln, conversationReadPositionSchema as lr, automationRunWindowsSchema as lt, PluginOperationalReport as m, normalizeUserInputAnswer as ma, ConversationSurface as mi, ActorActivityDayReport as mn, continueConversationInSlackResponseSchema as mr, automationVersionActivateSchema as mt, Versions as n, DailyConversationActivity as na, ConversationEventHistory as ni, ApiError as nn, reorderPinnedConversationsResponseSchema as nr, automationExecutionStatusDaySchema as nt, reviewItemActionSchema as o, resolveMessageCards as oa, ConversationModelUsage as oi, LocationDetailReport as on, conversationCatchUpSchema as or, automationParamsSchema as ot, Plugin as p, isEmptyUserInputAnswer as pa, ConversationSummaryReport as pi, locationParamsSchema as pn, continueConversationInSlackBodySchema as pr, automationUpdateSchema as pt, AutomationSummary as q, codeChangeSummaryReportSchema as qi, conversationSubscriptionBodySchema as qn, AcceptedConversationMessage as qr, DEFAULT_NOTIFICATION_SCHEDULE as qt, versionsSchema as r, dailyConversationActivitySchema as ra, ConversationEventPage as ri, apiErrorSchema as rn, ConversationCatchUp as rr, automationExecutionStatusSchema as rt, reviewItemCountSchema as s, AutomationCard as sa, ConversationParams as si, LocationDirectoryReport as sn, ConversationReadPosition as sr, automationRunListSchema as st, OwnedObjectAnnotation$1 as t, conversationChildAgentTotalsSchema as ta, ConversationDetailReport as ti, startConnectionResponseSchema as tn, reorderPinnedConversationsBodySchema as tr, automationExecutionSchema as tt, reviewItemWaitingConversationsSchema as u, UserInputField as ua, ConversationReportMessageEvent as ui, locationActivityDayReportSchema as un, conversationReadReportSchema as ur, automationScheduleIntentSchema as ut, Plugins as v, MAX_INPUT_IMAGES as va, CreateConversationBody as vi, ActorSummaryReport as vn, ConversationStatsItem as vr, eventAutomationSummarySchema as vt, pluginOperationalReportSchema as w, conversationDetailReportSchema as wi, actorDirectoryReportSchema as wn, ArchiveConversationResponse as wr, deleteWorkspaceResponseSchema as wt, SkillReports as x, INLINE_VIDEO_TYPES as xa, conversationActivityPreviewSchema as xi, PeopleActivityDayReport as xn, GuardianStats as xr, WorkspaceListReport as xt, RuntimeInfoReport as y, MAX_INPUT_IMAGE_BYTES as ya, CreateConversationMessageBody as yi, ActorTotalsReport as yn, ConversationStatsReport as yr, scheduledAutomationSummarySchema as yt, AutomationExecutionList as z, conversationTurnFailureReasonSchema as zi, renameConversationBodySchema as zn, conversationDetailWithMailboxReportSchema as zr, disconnectServiceAccountResponseSchema as zt };
@@ -1,7 +1,7 @@
1
- import { W as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-CMFhLLj4.js";
2
- import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-u-sFYtx_.js";
1
+ import { W as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-BO5zU6Mt.js";
2
+ import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-BriFLnaJ.js";
3
3
  import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS } from "./locks-D-0h111u.js";
4
- import { r as getStateAdapter } from "./adapter-JQZaJ-B_.js";
4
+ import { r as getStateAdapter } from "./adapter-CL-HUKgd.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { randomUUID } from "node:crypto";
7
7
  import { UnauthorizedError, auth } from "@modelcontextprotocol/sdk/client/auth.js";
@@ -1,6 +1,6 @@
1
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Bym8GVdh.js";
2
- import { t as disconnectStateAdapter } from "./adapter-JQZaJ-B_.js";
3
- import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-CGEqz9wG.js";
1
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BCIuBe4d.js";
2
+ import { t as disconnectStateAdapter } from "./adapter-CL-HUKgd.js";
3
+ import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-DiQQuuw7.js";
4
4
  import { CLI_USAGE } from "./cli/run.js";
5
5
  import { createServer } from "node:http";
6
6
  // src/cli/service-account.ts
@@ -1,20 +1,19 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { Ba as SANDBOX_DATA_ROOT, Bi as formatSlackLink, Ga as sandboxSkillFile, Gn as getPluginSlackConversationLink, Hr as cancelSubscriptions, Jn as getPluginUserPromptContributions, Ka as sandboxSkillPathResolution, Kn as getPluginSystemPromptContributions, N as normalizeConversationText, Pn as isExperimentalFeatureEnabled, Ro as JUNIOR_NATIVE_EVENT_NAMESPACE, Ua as SANDBOX_WORKSPACE_ROOT, Vi as normalizeSlackReplyMarkdown, Wa as sandboxSkillDir, Yn as getPlugins, Zi as postSlackMessage, _n as renderChildTag, ai as JUNIOR_THREAD_STATE_TTL_MS, at as listTurnSummaries, bn as tagJson, cn as normalizeToolNameFromResult, en as hasRuntimeTurnContext, fi as ToolInputError, fn as REQUEST_CONTEXT_SECTION_TAG, gn as escapeTagText, hn as escapeClosingTags, ho as buildSentryConversationUrl, ii as verifyTimerWatchCredentialSubject, it as getTurnRecord, ln as retainRuntimeTurnContext, mn as TURN_CONTEXT_TAG, mr as getReviewItem, oi as getDashboardConversationLink, on as isToolResultError, pn as SESSION_CONTEXT_SECTION_TAG, rn as isAssistantMessage, si as getDashboardObjectIconLink, sn as isToolResultMessage, un as stripRuntimeTurnContext, vn as renderTag$1, x as toStoredConversationMessage, yi as listWorkspaces, yn as renderUntrustedTag, zi as escapeSlackMrkdwnText, zo as conversationNoteEvent } from "./projection-CoeMNxJ4.js";
3
- import { f as renderCurrentInstruction, h as escapeXmlText, m as escapeXml } from "./client-B0aAs7wC.js";
4
- import { n as botConfig } from "./config-B9f9Lqo5.js";
5
- import { h as logWarn, m as logInfo, p as logException, v as serializeGenAiAttribute } from "./logging-CMFhLLj4.js";
2
+ import { $i as postSlackMessage, Ga as SANDBOX_WORKSPACE_ROOT, Ha as SANDBOX_DATA_ROOT, Hi as formatSlackLink, In as isExperimentalFeatureEnabled, Ja as sandboxSkillPathResolution, Jn as getPluginSystemPromptContributions, Ka as sandboxSkillDir, N as normalizeConversationText, Ui as normalizeSlackReplyMarkdown, Vi as escapeSlackMrkdwnText, Wr as cancelSubscriptions, Xn as getPluginUserPromptContributions, Zn as getPlugins, at as listTurnSummaries, bn as renderUntrustedTag, ci as getDashboardConversationLink, cn as normalizeToolNameFromResult, en as hasRuntimeTurnContext, fn as REQUEST_CONTEXT_SECTION_TAG, gn as escapeTagText, gr as getReviewItem, hn as escapeClosingTags, it as getTurnRecord, li as getDashboardObjectIconLink, ln as retainRuntimeTurnContext, mi as ToolInputError, mn as TURN_CONTEXT_TAG, oi as verifyTimerWatchCredentialSubject, on as isToolResultError, pn as SESSION_CONTEXT_SECTION_TAG, qa as sandboxSkillFile, qn as getPluginSlackConversationLink, rn as isAssistantMessage, si as JUNIOR_THREAD_STATE_TTL_MS, sn as isToolResultMessage, un as stripRuntimeTurnContext, vn as renderChildTag, vo as buildSentryConversationUrl, x as toStoredConversationMessage, xi as listWorkspaces, xn as tagJson, yn as renderTag$1 } from "./projection-CL_YWeGf.js";
3
+ import { A as renderCurrentInstruction, M as escapeXml, N as escapeXmlText, n as botConfig } from "./config-CkHcUMN7.js";
4
+ import { h as logWarn, m as logInfo, p as logException, v as serializeGenAiAttribute } from "./logging-BO5zU6Mt.js";
6
5
  import { o as isUserActor, t as createActor } from "./actor-6jsm_v96.js";
7
- import { C as getSqlExecutor, S as getDb, V as SYSTEM_IDENTITY_ID, et as nextDetailVersion, x as getConversationStore, y as getConversationEventStore } from "./viewer-CH-ASQzh.js";
8
- import { A as juniorConversations, M as juniorUsers } from "./executor-Dipi2Ixl.js";
9
- import { i as isVisionImageMediaType } from "./media-B-BpXo41.js";
6
+ import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb, r as getConversationEventStore, s as getSqlExecutor, z as nextDetailVersion } from "./db-DJ11eZqq.js";
7
+ import { A as juniorConversations, M as juniorUsers } from "./executor-BY9TB31g.js";
8
+ import { i as isVisionImageMediaType } from "./media-Cz1ZiV1U.js";
10
9
  import { a as listReferenceFiles, c as soulPathCandidates, l as worldPathCandidates } from "./package-discovery-DJhGdS4c.js";
11
- import { h as credentialSubjectSchema } from "./registry-u-sFYtx_.js";
12
- import { r as getStateAdapter } from "./adapter-JQZaJ-B_.js";
13
- import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage, r as EVENT_AUTHOR_ID } from "./prompt-C9OQEfan.js";
14
- import { a as QUIET_MARKER, i as NO_REPLY_MARKER, r as sanitizeAssistantText } from "./assistant-reply-CAPafcUY.js";
15
- import { E as userCustomizationTextSchema, _ as formatUserInputAnswer } from "./reporting-window-B4TwyuJo.js";
16
- import { r as appendAndEnqueueInboundMessage } from "./store-D0-8plWp.js";
17
- import { Tt as eventGuidance, wt as eventCatalogEntry, xt as CORE_EVENT_NAMESPACE } from "./task-runner-xPuQmEot.js";
10
+ import { h as credentialSubjectSchema } from "./registry-BriFLnaJ.js";
11
+ import { a as EVENT_SYSTEM_ACTOR, d as JUNIOR_NATIVE_EVENT_NAMESPACE, h as conversationNoteEvent, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage, r as EVENT_AUTHOR_ID } from "./prompt-BHOEQSmf.js";
12
+ import { r as getStateAdapter } from "./adapter-CL-HUKgd.js";
13
+ import { a as QUIET_MARKER, i as NO_REPLY_MARKER, r as sanitizeAssistantText } from "./assistant-reply-u_PRYzuz.js";
14
+ import { D as userCustomizationTextSchema, v as formatUserInputAnswer } from "./reporting-window-B3Ze-Qnt.js";
15
+ import { r as appendAndEnqueueInboundMessage } from "./store-DdIEUL1q.js";
16
+ import { Tt as eventGuidance, wt as eventCatalogEntry, xt as CORE_EVENT_NAMESPACE } from "./task-runner-D_RDr2Hu.js";
18
17
  import path from "node:path";
19
18
  import { isDeepStrictEqual } from "node:util";
20
19
  import * as z from "zod";
@@ -160,7 +159,7 @@ const TASK_EXECUTION_RULES = [
160
159
  * input itself holds only facts.
161
160
  */
162
161
  const AGENT_INPUT_RULES = [
163
- "- An `<agent-result>` reports a child agent that you started. Act on its `status`. `completed`: use the result to continue the work in this conversation, and do not repeat work that the child agent already did. `failed`: if you still need this work, use messageAgent to ask the same child agent to try again, or tell the user what is blocked. `stopped`: the child agent was stopped on purpose; do not start this work again unless the user asks. `blocked`: the child agent did not finish because something is missing. If you can give it, send it to the child agent with messageAgent. If only a person can give it, such as user approval, your own text cannot give it. Do not ask in plain text: add one action item with `addReviewItem` that names the exact action. Make its `dedupe_key` from the child conversation and the blocked action, so a repeat block updates the same item. After the user answers in this conversation, tell the child agent with messageAgent to try again. The runtime shows the user's own messages to the child's action review. Otherwise tell the user what is missing.",
162
+ "- An `<agent-result>` reports a child agent that you started. Act on its `status`. `completed`: use the result to continue the work in this conversation, and do not repeat work that the child agent already did. `failed`: if you still need this work, use messageAgent to ask the same child agent to try again, or tell the user what is blocked. `stopped`: the child agent was stopped on purpose; do not start this work again unless the user asks. `blocked`: the child agent did not finish because something is missing. If you can give it, send it to the child agent with messageAgent. If only a person can give it, such as user approval, do not ask in plain text: add one action item with `addReviewItem` that names the exact action. Make its `dedupe_key` from the child conversation and the blocked action, so a repeat block updates the same item. After the user answers in this conversation, use messageAgent to pass the approval on to the child agent, name the exact action, and tell it to try again. Otherwise tell the user what is missing.",
164
163
  "- `waiting_on` on an `<agent-result>` names child agents that you started that have not reported yet. Their results arrive later. Unless this result is useful to the user alone, wait for them before you report.",
165
164
  "- An `<agent-message source=\"child_agent\">` comes from a child agent that can still be working; its result arrives later. If it needs an answer, use messageAgent.",
166
165
  "- A child agent calls people by their Slack mention. When your reply is to a person that a child agent names, write to them as \"you\", and do not also name them in the third person.",
@@ -803,8 +802,9 @@ function buildTurnContextPrompt(params) {
803
802
  * before it calls the model, so without this note the model cannot see it.
804
803
  * The note has the error reference, never the raw error.
805
804
  */
806
- function failedTurnNote(eventId) {
807
- return `Your previous turn failed before it finished. The person may have seen an error reply or no reply.${eventId ? ` Error reference: event_id=${eventId}.` : ""} Do not assume that request was completed.`;
805
+ function failedTurnNote(failureCode, eventId) {
806
+ const reference = eventId ? ` Error reference: event_id=${eventId}.` : "";
807
+ return `Your previous turn failed before it finished. ${failureCode === "delivery_failed" ? "Your reply was not delivered, so the person did not see it. They may have seen an error reply." : "The person may have seen an error reply or no reply."}${reference} Do not assume that request was completed.`;
808
808
  }
809
809
  /** Most notes that one Turn shows. Older notes in the window are dropped. */
810
810
  const MAX_CONVERSATION_NOTES_PER_TURN = 20;
@@ -854,7 +854,7 @@ async function loadTurnConversationNotes(input) {
854
854
  if (data.turnId !== input.turnId) return [];
855
855
  foundTurn = true;
856
856
  } else if (foundTurn && data.type === "turn_failed") {
857
- newestFirst.push(failedTurnNote(data.eventId));
857
+ newestFirst.push(failedTurnNote(data.failureCode, data.eventId));
858
858
  if (newestFirst.length === MAX_CONVERSATION_NOTES_PER_TURN) break scan;
859
859
  } else if (foundTurn && data.type === "structured_event" && data.namespace === "junior" && data.name === conversationNoteEvent.eventName && data.version === conversationNoteEvent.version) {
860
860
  newestFirst.push(conversationNoteEvent.parse(data.content).text);
@@ -1,7 +1,7 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { h as logWarn } from "./logging-CMFhLLj4.js";
2
+ import { h as logWarn } from "./logging-BO5zU6Mt.js";
3
3
  import { s as skillRoots } from "./package-discovery-DJhGdS4c.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Bym8GVdh.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BCIuBe4d.js";
5
5
  import path from "node:path";
6
6
  import * as z from "zod";
7
7
  import fs from "node:fs/promises";
@@ -0,0 +1,79 @@
1
+ import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
+ import { n as botConfig } from "./config-CkHcUMN7.js";
3
+ import { o as getDb, x as conversationKindFromRow } from "./db-DJ11eZqq.js";
4
+ import { A as juniorConversations } from "./executor-BY9TB31g.js";
5
+ import { $t as toolInvocationDestination, Qt as actorFromRun, Vt as AgentDepthLimitError } from "./agent-runner-Bfnw551N.js";
6
+ import { n as createAndEnqueueAgentInvocation } from "./work-ljRoODGu.js";
7
+ import { desc, eq, sql } from "drizzle-orm";
8
+ // src/chat/conversations/lineage.ts
9
+ /**
10
+ * Read the parent chain of a Conversation in one query, root first, with the
11
+ * Conversation last. Returns an empty list when the Conversation is missing.
12
+ *
13
+ * The chain stops at a parent that is missing or that is already in the
14
+ * chain. Then the first entry still has a `parentConversationId`, so callers
15
+ * can tell a broken chain from one that ends at a root.
16
+ */
17
+ async function readConversationLineage(conversationId) {
18
+ const lineage = sql`(
19
+ with recursive lineage(conversation_id, parent_conversation_id, depth, path) as (
20
+ select selected.conversation_id, selected.parent_conversation_id, 0, array[selected.conversation_id]
21
+ from junior_conversations selected
22
+ where selected.conversation_id = ${conversationId}
23
+ union all
24
+ select parent.conversation_id, parent.parent_conversation_id, lineage.depth + 1, lineage.path || parent.conversation_id
25
+ from junior_conversations parent
26
+ join lineage on parent.conversation_id = lineage.parent_conversation_id
27
+ where parent.conversation_id <> all(lineage.path)
28
+ )
29
+ select conversation_id, depth from lineage
30
+ ) conversation_lineage`;
31
+ return (await getDb().select({
32
+ conversationId: juniorConversations.conversationId,
33
+ kind: juniorConversations.kind,
34
+ parentConversationId: juniorConversations.parentConversationId
35
+ }).from(juniorConversations).innerJoin(lineage, eq(sql`conversation_lineage.conversation_id`, juniorConversations.conversationId)).orderBy(desc(sql`conversation_lineage.depth`))).map((row) => ({
36
+ conversationId: row.conversationId,
37
+ kind: conversationKindFromRow(row),
38
+ ...row.parentConversationId ? { parentConversationId: row.parentConversationId } : void 0
39
+ }));
40
+ }
41
+ // src/chat/agent-invocations/spawn.ts
42
+ var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
43
+ /**
44
+ * Count the parents of the Conversation that starts a child agent. A chain
45
+ * that does not end at a root, such as a cycle, cannot start one.
46
+ */
47
+ async function assertCanStartChildAgent(conversationId, maxAgentDepth) {
48
+ const lineage = await readConversationLineage(conversationId);
49
+ const root = lineage[0];
50
+ if (!root || root.parentConversationId || lineage.length - 1 > maxAgentDepth) throw new AgentDepthLimitError(maxAgentDepth);
51
+ }
52
+ /** Bind a Run's Actor and credentials to new Agent invocations. */
53
+ function bindSpawnAgent(run, options) {
54
+ const actor = actorFromRun(run);
55
+ if (!actor) return;
56
+ return async (input, call) => {
57
+ call.signal?.throwIfAborted();
58
+ await assertCanStartChildAgent(run.conversationId, options.maxAgentDepth ?? botConfig.maxAgentDepth);
59
+ const queue = typeof options.queue === "function" ? options.queue() : options.queue;
60
+ return { childConversationId: (await createAndEnqueueAgentInvocation({
61
+ actor,
62
+ ...input.name ? { agentName: input.name } : void 0,
63
+ ...input.agentType ? { agentType: input.agentType } : void 0,
64
+ ...run.credentialContext ? { credentialContext: run.credentialContext } : void 0,
65
+ destination: toolInvocationDestination(run),
66
+ idempotencyKey: `${run.turnId}:${call.toolCallId}`,
67
+ input: input.task,
68
+ ...input.kind ? { kind: input.kind } : void 0,
69
+ parentConversationId: run.conversationId,
70
+ parentToolCallId: call.toolCallId,
71
+ ...input.reasoningLevel ? { reasoningLevel: input.reasoningLevel } : void 0,
72
+ ...input.title ? { title: input.title } : void 0
73
+ }, {
74
+ ...options,
75
+ queue
76
+ })).childConversationId };
77
+ };
78
+ }
79
+ export { spawn_exports as n, readConversationLineage as r, bindSpawnAgent as t };