@sentry/junior 0.249.0 → 0.250.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 (56) hide show
  1. package/dist/{admin-DZeUvFHI.js → admin-DMKyXi83.js} +1 -1
  2. package/dist/{agent-hooks-B4bQ4kBT.js → agent-hooks-CtZuJPTU.js} +23 -8
  3. package/dist/{agent-runner-B8u9yBSO.js → agent-runner-CNiTpIpb.js} +101 -20
  4. package/dist/api/schema.d.ts +33 -0
  5. package/dist/api/schema.js +2 -2
  6. package/dist/api.js +54 -22
  7. package/dist/app.js +35 -43
  8. package/dist/{assistant-reply-Bhi3sqgj.js → assistant-reply-K5r1pcgJ.js} +1 -1
  9. package/dist/{briefs-pUYuPjCW.js → briefs-8xyS3oeV.js} +2 -2
  10. package/dist/{catalog-runtime-oITS5Rjx.js → catalog-runtime-BQ3g3OX_.js} +1 -1
  11. package/dist/cli/chat.js +15 -15
  12. package/dist/cli/check.js +3 -3
  13. package/dist/cli/main.js +2 -2
  14. package/dist/cli/plugins.js +4 -4
  15. package/dist/cli/snapshot-create.js +3 -3
  16. package/dist/cli/upgrade.js +3 -3
  17. package/dist/{client-CvAOTqQF.js → client-Q27hki0Y.js} +2 -2
  18. package/dist/{config-DytdkbYS.js → config-Cb--Qs-g.js} +2 -2
  19. package/dist/{web-authorization-DLz3WwL6.js → connections-DZ70JeSN.js} +85 -8
  20. package/dist/{conversation-privacy-B1yNx-7X.js → conversation-privacy-BIDN1sW3.js} +1 -1
  21. package/dist/{credential-sync-BejMAPTR.js → credential-sync-CyAN-Gos.js} +18 -23
  22. package/dist/{executor-BYtCR1fJ.js → executor-D8y7v95s.js} +2 -2
  23. package/dist/{images-CbP-PoMG.js → images-BkGhqKIK.js} +2 -2
  24. package/dist/instrumentation.js +2 -2
  25. package/dist/{job-queue-B-8tT6DC.js → job-queue-uGq6Grnt.js} +1 -1
  26. package/dist/{logging-DkfhlwYe.js → logging-C22RdmU8.js} +1 -1
  27. package/dist/{message-D1tGYTCC.js → message-D0RPetp-.js} +3 -3
  28. package/dist/nitro.js +3 -3
  29. package/dist/{oauth-callback-server-Ck1Vs9l_.js → oauth-callback-server-DF_Odkvh.js} +2 -2
  30. package/dist/{pending-auth-CBZduFHf.js → pending-auth-Bg3A1-pE.js} +2 -2
  31. package/dist/{profile-Ch9aZ6bb.js → profile-DK9umvav.js} +4 -4
  32. package/dist/{registry-BPeYibTN.js → registry-BvsLuoLK.js} +1 -1
  33. package/dist/{resolve-QOZbqF7t.js → resolve-C9btOXju.js} +2 -2
  34. package/dist/{result-Dp8BPIuR.js → result-CcdQ2iau.js} +6 -6
  35. package/dist/{runner-dfLJ6ZCW.js → runner-Bem4DUHN.js} +9 -9
  36. package/dist/{sandbox-egress-signals-Y5eS_FDi.js → sandbox-egress-signals-Bl-4cF7E.js} +1 -1
  37. package/dist/{schema-Bz-kE1z4.js → schema-DELmAdjR.js} +17 -1
  38. package/dist/{session-stop-Akrz6ImY.js → session-stop-DteRDRCi.js} +16 -13
  39. package/dist/{skills-D4Tpsuvg.js → skills-CVwSL6Gc.js} +2 -2
  40. package/dist/{spawn-DYgYT32M.js → spawn-CA0YYtzr.js} +2 -2
  41. package/dist/{store-DqnCyIPs.js → store-Dw3eBN9S.js} +6 -6
  42. package/dist/{task-queue-BNllROcl.js → task-queue-C7cyjcVj.js} +3 -3
  43. package/dist/{task-runner-exdzicSg.js → task-runner-BbSyWmOq.js} +10 -10
  44. package/dist/{tasks-Cf4ib3bG.js → tasks-B8nH3ND_.js} +8 -8
  45. package/dist/{thread-state-CPvS5vpy.js → thread-state-BTOLzCM-.js} +6 -6
  46. package/dist/{turn-failure-response-CdixRkEW.js → turn-failure-response-BwNfO8Xt.js} +7 -7
  47. package/dist/{turn-lifecycle-DahlJysg.js → turn-lifecycle-DSN0xGW7.js} +1 -1
  48. package/dist/{turn-session-routing-B3pBx_Ep.js → turn-session-routing-BRKYIn6n.js} +1 -1
  49. package/dist/{validation-LNypV_fu.js → validation-CBkyzKCP.js} +1 -1
  50. package/dist/{version-DEl6GNnH.js → version-CkwwLVLb.js} +1 -1
  51. package/dist/version.js +1 -1
  52. package/dist/{viewer-BQqX8fDS.js → viewer-DdzigZQh.js} +3 -3
  53. package/dist/{web-input-DisCMhtH.js → web-input-BjdnnpuN.js} +26 -26
  54. package/dist/{work-6KB-2tbx.js → work-qQEjtmlv.js} +9 -9
  55. package/dist/{worker-6RfyAjWY.js → worker-C-CSZMy_.js} +5 -5
  56. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import { a as setUserAdminFromSql, d as getDb, n as listAdminUsersFromSql } from "./viewer-BQqX8fDS.js";
1
+ import { a as setUserAdminFromSql, d as getDb, n as listAdminUsersFromSql } from "./viewer-DdzigZQh.js";
2
2
  import { CLI_USAGE } from "./cli/run.js";
3
3
  //#region src/cli/admin.ts
4
4
  /**
@@ -1,18 +1,18 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { a as embedTexts, r as completeObject } from "./client-CvAOTqQF.js";
3
- import { I as isRecord$1, a as extractGenAiUsageSummary, d as logException, f as logInfo, p as logWarn, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-DkfhlwYe.js";
2
+ import { a as embedTexts, r as completeObject } from "./client-Q27hki0Y.js";
3
+ import { I as isRecord$1, a as extractGenAiUsageSummary, d as logException, f as logInfo, p as logWarn, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-C22RdmU8.js";
4
4
  import { a as getClient$1 } from "./sentry-CgWZM_kV.js";
5
- import { t as canExposeConversationPayload } from "./conversation-privacy-B1yNx-7X.js";
6
- import { i as getChatConfig, n as botConfig, o as getSlackBotToken } from "./config-DytdkbYS.js";
5
+ import { t as canExposeConversationPayload } from "./conversation-privacy-BIDN1sW3.js";
6
+ import { i as getChatConfig, n as botConfig, o as getSlackBotToken } from "./config-Cb--Qs-g.js";
7
7
  import { r as defaultModelId } from "./model-profile-BwU8mqwD.js";
8
8
  import { d as parseSlackTeamId, g as parseSlackMessageTs, i as isActorUserId, o as parseActorUserId, u as parseSlackChannelReferenceId } from "./actor-BTtLaeWy.js";
9
- import { O as readUserTimezone, T as hasAgentTurnUsage, c as getConversationEventStore, d as getDb, f as getSqlExecutor, h as createSqlStore, i as resolveViewerUser, k as saveUserTimezone, r as readActorIdentity } from "./viewer-BQqX8fDS.js";
9
+ import { O as readUserTimezone, T as hasAgentTurnUsage, c as getConversationEventStore, d as getDb, f as getSqlExecutor, h as createSqlStore, i as resolveViewerUser, k as saveUserTimezone, r as readActorIdentity } from "./viewer-DdzigZQh.js";
10
10
  import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
11
- import { S as juniorAttachments, _ as juniorConversationEvents, b as juniorCodeChanges, f as juniorConversationParticipants, i as juniorWorkspaces, m as juniorConversationBriefs, n as juniorSnapshots, r as juniorWorkspaceRepos, x as juniorCodeRepositories, y as juniorConversationAnnotations } from "./executor-BYtCR1fJ.js";
11
+ import { S as juniorAttachments, _ as juniorConversationEvents, b as juniorCodeChanges, f as juniorConversationParticipants, i as juniorWorkspaces, m as juniorConversationBriefs, n as juniorSnapshots, r as juniorWorkspaceRepos, x as juniorCodeRepositories, y as juniorConversationAnnotations } from "./executor-D8y7v95s.js";
12
12
  import { o as decodeStoredConversationEvent } from "./history-9pO1Zd4Y.js";
13
- import { p as credentialSubjectSchema } from "./registry-BPeYibTN.js";
13
+ import { p as credentialSubjectSchema } from "./registry-BvsLuoLK.js";
14
14
  import { C as conversationReportEventSchema, F as readMessageAttachments, H as conversationBriefSchema, U as parseBriefInput, q as readMessageCardRefs } from "./conversation-NutPJ8S8.js";
15
- import { C as getDefaultRedisStateAdapterFor, N as SANDBOX_WORKSPACE_ROOT, k as sleep$1, l as isSandboxMissingError, n as hash, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-Ch9aZ6bb.js";
15
+ import { C as getDefaultRedisStateAdapterFor, N as SANDBOX_WORKSPACE_ROOT, k as sleep$1, l as isSandboxMissingError, n as hash, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-DK9umvav.js";
16
16
  import { i as isValidTimeZone } from "./cadence-D00SCzT1.js";
17
17
  import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-kYP1FAX_.js";
18
18
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -2452,6 +2452,8 @@ const subscriptionSchema = z.object({
2452
2452
  events: z.array(eventTypeSchema).min(1),
2453
2453
  expiresAtMs: z.number().finite(),
2454
2454
  firesAtMs: z.number().finite().optional(),
2455
+ /** Guidance for this Watch only, by event type. */
2456
+ guidance: z.record(eventTypeSchema, z.string().min(1)).optional(),
2455
2457
  id: z.string().min(1),
2456
2458
  intent: z.string().min(1),
2457
2459
  label: z.string().min(1),
@@ -2572,6 +2574,16 @@ function activeAt(subscription, nowMs) {
2572
2574
  function matchesEvent(subscription, input) {
2573
2575
  return subscription.namespace === input.namespace && subscription.identifier === input.identifier && subscription.events.includes(input.eventType) && activeAt(subscription, input.nowMs) && eventMatches(subscription.match, input.data);
2574
2576
  }
2577
+ /** Keep non-empty guidance for events that the Watch receives. */
2578
+ function watchGuidance(guidance, events) {
2579
+ if (!guidance) return void 0;
2580
+ const kept = {};
2581
+ for (const eventType of events) {
2582
+ const text = guidance[eventType]?.trim();
2583
+ if (text) kept[eventType] = text;
2584
+ }
2585
+ return Object.keys(kept).length > 0 ? kept : void 0;
2586
+ }
2575
2587
  /** Create or replace the active subscription for one conversation/resource/event set. */
2576
2588
  async function createWatch(input, options = {}) {
2577
2589
  const state = options.state ?? getStateAdapter();
@@ -2588,11 +2600,13 @@ async function createWatch(input, options = {}) {
2588
2600
  namespace: input.namespace,
2589
2601
  identifier: input.identifier
2590
2602
  });
2603
+ const guidance = watchGuidance(input.guidance, events);
2591
2604
  const record = {
2592
2605
  conversationId: input.conversationId,
2593
2606
  createdAtMs: nowMs,
2594
2607
  events,
2595
2608
  expiresAtMs: input.expiresAtMs,
2609
+ ...guidance ? { guidance } : void 0,
2596
2610
  id,
2597
2611
  intent: input.intent,
2598
2612
  label: input.label,
@@ -3726,6 +3740,7 @@ function getPluginTools(context, sandbox = createSandboxCapability(context.works
3726
3740
  conversationId: context.conversationId,
3727
3741
  events: input.events,
3728
3742
  expiresAtMs: Date.now() + RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS,
3743
+ guidance: input.guidance,
3729
3744
  intent: input.intent,
3730
3745
  label: input.resource.label,
3731
3746
  namespace: pluginName,
@@ -1,30 +1,30 @@
1
- import { b as getGatewayApiKey, c as hasCompactedConversationContext, d as unwrapCurrentInstruction, f as escapeXml, g as getProviderErrorAttributes, h as findProviderError, i as completeText, l as isCompactionSummaryText, m as createProviderError, n as GEN_AI_SERVER_ADDRESS, o as resolveGatewayModel, p as ProviderError, r as completeObject, s as COMPACTION_SUMMARY_PREFIX, t as GEN_AI_PROVIDER_NAME, u as renderCurrentInstruction, v as isProviderRetryError, x as resolveGatewayCredential, y as MISSING_GATEWAY_CREDENTIALS_ERROR } from "./client-CvAOTqQF.js";
2
- import { C as withLogContext, F as normalizeIdentityEmail, I as isRecord$4, R as toOptionalString, a as extractGenAiUsageSummary, b as setTags, c as getLogContextAttributesForSpan, d as logException, f as logInfo, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, l as getTracePropagationHeaders, m as normalizeGenAiFinishReason, p as logWarn, u as logError, v as setSpanAttributes, w as withSpan, x as summarizeMessageText, y as setSpanStatus } from "./logging-DkfhlwYe.js";
1
+ import { b as getGatewayApiKey, c as hasCompactedConversationContext, d as unwrapCurrentInstruction, f as escapeXml, g as getProviderErrorAttributes, h as findProviderError, i as completeText, l as isCompactionSummaryText, m as createProviderError, n as GEN_AI_SERVER_ADDRESS, o as resolveGatewayModel, p as ProviderError, r as completeObject, s as COMPACTION_SUMMARY_PREFIX, t as GEN_AI_PROVIDER_NAME, u as renderCurrentInstruction, v as isProviderRetryError, x as resolveGatewayCredential, y as MISSING_GATEWAY_CREDENTIALS_ERROR } from "./client-Q27hki0Y.js";
2
+ import { C as withLogContext, F as normalizeIdentityEmail, I as isRecord$4, R as toOptionalString, a as extractGenAiUsageSummary, b as setTags, c as getLogContextAttributesForSpan, d as logException, f as logInfo, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, l as getTracePropagationHeaders, m as normalizeGenAiFinishReason, p as logWarn, u as logError, v as setSpanAttributes, w as withSpan, x as summarizeMessageText, y as setSpanStatus } from "./logging-C22RdmU8.js";
3
3
  import { m as startInactiveSpan, v as withActiveSpan } from "./sentry-CgWZM_kV.js";
4
- import { a as toCanonicalInputMessage, c as toGenAiPayloadMetadata, i as runWithConversationPrivacy, l as toGenAiPayloadTraceAttributes, o as toCanonicalOutputMessage, r as resolveConversationPrivacy, s as toGenAiMessagesTraceAttributes, t as canExposeConversationPayload } from "./conversation-privacy-B1yNx-7X.js";
5
- import { n as botConfig, v as normalizeSlackEmojiName } from "./config-DytdkbYS.js";
4
+ import { a as toCanonicalInputMessage, c as toGenAiPayloadMetadata, i as runWithConversationPrivacy, l as toGenAiPayloadTraceAttributes, o as toCanonicalOutputMessage, r as resolveConversationPrivacy, s as toGenAiMessagesTraceAttributes, t as canExposeConversationPayload } from "./conversation-privacy-BIDN1sW3.js";
5
+ import { n as botConfig, v as normalizeSlackEmojiName } from "./config-Cb--Qs-g.js";
6
6
  import { a as formatModelProfiles, c as profileConfig, i as formatModelProfile, l as TURN_REASONING_LEVELS, n as ModelProfileNotConfiguredError, o as modelIdForProfile, s as modelProfileSchema } from "./model-profile-BwU8mqwD.js";
7
7
  import { a as isUserActor, d as parseSlackTeamId, f as parseSlackUserId, g as parseSlackMessageTs, l as parseSlackChannelId, u as parseSlackChannelReferenceId } from "./actor-BTtLaeWy.js";
8
- import { N as parseDestination, S as agentTurnCostUsd, T as hasAgentTurnUsage, c as getConversationEventStore, d as getDb, f as getSqlExecutor, l as getConversationMessageSearchStore, r as readActorIdentity, u as getConversationStore, x as addAgentTurnUsage } from "./viewer-BQqX8fDS.js";
8
+ import { N as parseDestination, S as agentTurnCostUsd, T as hasAgentTurnUsage, c as getConversationEventStore, d as getDb, f as getSqlExecutor, l as getConversationMessageSearchStore, r as readActorIdentity, u as getConversationStore, x as addAgentTurnUsage } from "./viewer-DdzigZQh.js";
9
9
  import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, i as juniorAgentBindings, n as AGENT_INVOCATION_PARENT_MAILBOX_STATUSES, s as juniorConversations, t as AGENT_INVOCATION_MAILBOX_STATUSES } from "./agent-invocations-D_YoNnAn.js";
10
- import { C as juniorArtifacts, S as juniorAttachments, a as juniorSchedulerRuns, l as juniorStats, m as juniorConversationBriefs, y as juniorConversationAnnotations } from "./executor-BYtCR1fJ.js";
10
+ import { C as juniorArtifacts, S as juniorAttachments, a as juniorSchedulerRuns, l as juniorStats, m as juniorConversationBriefs, y as juniorConversationAnnotations } from "./executor-D8y7v95s.js";
11
11
  import { d as contextProvenance, f as instructionActors, m as sameActorIdentity, p as instructionProvenanceFor, t as KNOWN_CONVERSATION_EVENT_TYPES, u as agentInstructionProvenance } from "./history-9pO1Zd4Y.js";
12
12
  import { a as listReferenceFiles, c as soulPathCandidates, l as worldPathCandidates } from "./package-discovery-BVvSnQBB.js";
13
- import { a as resolveAuthTokenPlaceholder, c as fetchWithBoundedOAuthErrorBodies, d as credentialContextForActor, f as credentialContextSchema, h as CredentialUnavailableError, i as resolvePluginHeaderEnvRefs, l as getOAuthProviderErrorAttributes, m as credentialUserSubjectId, o as resolvePluginCommandEnv, s as OAuthProviderError } from "./registry-BPeYibTN.js";
14
- import { n as pluginCatalogRuntime } from "./catalog-runtime-oITS5Rjx.js";
15
- import { a as parseSkillInvocation, i as parseSkillFile, n as findSkillByName, r as loadSkillsByName, t as discoverSkills } from "./skills-D4Tpsuvg.js";
16
- import { B as postSlackEphemeralMessage, Bt as recordMcpProviderConnected, Ct as TURN_CONTEXT_TAG, Dt as loadConnectedMcpProviders, F as slackMention, Ft as recordAttachmentsDelivered, Ht as recordToolExecutionStarted, J as saveTurnCheckpoint, K as continuableMessages, L as addReactionToMessage, M as formatSlackLink, Mt as loadTurnRoute, Nt as openConversationProjection, Ot as loadConversationProjection, Pt as recordAgentsInstructionsUpdated, Qt as resolveTaskTitle, R as getSlackMessagePermalink, Rt as recordAuthorizationRequested, St as trimTrailingAssistantMessages, U as uploadFilesToConversation, Ut as recordTurnRoute, V as postSlackMessage, Zt as fallbackShortTitle, _t as isToolResultError, a as readScheduledAutomation, at as TurnToolCallLimitExceededError, b as saveEventAutomation, bt as retainRuntimeTurnContext, ct as isTurnExecutionLimitExceededError, dn as getAgentContextCompactionTriggerTokens, dt as getTerminalAssistantMessages, f as createEventAutomation, fn as getAgentContextInputLimitTokens, ft as getUserMessageInstructionText, g as getEventAutomation, gt as isContinuablePiBoundary, ht as isAssistantMessage, it as TurnSliceLimitExceededError, j as escapeSlackMrkdwnText, k as automationRevision, kt as loadLastModelProfile, lt as extractAssistantText, mn as piMessageFromHistoryItem, nt as TURN_LIMIT_DISABLED_REASON, o as saveScheduledAutomation, p as deleteEventAutomation, pn as historyItemFromPiMessage, pt as hasRuntimeTurnContext, q as loadTurnCheckpoint, r as listScheduledAutomationsForTeam, rt as TurnBudgetExceededError, st as createTurnLimitGate, t as createScheduledAutomation, un as estimateTextTokens, ut as getPiMessageRole, v as listEventAutomationsForTeam, vt as isToolResultMessage, wt as ToolInputError, x as setEventAutomationStatus, xt as stripRuntimeTurnContext, yt as normalizeToolNameFromResult, z as openSlackDirectMessage, zt as recordGuardianActionReviewed } from "./tasks-Cf4ib3bG.js";
17
- import { A as getWorkspaceSnapshotBuilder, At as saveObjectAnnotations, B as STOP_WATCHING_TOOL_NAME, C as WorkspaceValidationError, D as setWorkspaceSnapshotBuild, E as setWorkspaceSnapshot, Et as matchSlackAttachments, F as isSlackMessageTurn, Ft as resolveUserTimezone, G as createWatch, H as cancelWatch, Ht as isConversationScopedChannel, I as slackMessageTurnDisabledReason, J as listWatches, K as deliverWatch, Kt as withSlackRetries, L as RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS, Lt as SlackActionError, M as workspaceRepoCheckoutPath, N as resolveChannelCapabilities, O as SANDBOX_RUNTIME, P as getSlackToolContext, Pt as defaultTimezone, R as RESOURCE_SUBSCRIPTION_MAX_TTL_MS, Rt as downloadPrivateSlackFile, S as updateWorkspace, T as loadSnapshotsForProfile, Ut as isDmChannel$1, V as cancelSubscriptions, Vt as getSlackClient, W as createTimerWatch, Wt as normalizeSlackConversationId, _ as deleteWorkspace, b as listWorkspaces, c as getPluginTools, dt as createPluginLogger, g as createWorkspace, it as getDashboardConversationLink, j as tryWorkspaceRepoCheckoutPath, jt as createPluginAnnotations, k as deleteWorkspaceSnapshotBuilders, l as getPluginUserPromptContributions, ot as getDashboardTaskLink, q as findMatchingWatches, r as createPluginHookRunner, s as getPluginSystemPromptContributions, u as getPlugins, v as getWorkspace, w as invalidateReadySnapshot, y as getWorkspaceByName, z as RESOURCE_WATCH_TOOL_SOURCE, zt as getFilePermalink } from "./agent-hooks-B4bQ4kBT.js";
13
+ import { a as resolveAuthTokenPlaceholder, c as fetchWithBoundedOAuthErrorBodies, d as credentialContextForActor, f as credentialContextSchema, h as CredentialUnavailableError, i as resolvePluginHeaderEnvRefs, l as getOAuthProviderErrorAttributes, m as credentialUserSubjectId, o as resolvePluginCommandEnv, s as OAuthProviderError } from "./registry-BvsLuoLK.js";
14
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BQ3g3OX_.js";
15
+ import { a as parseSkillInvocation, i as parseSkillFile, n as findSkillByName, r as loadSkillsByName, t as discoverSkills } from "./skills-CVwSL6Gc.js";
16
+ import { B as postSlackEphemeralMessage, Bt as recordMcpProviderConnected, Ct as TURN_CONTEXT_TAG, Dt as loadConnectedMcpProviders, F as slackMention, Ft as recordAttachmentsDelivered, Ht as recordToolExecutionStarted, J as saveTurnCheckpoint, K as continuableMessages, L as addReactionToMessage, M as formatSlackLink, Mt as loadTurnRoute, Nt as openConversationProjection, Ot as loadConversationProjection, Pt as recordAgentsInstructionsUpdated, Qt as resolveTaskTitle, R as getSlackMessagePermalink, Rt as recordAuthorizationRequested, St as trimTrailingAssistantMessages, U as uploadFilesToConversation, Ut as recordTurnRoute, V as postSlackMessage, Zt as fallbackShortTitle, _t as isToolResultError, a as readScheduledAutomation, at as TurnToolCallLimitExceededError, b as saveEventAutomation, bt as retainRuntimeTurnContext, ct as isTurnExecutionLimitExceededError, dn as getAgentContextCompactionTriggerTokens, dt as getTerminalAssistantMessages, f as createEventAutomation, fn as getAgentContextInputLimitTokens, ft as getUserMessageInstructionText, g as getEventAutomation, gt as isContinuablePiBoundary, ht as isAssistantMessage, it as TurnSliceLimitExceededError, j as escapeSlackMrkdwnText, k as automationRevision, kt as loadLastModelProfile, lt as extractAssistantText, mn as piMessageFromHistoryItem, nt as TURN_LIMIT_DISABLED_REASON, o as saveScheduledAutomation, p as deleteEventAutomation, pn as historyItemFromPiMessage, pt as hasRuntimeTurnContext, q as loadTurnCheckpoint, r as listScheduledAutomationsForTeam, rt as TurnBudgetExceededError, st as createTurnLimitGate, t as createScheduledAutomation, un as estimateTextTokens, ut as getPiMessageRole, v as listEventAutomationsForTeam, vt as isToolResultMessage, wt as ToolInputError, x as setEventAutomationStatus, xt as stripRuntimeTurnContext, yt as normalizeToolNameFromResult, z as openSlackDirectMessage, zt as recordGuardianActionReviewed } from "./tasks-B8nH3ND_.js";
17
+ import { A as getWorkspaceSnapshotBuilder, At as saveObjectAnnotations, B as STOP_WATCHING_TOOL_NAME, C as WorkspaceValidationError, D as setWorkspaceSnapshotBuild, E as setWorkspaceSnapshot, Et as matchSlackAttachments, F as isSlackMessageTurn, Ft as resolveUserTimezone, G as createWatch, H as cancelWatch, Ht as isConversationScopedChannel, I as slackMessageTurnDisabledReason, J as listWatches, K as deliverWatch, Kt as withSlackRetries, L as RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS, Lt as SlackActionError, M as workspaceRepoCheckoutPath, N as resolveChannelCapabilities, O as SANDBOX_RUNTIME, P as getSlackToolContext, Pt as defaultTimezone, R as RESOURCE_SUBSCRIPTION_MAX_TTL_MS, Rt as downloadPrivateSlackFile, S as updateWorkspace, T as loadSnapshotsForProfile, Ut as isDmChannel$1, V as cancelSubscriptions, Vt as getSlackClient, W as createTimerWatch, Wt as normalizeSlackConversationId, _ as deleteWorkspace, b as listWorkspaces, c as getPluginTools, dt as createPluginLogger, g as createWorkspace, it as getDashboardConversationLink, j as tryWorkspaceRepoCheckoutPath, jt as createPluginAnnotations, k as deleteWorkspaceSnapshotBuilders, l as getPluginUserPromptContributions, ot as getDashboardTaskLink, q as findMatchingWatches, r as createPluginHookRunner, s as getPluginSystemPromptContributions, u as getPlugins, v as getWorkspace, w as invalidateReadySnapshot, y as getWorkspaceByName, z as RESOURCE_WATCH_TOOL_SOURCE, zt as getFilePermalink } from "./agent-hooks-CtZuJPTU.js";
18
18
  import { B as briefLinkSchema, H as conversationBriefSchema, J as removedCardSchema, L as detectImageMediaType, R as isVisionImageMediaType, V as briefOutcomeStatusSchema } from "./conversation-NutPJ8S8.js";
19
- import { A as SANDBOX_DATA_ROOT, D as fenceLock, E as acquireActiveLock, F as sandboxSkillFile, I as sandboxSkillPathResolution, M as SANDBOX_SKILLS_ROOT, N as SANDBOX_WORKSPACE_ROOT, O as withLock, P as sandboxSkillDir, _ as workspaceSnapshotNotReadyUserMessage, a as isAbortError, b as buildNonInteractiveShellScript, c as isSandboxCommandStreamInterruptedError, d as isSnapshottingError, f as throwSandboxOperationError, g as isWorkspaceSnapshotNotReadyError, h as getWorkspaceSnapshotNotReadyError, i as ensureDockerDaemon, j as SANDBOX_REPOS_ROOT, k as sleep, l as isSandboxMissingError, m as WorkspaceSnapshotNotReadyError, n as hash, o as isAlreadyExistsError, p as wrapSandboxSetupError, r as isStale, s as isSandboxApiTransientError, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand, y as buildCommandScript } from "./profile-Ch9aZ6bb.js";
20
- import { n as canReusePendingAuthLink, t as abandonReplacedPendingAuth } from "./pending-auth-CBZduFHf.js";
19
+ import { A as SANDBOX_DATA_ROOT, D as fenceLock, E as acquireActiveLock, F as sandboxSkillFile, I as sandboxSkillPathResolution, M as SANDBOX_SKILLS_ROOT, N as SANDBOX_WORKSPACE_ROOT, O as withLock, P as sandboxSkillDir, _ as workspaceSnapshotNotReadyUserMessage, a as isAbortError, b as buildNonInteractiveShellScript, c as isSandboxCommandStreamInterruptedError, d as isSnapshottingError, f as throwSandboxOperationError, g as isWorkspaceSnapshotNotReadyError, h as getWorkspaceSnapshotNotReadyError, i as ensureDockerDaemon, j as SANDBOX_REPOS_ROOT, k as sleep, l as isSandboxMissingError, m as WorkspaceSnapshotNotReadyError, n as hash, o as isAlreadyExistsError, p as wrapSandboxSetupError, r as isStale, s as isSandboxApiTransientError, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand, y as buildCommandScript } from "./profile-DK9umvav.js";
20
+ import { n as canReusePendingAuthLink, t as abandonReplacedPendingAuth } from "./pending-auth-Bg3A1-pE.js";
21
21
  import { c as isTurnInputCommitLostError, i as TurnInputCommitLostError, r as CooperativeTurnYieldError, t as authorizationId } from "./oauth-authorization-BA4Dt6a7.js";
22
- import { a as isNoReplyMarker, i as NO_REPLY_MARKER, n as getAssistantReplyText, r as sanitizeAssistantText, t as decideReply } from "./assistant-reply-Bhi3sqgj.js";
23
- import { C as registeredEventMatchSchema, D as requireSupportedEventMatch, E as requireEventIdentifier, I as readAutomationResult, L as remindMissingAutomationResult, M as FINISH_AUTOMATION_RUN_TOOL_NAME, N as automationResultSchema, S as pluginSupportsEvent, T as registeredResourceTypeSchema, _ as workspaceSnapshotWatch, b as eventNamespaceSchema, d as requireSlackChannelMessageScope, g as workspaceSnapshotFinishedEvent, h as WORKSPACE_SNAPSHOT_READY_EVENT, l as getEventCatalog, m as WORKSPACE_SNAPSHOT_FAILED_EVENT, n as markConversationsStopped, o as enqueueEventNotification, t as getConversationStoppedAtMs, v as automationEventCatalog, w as registeredEventTypeSchema, x as hasEventCatalogEntries } from "./session-stop-Akrz6ImY.js";
22
+ import { a as isNoReplyMarker, i as NO_REPLY_MARKER, n as getAssistantReplyText, r as sanitizeAssistantText, t as decideReply } from "./assistant-reply-K5r1pcgJ.js";
23
+ import { C as registeredEventMatchSchema, D as requireSupportedEventMatch, E as requireEventIdentifier, I as readAutomationResult, L as remindMissingAutomationResult, M as FINISH_AUTOMATION_RUN_TOOL_NAME, N as automationResultSchema, S as pluginSupportsEvent, T as registeredResourceTypeSchema, _ as workspaceSnapshotWatch, b as eventNamespaceSchema, d as requireSlackChannelMessageScope, g as workspaceSnapshotFinishedEvent, h as WORKSPACE_SNAPSHOT_READY_EVENT, l as getEventCatalog, m as WORKSPACE_SNAPSHOT_FAILED_EVENT, n as markConversationsStopped, o as enqueueEventNotification, t as getConversationStoppedAtMs, v as automationEventCatalog, w as registeredEventTypeSchema, x as hasEventCatalogEntries } from "./session-stop-DteRDRCi.js";
24
24
  import { i as isValidTimeZone, r as getZonedDateTimeParts } from "./cadence-D00SCzT1.js";
25
- import { a as createSandboxSession, c as postinstall, d as getSandboxResources, i as bindSandboxFileSystem, l as setSnapshotSpanAttributes, n as isMissingError, o as stopSession, r as resolve$1, s as dependencies } from "./resolve-QOZbqF7t.js";
26
- import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline, n as sendNextWorkspaceSnapshotJob, r as sendWorkspaceSnapshotJob } from "./job-queue-B-8tT6DC.js";
27
- import { E as stopConversationWork } from "./store-DqnCyIPs.js";
25
+ import { a as createSandboxSession, c as postinstall, d as getSandboxResources, i as bindSandboxFileSystem, l as setSnapshotSpanAttributes, n as isMissingError, o as stopSession, r as resolve$1, s as dependencies } from "./resolve-C9btOXju.js";
26
+ import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline, n as sendNextWorkspaceSnapshotJob, r as sendWorkspaceSnapshotJob } from "./job-queue-uGq6Grnt.js";
27
+ import { E as stopConversationWork } from "./store-Dw3eBN9S.js";
28
28
  import { F as taskOutcomeInputSchema, M as compileScheduleIntent, N as scheduleIntentSchema, O as automationInstructionToolSchema, T as SCHEDULED_AUTOMATION_SYSTEM_ACTOR, j as ScheduleIntentError, k as automationTitleSchema } from "./automation-gznOMaQ2.js";
29
29
  import { r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
30
30
  import { n as privateTraceResultAttributes } from "./private-trace-result-BLvBjy_e.js";
@@ -3758,6 +3758,52 @@ async function prepareWorkspaceSnapshot(params) {
3758
3758
  if (result.exitCode !== 0) throw new Error(`Workspace setup failed: ${workspaceSetupFailureDetail(result)}`);
3759
3759
  }
3760
3760
  //#endregion
3761
+ //#region src/chat/events/people.ts
3762
+ const linkedSlackIdentity$1 = alias(juniorIdentities, "event_people_slack");
3763
+ function personKey(person) {
3764
+ return "email" in person ? `email:${normalizeIdentityEmail(person.email)}` : `${person.provider}:${person.handle.toLowerCase()}`;
3765
+ }
3766
+ function personCondition(person) {
3767
+ if ("email" in person) return and(eq(juniorIdentities.emailVerified, true), eq(juniorIdentities.emailNormalized, normalizeIdentityEmail(person.email)));
3768
+ return and(eq(juniorIdentities.provider, person.provider), sql`lower(${juniorIdentities.handle}) = lower(${person.handle})`);
3769
+ }
3770
+ /**
3771
+ * Resolve Event people to Slack mentions through linked user identities in
3772
+ * one Slack workspace.
3773
+ *
3774
+ * A person resolves only when exactly one linked Slack user in that workspace
3775
+ * matches. Core drops unlinked and ambiguous people, so a provider value never
3776
+ * guesses a mention. The result keeps input order and has no duplicates.
3777
+ */
3778
+ async function resolveEventPeopleMentions(people, slackTeamId) {
3779
+ if (people.length === 0) return [];
3780
+ const rows = await getSqlExecutor().db().select({
3781
+ emailNormalized: juniorIdentities.emailNormalized,
3782
+ emailVerified: juniorIdentities.emailVerified,
3783
+ handle: juniorIdentities.handle,
3784
+ provider: juniorIdentities.provider,
3785
+ slackUserId: linkedSlackIdentity$1.providerSubjectId
3786
+ }).from(juniorIdentities).innerJoin(linkedSlackIdentity$1, and(eq(linkedSlackIdentity$1.userId, juniorIdentities.userId), eq(linkedSlackIdentity$1.kind, "user"), eq(linkedSlackIdentity$1.provider, "slack"), eq(linkedSlackIdentity$1.providerTenantId, slackTeamId))).where(and(eq(juniorIdentities.kind, "user"), or(...people.map(personCondition))));
3787
+ const slackUsersByKey = /* @__PURE__ */ new Map();
3788
+ const add = (key, slackUserId) => {
3789
+ const users = slackUsersByKey.get(key) ?? /* @__PURE__ */ new Set();
3790
+ users.add(slackUserId);
3791
+ slackUsersByKey.set(key, users);
3792
+ };
3793
+ for (const row of rows) {
3794
+ if (row.handle) add(`${row.provider}:${row.handle.toLowerCase()}`, row.slackUserId);
3795
+ if (row.emailVerified && row.emailNormalized) add(`email:${row.emailNormalized}`, row.slackUserId);
3796
+ }
3797
+ const mentions = [];
3798
+ for (const person of people) {
3799
+ const users = slackUsersByKey.get(personKey(person));
3800
+ if (users?.size !== 1) continue;
3801
+ const mention = slackMention([...users][0]);
3802
+ if (!mentions.includes(mention)) mentions.push(mention);
3803
+ }
3804
+ return mentions;
3805
+ }
3806
+ //#endregion
3761
3807
  //#region src/chat/events/ingest.ts
3762
3808
  /** Match a normalized event and enqueue notifications into conversations. */
3763
3809
  async function ingestEvent(input, options) {
@@ -3771,6 +3817,15 @@ async function ingestEvent(input, options) {
3771
3817
  identifier: event.identifier,
3772
3818
  state: options.state
3773
3819
  });
3820
+ let people = [];
3821
+ if (subscriptions.length > 0 && event.people && options.slackTeamId) try {
3822
+ people = await resolveEventPeopleMentions(event.people, options.slackTeamId);
3823
+ } catch (error) {
3824
+ logException(error, "event.people.resolve.failed", {
3825
+ "app.event.event_type": event.eventType,
3826
+ "app.event.namespace": event.namespace
3827
+ });
3828
+ }
3774
3829
  let enqueued = 0;
3775
3830
  const errors = [];
3776
3831
  const waitDeadlineMs = Date.now() + 1e4;
@@ -3788,6 +3843,7 @@ async function ingestEvent(input, options) {
3788
3843
  deliver: async (current) => {
3789
3844
  return (await enqueueEventNotification({
3790
3845
  event,
3846
+ people,
3791
3847
  queue: options.queue,
3792
3848
  state: options.state,
3793
3849
  subscription: current
@@ -13226,10 +13282,29 @@ function truncateMessages(messages, maxChars) {
13226
13282
  omitted: messages.length - kept.length
13227
13283
  };
13228
13284
  }
13285
+ /**
13286
+ * Find stored Conversations for a Slack thread.
13287
+ *
13288
+ * A thread that an automation run started is bound to the run's Conversation.
13289
+ * Other threads use `slack:<channel>:<threadTs>`. Return both when both exist.
13290
+ */
13291
+ async function findThreadConversationIds(args) {
13292
+ const store = getConversationStore();
13293
+ const boundId = await store.getConversationIdByProviderConversation({
13294
+ provider: "slack",
13295
+ providerDestinationId: args.channelId,
13296
+ providerTenantId: args.teamId,
13297
+ providerConversationId: args.threadTs
13298
+ });
13299
+ const threadId = `slack:${args.channelId}:${args.threadTs}`;
13300
+ const ids = boundId ? [boundId] : [];
13301
+ if (threadId !== boundId && await store.get({ conversationId: threadId })) ids.push(threadId);
13302
+ return ids;
13303
+ }
13229
13304
  /** Create a tool that reads a Slack thread from a shared message URL or explicit coordinates. */
13230
13305
  function createSlackThreadReadTool(context, attachmentDeps) {
13231
13306
  return zodTool({
13232
- description: "Read a Slack thread, including message reaction users, from a shared archive URL or explicit channel + timestamp. Works for the current conversation and public channels.",
13307
+ description: "Read a Slack thread, including message reaction users, from a shared archive URL or explicit channel + timestamp. Works for the current conversation and public channels. Returns `conversation_ids` when you took part in the thread; pass one to `searchConversationEvents`.",
13233
13308
  annotations: {
13234
13309
  destructiveHint: false,
13235
13310
  idempotentHint: true,
@@ -13321,12 +13396,18 @@ function createSlackThreadReadTool(context, attachmentDeps) {
13321
13396
  }) : [];
13322
13397
  const attachmentIdsBySlackFileId = new Map(storedAttachments.flatMap((attachment) => attachment.providerId ? [[attachment.providerId, attachment.id]] : []));
13323
13398
  const { messages, omitted } = truncateMessages(replies.map((reply) => sanitizeMessage(reply, attachmentIdsBySlackFileId)), MAX_THREAD_READ_CHARS);
13399
+ const conversationIds = await findThreadConversationIds({
13400
+ channelId,
13401
+ teamId: context.teamId,
13402
+ threadTs: resolvedThreadTs
13403
+ });
13324
13404
  return {
13325
13405
  channel_id: channelId,
13326
13406
  ...channelName ? { channel_name: channelName } : void 0,
13327
13407
  ...joined ? { joined_channel: true } : void 0,
13328
13408
  target_message_ts: messageTs,
13329
13409
  thread_ts: resolvedThreadTs,
13410
+ ...conversationIds.length > 0 ? { conversation_ids: conversationIds } : void 0,
13330
13411
  count: messages.length,
13331
13412
  fetched_count: replies.length,
13332
13413
  truncated: omitted > 0,
@@ -20397,7 +20478,7 @@ function createAgentRunner(execute, options) {
20397
20478
  } } : void 0
20398
20479
  };
20399
20480
  if (run.instruction.storedAttachments?.length) {
20400
- const { loadInputImages } = await import("./images-CbP-PoMG.js").then((n) => n.n);
20481
+ const { loadInputImages } = await import("./images-BkGhqKIK.js").then((n) => n.n);
20401
20482
  const storage = nextRun.environment?.attachmentStorage;
20402
20483
  if (!storage) throw new Error("Attachment storage is unavailable.");
20403
20484
  nextRun.instruction = {
@@ -3509,6 +3509,39 @@ export declare const apiErrorSchema: z.ZodObject<{
3509
3509
  }, z.core.$strict>;
3510
3510
  type ApiError = z.infer<typeof apiErrorSchema>;
3511
3511
  //#endregion
3512
+ //#region src/api/schema/connection.d.ts
3513
+ export declare const connectionSchema: z.ZodObject<{
3514
+ provider: z.ZodString;
3515
+ displayName: z.ZodString;
3516
+ description: z.ZodString;
3517
+ account: z.ZodOptional<z.ZodObject<{
3518
+ label: z.ZodString;
3519
+ url: z.ZodOptional<z.ZodString>;
3520
+ }, z.core.$strict>>;
3521
+ connected: z.ZodBoolean;
3522
+ }, z.core.$strict>;
3523
+ export declare const connectionListSchema: z.ZodObject<{
3524
+ connections: z.ZodArray<z.ZodObject<{
3525
+ provider: z.ZodString;
3526
+ displayName: z.ZodString;
3527
+ description: z.ZodString;
3528
+ account: z.ZodOptional<z.ZodObject<{
3529
+ label: z.ZodString;
3530
+ url: z.ZodOptional<z.ZodString>;
3531
+ }, z.core.$strict>>;
3532
+ connected: z.ZodBoolean;
3533
+ }, z.core.$strict>>;
3534
+ }, z.core.$strict>;
3535
+ export declare const connectionParamsSchema: z.ZodObject<{
3536
+ provider: z.ZodString;
3537
+ }, z.core.$strict>;
3538
+ export declare const startConnectionResponseSchema: z.ZodObject<{
3539
+ authorizationUrl: z.ZodString;
3540
+ }, z.core.$strict>;
3541
+ export declare const disconnectConnectionResponseSchema: z.ZodObject<{
3542
+ disconnected: z.ZodLiteral<true>;
3543
+ }, z.core.$strict>;
3544
+ //#endregion
3512
3545
  //#region src/api/schema/personal-token.d.ts
3513
3546
  export declare const personalTokenMetadataSchema: z.ZodObject<{
3514
3547
  id: z.ZodString;
@@ -2,5 +2,5 @@ import { a as conversationTurnFailureReasonSchema, i as conversationTurnFailureC
2
2
  import { A as forkConversationBodySchema, C as conversationReportEventSchema, E as conversationSummaryReportSchema, I as INPUT_IMAGE_TYPES, K as messageCardText, M as conversationChildAgentTotalsSchema, N as MAX_INPUT_IMAGES, O as createConversationBodySchema, P as MAX_INPUT_IMAGE_BYTES, S as conversationReportEventDataSchema, T as conversationStatsReportSchema, Y as resolveMessageCards, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, b as conversationPendingMessageSchema, d as conversationDetailReportSchema, f as conversationEventHistorySchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, j as forkConversationResponseSchema, k as createConversationMessageBodySchema, l as conversationAuxiliaryCostsSchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, r as archiveConversationBodySchema, s as conversationActivityPreviewSchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, v as conversationPendingAuthorizationSchema, x as conversationPendingMessagesReportSchema, y as conversationPendingMessageDeliverySchema } from "../conversation-NutPJ8S8.js";
3
3
  import { C as eventAutomationSummarySchema, S as automationVersionSchema, _ as automationSummarySchema, a as automationExecutionSchema, b as automationVersionListSchema, d as automationParamsSchema, f as automationRunListSchema, g as automationSchedulePreviewSchema, h as automationScheduleIntentSchema, i as automationExecutionListSchema, l as automationListQuerySchema, m as automationRunWindowsSchema, n as automationEditSchema, o as automationExecutionStatusDaySchema, p as automationRunSchema, r as automationEventCatalogSchema, s as automationExecutionStatusSchema, t as automationEditErrorSchema, u as automationListSchema, v as automationUpdateSchema, w as scheduledAutomationSummarySchema, x as automationVersionParamsSchema, y as automationVersionActivateSchema } from "../automation-gznOMaQ2.js";
4
4
  import { C as skillReportsSchema, S as skillReportSchema, _ as pluginPackageContentItemReportSchema, b as pluginsSchema, g as pluginOperationalReportSchema, h as pluginOperationalReportFeedSchema, m as healthReportSchema, t as webMessageId, v as pluginPackageContentReportSchema, x as runtimeInfoReportSchema, y as pluginSchema } from "../web-message-id-xPI_EFSC.js";
5
- import { A as codeChangeSummarySchema, C as locationParamsSchema, D as dailyConversationActivitySchema, F as codeRepositorySummarySchema, I as conversationChildAgentSchema, L as conversationChildAgentsReportSchema, M as codePersonReportSchema, N as codeRepositoryParamsSchema, O as codeActivityDaySchema, P as codeRepositoryReportSchema, R as stopConversationTurnResponseSchema, S as locationDirectoryReportSchema, _ as actorProfileReportSchema, a as workspaceBodySchema, b as locationActivityDayReportSchema, c as workspaceRepoSchema, d as createdPersonalTokenSchema, f as personalTokenListSchema, g as actorDirectoryReportSchema, h as revokePersonalTokenResponseSchema, i as deleteWorkspaceResponseSchema, j as codeOverviewReportSchema, k as codeChangeSummaryReportSchema, l as workspaceSchema, m as personalTokenParamsSchema, n as statsReportSchema, o as workspaceListSchema, p as personalTokenMetadataSchema, r as baselineSnapshotSchema, s as workspaceParamsSchema, t as statSchema, u as createPersonalTokenBodySchema, v as personParamsSchema, x as locationDetailReportSchema, y as personalSpendReportSchema, z as apiErrorSchema } from "../schema-Bz-kE1z4.js";
6
- export { INPUT_IMAGE_TYPES, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, acceptedConversationMessageSchema, actorDirectoryReportSchema, actorProfileReportSchema, apiErrorSchema, archiveConversationBodySchema, archiveConversationResponseSchema, automationEditErrorSchema, automationEditSchema, automationEventCatalogSchema, automationExecutionListSchema, automationExecutionSchema, automationExecutionStatusDaySchema, automationExecutionStatusSchema, automationListQuerySchema, automationListSchema, automationParamsSchema, automationRunListSchema, automationRunSchema, automationRunWindowsSchema, automationScheduleIntentSchema, automationSchedulePreviewSchema, automationSummarySchema, automationUpdateSchema, automationVersionActivateSchema, automationVersionListSchema, automationVersionParamsSchema, automationVersionSchema, baselineSnapshotSchema, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, codeActivityDaySchema, codeChangeSummaryReportSchema, codeChangeSummarySchema, codeOverviewReportSchema, codePersonReportSchema, codeRepositoryParamsSchema, codeRepositoryReportSchema, codeRepositorySummarySchema, conversationActivityPreviewSchema, conversationAuxiliaryCostsSchema, conversationChildAgentSchema, conversationChildAgentTotalsSchema, conversationChildAgentsReportSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventHistorySchema, conversationEventPageSchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, createConversationBodySchema, createConversationMessageBodySchema, createPersonalTokenBodySchema, createdPersonalTokenSchema, dailyConversationActivitySchema, deleteWorkspaceResponseSchema, eventAutomationSummarySchema, forkConversationBodySchema, forkConversationResponseSchema, healthReportSchema, locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, messageCardText, personParamsSchema, personalSpendReportSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginSchema, pluginsSchema, resolveMessageCards, revokePersonalTokenResponseSchema, runtimeInfoReportSchema, scheduledAutomationSummarySchema, skillReportSchema, skillReportsSchema, statSchema, statsReportSchema, stopConversationTurnResponseSchema, webMessageId, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };
5
+ import { A as connectionSchema, B as codeRepositorySummarySchema, C as locationParamsSchema, D as dailyConversationActivitySchema, F as codeChangeSummarySchema, H as conversationChildAgentsReportSchema, I as codeOverviewReportSchema, L as codePersonReportSchema, M as startConnectionResponseSchema, N as codeActivityDaySchema, O as connectionListSchema, P as codeChangeSummaryReportSchema, R as codeRepositoryParamsSchema, S as locationDirectoryReportSchema, U as stopConversationTurnResponseSchema, V as conversationChildAgentSchema, W as apiErrorSchema, _ as actorProfileReportSchema, a as workspaceBodySchema, b as locationActivityDayReportSchema, c as workspaceRepoSchema, d as createdPersonalTokenSchema, f as personalTokenListSchema, g as actorDirectoryReportSchema, h as revokePersonalTokenResponseSchema, i as deleteWorkspaceResponseSchema, j as disconnectConnectionResponseSchema, k as connectionParamsSchema, l as workspaceSchema, m as personalTokenParamsSchema, n as statsReportSchema, o as workspaceListSchema, p as personalTokenMetadataSchema, r as baselineSnapshotSchema, s as workspaceParamsSchema, t as statSchema, u as createPersonalTokenBodySchema, v as personParamsSchema, x as locationDetailReportSchema, y as personalSpendReportSchema, z as codeRepositoryReportSchema } from "../schema-DELmAdjR.js";
6
+ export { INPUT_IMAGE_TYPES, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, acceptedConversationMessageSchema, actorDirectoryReportSchema, actorProfileReportSchema, apiErrorSchema, archiveConversationBodySchema, archiveConversationResponseSchema, automationEditErrorSchema, automationEditSchema, automationEventCatalogSchema, automationExecutionListSchema, automationExecutionSchema, automationExecutionStatusDaySchema, automationExecutionStatusSchema, automationListQuerySchema, automationListSchema, automationParamsSchema, automationRunListSchema, automationRunSchema, automationRunWindowsSchema, automationScheduleIntentSchema, automationSchedulePreviewSchema, automationSummarySchema, automationUpdateSchema, automationVersionActivateSchema, automationVersionListSchema, automationVersionParamsSchema, automationVersionSchema, baselineSnapshotSchema, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, codeActivityDaySchema, codeChangeSummaryReportSchema, codeChangeSummarySchema, codeOverviewReportSchema, codePersonReportSchema, codeRepositoryParamsSchema, codeRepositoryReportSchema, codeRepositorySummarySchema, connectionListSchema, connectionParamsSchema, connectionSchema, conversationActivityPreviewSchema, conversationAuxiliaryCostsSchema, conversationChildAgentSchema, conversationChildAgentTotalsSchema, conversationChildAgentsReportSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventHistorySchema, conversationEventPageSchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, createConversationBodySchema, createConversationMessageBodySchema, createPersonalTokenBodySchema, createdPersonalTokenSchema, dailyConversationActivitySchema, deleteWorkspaceResponseSchema, disconnectConnectionResponseSchema, eventAutomationSummarySchema, forkConversationBodySchema, forkConversationResponseSchema, healthReportSchema, locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, messageCardText, personParamsSchema, personalSpendReportSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginSchema, pluginsSchema, resolveMessageCards, revokePersonalTokenResponseSchema, runtimeInfoReportSchema, scheduledAutomationSummarySchema, skillReportSchema, skillReportsSchema, startConnectionResponseSchema, statSchema, statsReportSchema, stopConversationTurnResponseSchema, webMessageId, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };
package/dist/api.js CHANGED
@@ -1,27 +1,27 @@
1
- import { K as listChildAgents, L as editEventAutomation, O as parseSlackThreadId, P as editScheduledAutomation, R as AutomationEditError, T as readLiveAttachment, V as resolveTaskOutcomes, g as readStats, ot as getChildAgentLabel, z as eventAutomationTriggerAvailable } from "./agent-runner-B8u9yBSO.js";
2
- import { d as logException, p as logWarn } from "./logging-DkfhlwYe.js";
1
+ import { Ft as createUserTokenStore, K as listChildAgents, L as editEventAutomation, O as parseSlackThreadId, P as editScheduledAutomation, R as AutomationEditError, T as readLiveAttachment, V as resolveTaskOutcomes, g as readStats, ot as getChildAgentLabel, z as eventAutomationTriggerAvailable } from "./agent-runner-CNiTpIpb.js";
2
+ import { d as logException, f as logInfo, p as logWarn } from "./logging-C22RdmU8.js";
3
3
  import { d as parseSlackTeamId, g as parseSlackMessageTs, l as parseSlackChannelId } from "./actor-BTtLaeWy.js";
4
- import { E as resolveRootConversationId, T as hasAgentTurnUsage, _ as locationFromRow, b as parseSessionSource, c as getConversationEventStore, d as getDb, f as getSqlExecutor, i as resolveViewerUser, m as withConversationEventLock, o as updateViewerDisplayName, t as findUserByEmail, u as getConversationStore, w as agentTurnUsageSchema, x as addAgentTurnUsage } from "./viewer-BQqX8fDS.js";
4
+ import { E as resolveRootConversationId, T as hasAgentTurnUsage, _ as locationFromRow, b as parseSessionSource, c as getConversationEventStore, d as getDb, f as getSqlExecutor, i as resolveViewerUser, m as withConversationEventLock, o as updateViewerDisplayName, t as findUserByEmail, u as getConversationStore, w as agentTurnUsageSchema, x as addAgentTurnUsage } from "./viewer-DdzigZQh.js";
5
5
  import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, o as conversationReadColumns, s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
6
- import { _ as juniorConversationEvents, b as juniorCodeChanges, f as juniorConversationParticipants, g as juniorConversationMetrics, m as juniorConversationBriefs, v as juniorApiTokens, x as juniorCodeRepositories } from "./executor-BYtCR1fJ.js";
6
+ import { _ as juniorConversationEvents, b as juniorCodeChanges, f as juniorConversationParticipants, g as juniorConversationMetrics, m as juniorConversationBriefs, v as juniorApiTokens, x as juniorCodeRepositories } from "./executor-D8y7v95s.js";
7
7
  import { d as contextProvenance } from "./history-9pO1Zd4Y.js";
8
- import { A as requireAutomationRevision, D as sameDefinitionValue, E as readAutomationVersion, O as AutomationConflictError, a as readScheduledAutomation, b as saveEventAutomation, g as getEventAutomation, jt as loadTurnProjection, k as automationRevision, m as eventAutomationBelongsToUser, mn as piMessageFromHistoryItem, o as saveScheduledAutomation, w as automationDefinition, x as setEventAutomationStatus } from "./tasks-Cf4ib3bG.js";
9
- import { C as WorkspaceValidationError, Ct as readConversationEventPage, It as lookupSlackUser, Kt as withSlackRetries, M as workspaceRepoCheckoutPath, Mt as listConversationAnnotations, Nt as listConversationAnnotationsById, O as SANDBOX_RUNTIME, S as updateWorkspace, St as readLatestConversationBrief, Vt as getSlackClient, _ as deleteWorkspace, _t as conversationHasParticipantUser, b as listWorkspaces, bt as viewerConversationMembership, dt as createPluginLogger, ft as readConversationAccessFromSql, g as createWorkspace, gt as conversationHasParticipantEmail, ht as conversationArchivedForUser, mt as conversationArchivedForEmail, pt as conversationArchiveTimes, u as getPlugins, v as getWorkspace, vt as conversationNotArchivedForEmail, wt as buildSentryConversationUrl, x as listWorkspacesByRepository, yt as conversationNotArchivedForUser } from "./agent-hooks-B4bQ4kBT.js";
8
+ import { A as requireAutomationRevision, D as sameDefinitionValue, E as readAutomationVersion, O as AutomationConflictError, a as readScheduledAutomation, b as saveEventAutomation, g as getEventAutomation, jt as loadTurnProjection, k as automationRevision, m as eventAutomationBelongsToUser, mn as piMessageFromHistoryItem, o as saveScheduledAutomation, w as automationDefinition, x as setEventAutomationStatus } from "./tasks-B8nH3ND_.js";
9
+ import { C as WorkspaceValidationError, Ct as readConversationEventPage, It as lookupSlackUser, Kt as withSlackRetries, M as workspaceRepoCheckoutPath, Mt as listConversationAnnotations, Nt as listConversationAnnotationsById, O as SANDBOX_RUNTIME, S as updateWorkspace, St as readLatestConversationBrief, Vt as getSlackClient, _ as deleteWorkspace, _t as conversationHasParticipantUser, b as listWorkspaces, bt as viewerConversationMembership, dt as createPluginLogger, ft as readConversationAccessFromSql, g as createWorkspace, gt as conversationHasParticipantEmail, ht as conversationArchivedForUser, mt as conversationArchivedForEmail, pt as conversationArchiveTimes, u as getPlugins, v as getWorkspace, vt as conversationNotArchivedForEmail, wt as buildSentryConversationUrl, x as listWorkspacesByRepository, yt as conversationNotArchivedForUser } from "./agent-hooks-CtZuJPTU.js";
10
10
  import { A as forkConversationBodySchema, F as readMessageAttachments, I as INPUT_IMAGE_TYPES, O as createConversationBodySchema, T as conversationStatsReportSchema, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, c as conversationAttachmentParamsSchema, d as conversationDetailReportSchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, j as forkConversationResponseSchema, k as createConversationMessageBodySchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, r as archiveConversationBodySchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, x as conversationPendingMessagesReportSchema } from "./conversation-NutPJ8S8.js";
11
- import { n as hash, t as create } from "./profile-Ch9aZ6bb.js";
12
- import { l as getEventCatalog, v as automationEventCatalog } from "./session-stop-Akrz6ImY.js";
11
+ import { n as hash, t as create } from "./profile-DK9umvav.js";
12
+ import { l as getEventCatalog, v as automationEventCatalog } from "./session-stop-DteRDRCi.js";
13
13
  import { t as getFirstRunAtMs } from "./cadence-D00SCzT1.js";
14
- import { t as getCachedSnapshot } from "./resolve-QOZbqF7t.js";
15
- import { a as getVercelConversationWorkQueue } from "./job-queue-B-8tT6DC.js";
16
- import { a as cancelHumanFacingPendingMessages, h as getConversation } from "./store-DqnCyIPs.js";
14
+ import { t as getCachedSnapshot } from "./resolve-C9btOXju.js";
15
+ import { a as getVercelConversationWorkQueue } from "./job-queue-uGq6Grnt.js";
16
+ import { a as cancelHumanFacingPendingMessages, h as getConversation } from "./store-Dw3eBN9S.js";
17
17
  import { M as compileScheduleIntent, P as weekdaySchema, _ as automationSummarySchema, b as automationVersionListSchema, c as automationLifecycleSchema, d as automationParamsSchema, f as automationRunListSchema, g as automationSchedulePreviewSchema, h as automationScheduleIntentSchema, i as automationExecutionListSchema, j as ScheduleIntentError, l as automationListQuerySchema, n as automationEditSchema, r as automationEventCatalogSchema, t as automationEditErrorSchema, u as automationListSchema, v as automationUpdateSchema, x as automationVersionParamsSchema, y as automationVersionActivateSchema } from "./automation-gznOMaQ2.js";
18
18
  import { C as skillReportsSchema, a as fillUtcHours, b as pluginsSchema, c as sumUtcHoursIntoSixHours, d as trailingUtcSixHourWindow, f as utcDayKey, h as pluginOperationalReportFeedSchema, i as fillUtcDays, l as trailingUtcDayWindow, m as healthReportSchema, n as DAY_MS$1, o as fillUtcSixHours, p as utcHourKey, r as HOUR_MS$1, s as startOfUtcHour, u as trailingUtcHourWindow, x as runtimeInfoReportSchema } from "./web-message-id-xPI_EFSC.js";
19
- import { B as readHealthReport, I as createVercelAttachmentStorage, _ as readViewerAutomationRuns, a as recordWebConversationActivity, b as readViewerAutomations, d as resolveSlackConversationContextFromThreadId, g as readViewerAutomationExecutions, h as readConversationSourceTask, i as createConversationId, j as stopConversationTurn, l as getProductionSlackAdapter, m as deleteViewerTask, o as webActorFromEmail, p as ViewerTaskNotFoundError, r as createAndEnqueueConversation, t as appendAndEnqueueWebMessage, u as formatSlackConversationRedactedLabel, v as readViewerAutomationSummary, w as clearSlackPendingReactions, x as resolveViewerTaskCandidate, y as readViewerAutomationVersions } from "./web-input-DisCMhtH.js";
20
- import { A as conversationActiveDaysColumn, M as conversationRangeColumns, j as conversationAggregateColumns } from "./task-runner-exdzicSg.js";
21
- import { d as legacyWebMailboxMetadataSchema } from "./result-Dp8BPIuR.js";
22
- import { r as getWebAuthorization } from "./web-authorization-DLz3WwL6.js";
23
- import { t as decodeInputImages } from "./images-CbP-PoMG.js";
24
- import { C as locationParamsSchema, E as activitySixHours$1, L as conversationChildAgentsReportSchema, M as codePersonReportSchema, N as codeRepositoryParamsSchema, P as codeRepositoryReportSchema, R as stopConversationTurnResponseSchema, S as locationDirectoryReportSchema, T as activityHours$1, _ as actorProfileReportSchema, a as workspaceBodySchema, d as createdPersonalTokenSchema, f as personalTokenListSchema, g as actorDirectoryReportSchema, h as revokePersonalTokenResponseSchema, i as deleteWorkspaceResponseSchema, j as codeOverviewReportSchema, l as workspaceSchema, m as personalTokenParamsSchema, n as statsReportSchema, o as workspaceListSchema, s as workspaceParamsSchema, u as createPersonalTokenBodySchema, v as personParamsSchema, w as activityDays$1, x as locationDetailReportSchema, y as personalSpendReportSchema, z as apiErrorSchema } from "./schema-Bz-kE1z4.js";
19
+ import { B as readHealthReport, I as createVercelAttachmentStorage, _ as readViewerAutomationRuns, a as recordWebConversationActivity, b as readViewerAutomations, d as resolveSlackConversationContextFromThreadId, g as readViewerAutomationExecutions, h as readConversationSourceTask, i as createConversationId, j as stopConversationTurn, l as getProductionSlackAdapter, m as deleteViewerTask, o as webActorFromEmail, p as ViewerTaskNotFoundError, r as createAndEnqueueConversation, t as appendAndEnqueueWebMessage, u as formatSlackConversationRedactedLabel, v as readViewerAutomationSummary, w as clearSlackPendingReactions, x as resolveViewerTaskCandidate, y as readViewerAutomationVersions } from "./web-input-BjdnnpuN.js";
20
+ import { A as conversationActiveDaysColumn, M as conversationRangeColumns, j as conversationAggregateColumns } from "./task-runner-BbSyWmOq.js";
21
+ import { d as legacyWebMailboxMetadataSchema } from "./result-CcdQ2iau.js";
22
+ import { a as startConnection, l as getWebAuthorization, n as isConnectableProvider, r as listConnections, t as disconnectConnection } from "./connections-DZ70JeSN.js";
23
+ import { t as decodeInputImages } from "./images-BkGhqKIK.js";
24
+ import { C as locationParamsSchema, E as activitySixHours$1, H as conversationChildAgentsReportSchema, I as codeOverviewReportSchema, L as codePersonReportSchema, M as startConnectionResponseSchema, O as connectionListSchema, R as codeRepositoryParamsSchema, S as locationDirectoryReportSchema, T as activityHours$1, U as stopConversationTurnResponseSchema, W as apiErrorSchema, _ as actorProfileReportSchema, a as workspaceBodySchema, d as createdPersonalTokenSchema, f as personalTokenListSchema, g as actorDirectoryReportSchema, h as revokePersonalTokenResponseSchema, i as deleteWorkspaceResponseSchema, j as disconnectConnectionResponseSchema, k as connectionParamsSchema, l as workspaceSchema, m as personalTokenParamsSchema, n as statsReportSchema, o as workspaceListSchema, s as workspaceParamsSchema, u as createPersonalTokenBodySchema, v as personParamsSchema, w as activityDays$1, x as locationDetailReportSchema, y as personalSpendReportSchema, z as codeRepositoryReportSchema } from "./schema-DELmAdjR.js";
25
25
  import { Hono } from "hono";
26
26
  import path from "node:path";
27
27
  import { z } from "zod";
@@ -2832,6 +2832,37 @@ function createCodeRoutes() {
2832
2832
  return app;
2833
2833
  }
2834
2834
  //#endregion
2835
+ //#region src/api/connections/routes.ts
2836
+ /**
2837
+ * Create authenticated routes that list, connect, and disconnect the viewer's
2838
+ * plugin accounts. Connections belong to the viewer's web actor, which is the
2839
+ * credential subject for the viewer's web Conversations.
2840
+ */
2841
+ function createConnectionRoutes() {
2842
+ const app = new Hono();
2843
+ app.get("/", requireViewer, async (context) => {
2844
+ const actor = webActorFromEmail(context.get("viewer").email);
2845
+ return jsonResponse(connectionListSchema, { connections: await listConnections(actor.userId, createUserTokenStore()) });
2846
+ });
2847
+ app.post("/:provider", requireViewer, validateRequest("param", connectionParamsSchema, "Invalid provider."), async (context) => {
2848
+ const { provider } = context.req.valid("param");
2849
+ if (!isConnectableProvider(provider)) throwApiError(404, "Connection not found.");
2850
+ const viewer = context.get("viewer");
2851
+ const result = await startConnection(provider, webActorFromEmail(viewer.email, { ...viewer.displayName ? { fullName: viewer.displayName } : void 0 }));
2852
+ if (!result.ok) throwApiError(503, result.error);
2853
+ return jsonResponse(startConnectionResponseSchema, { authorizationUrl: result.authorizationUrl });
2854
+ });
2855
+ app.delete("/:provider", requireViewer, validateRequest("param", connectionParamsSchema, "Invalid provider."), async (context) => {
2856
+ const { provider } = context.req.valid("param");
2857
+ if (!isConnectableProvider(provider)) throwApiError(404, "Connection not found.");
2858
+ const actor = webActorFromEmail(context.get("viewer").email);
2859
+ await disconnectConnection(actor.userId, provider, createUserTokenStore());
2860
+ logInfo("dashboard.credential.unlinked", { "app.credential.provider": provider });
2861
+ return jsonResponse(disconnectConnectionResponseSchema, { disconnected: true });
2862
+ });
2863
+ return app;
2864
+ }
2865
+ //#endregion
2835
2866
  //#region src/api/conversations/reporting.ts
2836
2867
  /** Return the dashboard label for a conversation surface. */
2837
2868
  function surfaceLabel(surface) {
@@ -3581,7 +3612,7 @@ async function readPeoplePluginReports(args) {
3581
3612
  reports: [],
3582
3613
  source: "plugins"
3583
3614
  });
3584
- const { getPluginProfileReports } = await import("./agent-hooks-B4bQ4kBT.js").then((n) => n.t);
3615
+ const { getPluginProfileReports } = await import("./agent-hooks-CtZuJPTU.js").then((n) => n.t);
3585
3616
  return pluginOperationalReportFeedSchema.parse({
3586
3617
  generatedAt: new Date(nowMs).toISOString(),
3587
3618
  reports: await getPluginProfileReports({
@@ -4549,7 +4580,7 @@ function readDescriptionText(home) {
4549
4580
  }
4550
4581
  /** Read discovered skill names for authenticated runtime diagnostics. */
4551
4582
  async function readSkillReports() {
4552
- const { discoverSkills } = await import("./skills-D4Tpsuvg.js").then((n) => n.o);
4583
+ const { discoverSkills } = await import("./skills-CVwSL6Gc.js").then((n) => n.o);
4553
4584
  const skills = await discoverSkills();
4554
4585
  return skillReportsSchema.parse(skills.map((skill) => ({
4555
4586
  name: skill.name,
@@ -4558,7 +4589,7 @@ async function readSkillReports() {
4558
4589
  }
4559
4590
  /** Read safe configured plugin metadata for authenticated runtime diagnostics. */
4560
4591
  async function readPlugins() {
4561
- const { pluginCatalogRuntime } = await import("./catalog-runtime-oITS5Rjx.js").then((n) => n.t);
4592
+ const { pluginCatalogRuntime } = await import("./catalog-runtime-BQ3g3OX_.js").then((n) => n.t);
4562
4593
  return pluginsSchema.parse(pluginCatalogRuntime.getProviders().map((plugin) => ({
4563
4594
  configKeys: plugin.manifest.configKeys ?? [],
4564
4595
  description: plugin.manifest.description,
@@ -4570,7 +4601,7 @@ async function readPlugins() {
4570
4601
  async function readRuntimeInfoReport() {
4571
4602
  const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
4572
4603
  import("./package-discovery-BVvSnQBB.js").then((n) => n.r),
4573
- import("./catalog-runtime-oITS5Rjx.js").then((n) => n.t),
4604
+ import("./catalog-runtime-BQ3g3OX_.js").then((n) => n.t),
4574
4605
  readPlugins(),
4575
4606
  readSkillReports()
4576
4607
  ]);
@@ -4587,7 +4618,7 @@ async function readRuntimeInfoReport() {
4587
4618
  /** Read sanitized operational summaries contributed by plugins. */
4588
4619
  async function readPluginOperationalReportFeed() {
4589
4620
  const nowMs = Date.now();
4590
- const { getPluginOperationalReports } = await import("./agent-hooks-B4bQ4kBT.js").then((n) => n.t);
4621
+ const { getPluginOperationalReports } = await import("./agent-hooks-CtZuJPTU.js").then((n) => n.t);
4591
4622
  return pluginOperationalReportFeedSchema.parse({
4592
4623
  source: "plugins",
4593
4624
  generatedAt: new Date(nowMs).toISOString(),
@@ -4610,6 +4641,7 @@ function createJuniorApi(options = {}) {
4610
4641
  queue: options.conversationWorkQueue ?? getVercelConversationWorkQueue()
4611
4642
  }));
4612
4643
  app.route("/api/code", createCodeRoutes());
4644
+ app.route("/api/connections", createConnectionRoutes());
4613
4645
  app.route("/api/personal-tokens", createPersonalTokenRoutes());
4614
4646
  app.route("/api/people", createPeopleRoutes());
4615
4647
  app.route("/api/locations", createLocationRoutes());