@sentry/junior 0.297.0 → 0.298.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.
- package/dist/{admin-tmGIw4KS.js → admin-BF3DbYGf.js} +2 -2
- package/dist/{agent-runner-CneTquAE.js → agent-runner-Q9GkoerG.js} +99 -46
- package/dist/api/schema.d.ts +1 -1
- package/dist/api/schema.js +4 -4
- package/dist/api.d.ts +1 -1
- package/dist/api.js +31 -31
- package/dist/{app-BJojZ7HL.d.ts → app-DOg_mCtV.d.ts} +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +33 -33
- package/dist/{automation-BrP6ImrC.js → automation-Cn8qmbdr.js} +1 -1
- package/dist/{background-compaction-queue-CwfJy3Cd.js → background-compaction-queue-BZhGFOK6.js} +3 -3
- package/dist/{briefs-uFTuhMqA.js → briefs-CQrCRF6-.js} +3 -3
- package/dist/{catalog-runtime-0kuQqYL4.js → catalog-runtime-DZeD2WbL.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{config-Dj9M_nqB.js → config-BOByVnxe.js} +2 -2
- package/dist/{connections-B96JUM5o.js → connections-BNN5cJam.js} +6 -6
- package/dist/{conversation-CvcBU1z2.js → conversation-DCkzvxqB.js} +50 -2
- package/dist/{conversation-feed-BSMlGZnS.js → conversation-feed-CMA12Rjs.js} +1 -1
- package/dist/{conversation-privacy-DI29jbZV.js → conversation-privacy-C0eRxsgb.js} +1 -1
- package/dist/{conversation-turn-CZWBr091.js → conversation-turn-D9qvcDX6.js} +18 -18
- package/dist/{credential-sync-Blhx4_xf.js → credential-sync-B_iUpxGL.js} +14 -14
- package/dist/{db-Br0tfAo7.js → db-CoMNr2Zm.js} +3 -3
- package/dist/{db-CrtyFRz7.d.ts → db-DoMcnYol.d.ts} +1 -1
- package/dist/{executor-BMPipFVA.js → executor-C-m8VrzX.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-CQjlDQYX.js → logging-CJTi5niy.js} +1 -1
- package/dist/{message-BOZEIuxy.js → message-Q6_5DAWR.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{notification-gusCgdQ6.js → notification-Bv25xbj0.js} +9 -9
- package/dist/{oauth-callback-server-V_DuMuNX.js → oauth-callback-server-CH5XAyo-.js} +2 -2
- package/dist/{projection-B08mfi0u.js → projection-BgwEE36_.js} +11 -11
- package/dist/{prompt-BlutWLNt.js → prompt-DXc9DYT9.js} +4 -4
- package/dist/{prompt-input-Dxn8cDC0.js → prompt-input-BUr4J9RO.js} +7 -7
- package/dist/{registry-BDWgCJDf.js → registry-9XwqSnM-.js} +1 -1
- package/dist/{resolve-2Z_o_SsI.js → resolve-DUIAbcRL.js} +3 -3
- package/dist/{result-CAujiaci.js → result-C2Vn8QGn.js} +10 -10
- package/dist/{runner-D2Chc02N.js → runner-CXGtw-Mc.js} +9 -9
- package/dist/{sandbox-egress-signals-CFoJduFj.js → sandbox-egress-signals-Di3S_dO7.js} +1 -1
- package/dist/{schema-Ce2XCS7O.d.ts → schema-BnbZ-rKv.d.ts} +6 -0
- package/dist/{schema-Bqa5NbcP.js → schema-Dyp7racy.js} +3 -3
- package/dist/{service-account-CERfXEVU.js → service-account-DM3KBBeG.js} +3 -3
- package/dist/{service-account-C9kRQEb_.js → service-account-GzAMUQ8a.js} +3 -3
- package/dist/{session-stop-B-I1rAS1.js → session-stop-D4i7e6iT.js} +5 -5
- package/dist/{skills-B0m1nZ_j.js → skills-DCK9SD_l.js} +2 -2
- package/dist/{spawn-CwMjRRtn.js → spawn-6cX6xE9G.js} +5 -5
- package/dist/{state-DFnmLmfn.js → state-CSuA2J1V.js} +2 -2
- package/dist/{stop-BCH9VNGf.js → stop-Dh2DfwpK.js} +33 -31
- package/dist/{store-B59rOYbS.js → store-B1zepKG8.js} +3 -3
- package/dist/{store-m5bmdmsP.js → store-DrA17Fbz.js} +9 -9
- package/dist/{task-queue-N0kuCknH.js → task-queue-D1rXWfFN.js} +3 -3
- package/dist/{task-runner-COOwR8qm.js → task-runner-CT4M8oDz.js} +8 -8
- package/dist/{thread-context-Cd44z_W5.js → thread-context-DnqUkbzN.js} +7 -7
- package/dist/{turn-cancel-DDu8TOwt.js → turn-cancel-l460pfGW.js} +6 -6
- package/dist/{turn-session-routing-BlCtVFRN.js → turn-session-routing-VXDVXLRl.js} +5 -5
- package/dist/{turn-user-message-ygLG3ylQ.js → turn-user-message-BSPmkm7X.js} +15 -48
- package/dist/{turn-wake-DmQec4AG.js → turn-wake-DVFVXyhX.js} +6 -6
- package/dist/{validation-Ba2OcUse.js → validation-zxAJBDDy.js} +1 -1
- package/dist/{version-KNDzIAh6.js → version-DcZ40a0g.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-BPpuN2f9.js → viewer-CgiGjW10.js} +3 -3
- package/dist/{warmup-Bskrwmk1.js → warmup-CwKbxQLl.js} +16 -15
- package/dist/{worker-B1skZlit.js → worker-CbDUzaBA.js} +6 -6
- package/package.json +4 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { go as readConversationAccessFromSql, po as canAccessConversation, zn as renderUntrustedTag } from "./projection-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { M as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb } from "./db-
|
|
5
|
-
import { Ft as actorFromRun, It as toolInvocationDestination } from "./agent-runner-
|
|
6
|
-
import { I as findChildAgentConversationId, M as AgentMessagePausedError, O as createAgentInvocationForMessage, P as AgentMessageTargetError, x as enqueueAgentInvocation } from "./warmup-
|
|
7
|
-
import { C as getActiveAgentInvocationForConversation, E as getLatestAgentInvocationForConversation, W as PARENT_AGENT_TARGET } from "./turn-user-message-
|
|
8
|
-
import { b as postAutomatedTurnLimitNoticeForConversation, t as EVENT_WAIT_MS, w as admitAutomatedTurn } from "./notification-
|
|
9
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
10
|
-
import { a as enqueueAgentMessageToParent } from "./result-
|
|
2
|
+
import { go as readConversationAccessFromSql, po as canAccessConversation, zn as renderUntrustedTag } from "./projection-BgwEE36_.js";
|
|
3
|
+
import { n as botConfig } from "./config-BOByVnxe.js";
|
|
4
|
+
import { M as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb } from "./db-CoMNr2Zm.js";
|
|
5
|
+
import { Ft as actorFromRun, It as toolInvocationDestination } from "./agent-runner-Q9GkoerG.js";
|
|
6
|
+
import { I as findChildAgentConversationId, M as AgentMessagePausedError, O as createAgentInvocationForMessage, P as AgentMessageTargetError, x as enqueueAgentInvocation } from "./warmup-CwKbxQLl.js";
|
|
7
|
+
import { C as getActiveAgentInvocationForConversation, E as getLatestAgentInvocationForConversation, W as PARENT_AGENT_TARGET } from "./turn-user-message-BSPmkm7X.js";
|
|
8
|
+
import { b as postAutomatedTurnLimitNoticeForConversation, t as EVENT_WAIT_MS, w as admitAutomatedTurn } from "./notification-Bv25xbj0.js";
|
|
9
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-B1zepKG8.js";
|
|
10
|
+
import { a as enqueueAgentMessageToParent } from "./result-C2Vn8QGn.js";
|
|
11
11
|
// src/chat/agent-invocations/top-level-message.ts
|
|
12
12
|
const AGENT_MESSAGE_EVENT_NAMESPACE = "junior";
|
|
13
13
|
/** Event type of a message from another top-level agent. */
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { i as JuniorDashboardOptions } from "./app-DOg_mCtV.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.js";
|
|
3
3
|
import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
|
|
4
4
|
type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_CRON_SCHEDULE, I as JUNIOR_RETENTION_ROUTE, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_CRON_SCHEDULE, N as JUNIOR_HEARTBEAT_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, k as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, z as getDeploymentServiceVersion } from "./logging-
|
|
1
|
+
import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_CRON_SCHEDULE, I as JUNIOR_RETENTION_ROUTE, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_CRON_SCHEDULE, N as JUNIOR_HEARTBEAT_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, k as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, z as getDeploymentServiceVersion } from "./logging-CJTi5niy.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJhGdS4c.js";
|
|
3
|
-
import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, h as CACHE_WARMUP_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-
|
|
3
|
+
import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, h as CACHE_WARMUP_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-BZhGFOK6.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-HYh_JOdw.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-D1rXWfFN.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { $i as escapeSlackMrkdwnText, $t as REPLY_TOOL_NAME, Bn as tagJson, Ei as ToolInputError, Ln as renderChildTag, Pn as escapeClosingTags, Qn as getPluginSlackConversationLink, Rn as renderTag, _i as verifyTimerWatchCredentialSubject, bi as getDashboardObjectIconLink, da as postSlackMessage, ea as formatSlackLink, fn as REPORT_BLOCKED_TOOL_NAME, jo as buildSentryConversationUrl, nr as getPlugins, sn as NO_REPLY_TOOL_NAME, ta as normalizeSlackReplyMarkdown, vi as JUNIOR_THREAD_STATE_TTL_MS, yi as getDashboardConversationLink, zn as renderUntrustedTag } from "./projection-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { h as logWarn, m as logInfo, p as logException } from "./logging-
|
|
4
|
-
import { M as SYSTEM_IDENTITY_ID, a as getConversationStore } from "./db-
|
|
5
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
6
|
-
import { r as EVENT_AUTHOR_ID } from "./prompt-
|
|
7
|
-
import { a as getStateAdapter } from "./state-
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { f as eventCatalogEntry, l as CORE_EVENT_NAMESPACE, p as eventGuidance } from "./turn-session-routing-
|
|
1
|
+
import { $i as escapeSlackMrkdwnText, $t as REPLY_TOOL_NAME, Bn as tagJson, Ei as ToolInputError, Ln as renderChildTag, Pn as escapeClosingTags, Qn as getPluginSlackConversationLink, Rn as renderTag, _i as verifyTimerWatchCredentialSubject, bi as getDashboardObjectIconLink, da as postSlackMessage, ea as formatSlackLink, fn as REPORT_BLOCKED_TOOL_NAME, jo as buildSentryConversationUrl, nr as getPlugins, sn as NO_REPLY_TOOL_NAME, ta as normalizeSlackReplyMarkdown, vi as JUNIOR_THREAD_STATE_TTL_MS, yi as getDashboardConversationLink, zn as renderUntrustedTag } from "./projection-BgwEE36_.js";
|
|
2
|
+
import { n as botConfig } from "./config-BOByVnxe.js";
|
|
3
|
+
import { h as logWarn, m as logInfo, p as logException } from "./logging-CJTi5niy.js";
|
|
4
|
+
import { M as SYSTEM_IDENTITY_ID, a as getConversationStore } from "./db-CoMNr2Zm.js";
|
|
5
|
+
import { h as credentialSubjectSchema } from "./registry-9XwqSnM-.js";
|
|
6
|
+
import { r as EVENT_AUTHOR_ID } from "./prompt-DXc9DYT9.js";
|
|
7
|
+
import { a as getStateAdapter } from "./state-CSuA2J1V.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-B1zepKG8.js";
|
|
9
|
+
import { f as eventCatalogEntry, l as CORE_EVENT_NAMESPACE, p as eventGuidance } from "./turn-session-routing-VXDVXLRl.js";
|
|
10
10
|
import * as z from "zod";
|
|
11
11
|
import { agentEventKeys, eventMatchFieldsSchema, objectFactFields, objectPresentation, objectTypeSchema } from "@sentry/junior-plugin-api";
|
|
12
12
|
// src/chat/services/automated-turn-limit.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Hn as createUserTokenStore } from "./projection-
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { Hn as createUserTokenStore } from "./projection-BgwEE36_.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-B_iUpxGL.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
// src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { a as getClient$1, h as startSpan, n as captureMessage, r as continueTrace, v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { A as estimateTextTokens, E as resolveGatewayModel, I as unwrapCurrentInstruction, L as escapeXml, S as completeObject, T as rerankTexts, X as toOptionalTrimmed, i as getChatConfig, n as botConfig, o as getSlackBotToken, v as normalizeSlackEmojiName, w as embedTexts, x as completeDecision, y as GEN_AI_PROVIDER_NAME } from "./config-
|
|
3
|
-
import { E as withSpan, G as isRecord$2, K as toOptionalNumber, _ as runBestEffort, a as extractGenAiUsageSummary, b as setSpanAttributes, c as getLogContextAttributes, d as logAudit, h as logWarn, m as logInfo, o as getActiveTraceContext, p as logException, q as toOptionalString, t as buildTurnFailureResponse, x as setSpanStatus, y as setSentryUser } from "./logging-
|
|
4
|
-
import { t as canExposeConversationPayload } from "./conversation-privacy-
|
|
2
|
+
import { A as estimateTextTokens, E as resolveGatewayModel, I as unwrapCurrentInstruction, L as escapeXml, S as completeObject, T as rerankTexts, X as toOptionalTrimmed, i as getChatConfig, n as botConfig, o as getSlackBotToken, v as normalizeSlackEmojiName, w as embedTexts, x as completeDecision, y as GEN_AI_PROVIDER_NAME } from "./config-BOByVnxe.js";
|
|
3
|
+
import { E as withSpan, G as isRecord$2, K as toOptionalNumber, _ as runBestEffort, a as extractGenAiUsageSummary, b as setSpanAttributes, c as getLogContextAttributes, d as logAudit, h as logWarn, m as logInfo, o as getActiveTraceContext, p as logException, q as toOptionalString, t as buildTurnFailureResponse, x as setSpanStatus, y as setSentryUser } from "./logging-CJTi5niy.js";
|
|
4
|
+
import { t as canExposeConversationPayload } from "./conversation-privacy-C0eRxsgb.js";
|
|
5
5
|
import { c as parseStoredSlackActor, d as parseSlackChannelReferenceId, f as parseSlackTeamId, h as parseSlackMessageTs, i as isActorUserId, l as toStoredSlackActor, p as parseSlackUserId, s as parseActorUserId } from "./actor-6jsm_v96.js";
|
|
6
|
-
import { $ as conversationDetailTouch, K as addAgentTurnUsage, P as resolveActorIdentityId, U as claimProviderConversation, V as saveUserTimezone, X as hasAgentTurnUsage, a as getConversationStore, at as sameDestination, d as createSqlConversationEventStore, f as eventFromRow, j as startLocationThread, o as getDb, p as withConversationEventLock, r as getConversationEventStore, rt as parseDestination, s as getSqlExecutor, w as isPersonInput, x as createSqlStore, z as readUserTimezone } from "./db-
|
|
7
|
-
import { A as juniorConversations, D as juniorCodeChanges, E as juniorConversationAnnotations, M as juniorUsers, N as juniorDestinations, O as juniorCodeRepositories, a as juniorPushSubscriptions, b as juniorConversationBriefs, f as juniorAutomations, i as juniorWorkspaces, j as juniorIdentities, k as juniorAttachments, l as juniorReviewItems, m as juniorLocationConfigurations, n as juniorSnapshots, o as juniorReviewItemAssignees, r as juniorWorkspaceRepos, s as juniorReviewItemConversations, v as juniorConversationParticipants, w as juniorConversationEvents } from "./executor-
|
|
6
|
+
import { $ as conversationDetailTouch, K as addAgentTurnUsage, P as resolveActorIdentityId, U as claimProviderConversation, V as saveUserTimezone, X as hasAgentTurnUsage, a as getConversationStore, at as sameDestination, d as createSqlConversationEventStore, f as eventFromRow, j as startLocationThread, o as getDb, p as withConversationEventLock, r as getConversationEventStore, rt as parseDestination, s as getSqlExecutor, w as isPersonInput, x as createSqlStore, z as readUserTimezone } from "./db-CoMNr2Zm.js";
|
|
7
|
+
import { A as juniorConversations, D as juniorCodeChanges, E as juniorConversationAnnotations, M as juniorUsers, N as juniorDestinations, O as juniorCodeRepositories, a as juniorPushSubscriptions, b as juniorConversationBriefs, f as juniorAutomations, i as juniorWorkspaces, j as juniorIdentities, k as juniorAttachments, l as juniorReviewItems, m as juniorLocationConfigurations, n as juniorSnapshots, o as juniorReviewItemAssignees, r as juniorWorkspaceRepos, s as juniorReviewItemConversations, v as juniorConversationParticipants, w as juniorConversationEvents } from "./executor-C-m8VrzX.js";
|
|
8
8
|
import { _ as instructionProvenanceFor, g as instructionActors, h as contextProvenance, o as agentHistoryItemSchema } from "./media-BepyEUNm.js";
|
|
9
|
-
import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, f as credentialContextForActor, g as credentialUserSubjectId, h as credentialSubjectSchema, m as credentialLogContext, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-
|
|
10
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
11
|
-
import { d as JUNIOR_NATIVE_EVENT_NAMESPACE, f as agentsInstructionsUpdatedEvent, g as renderJuniorNativeConversationEvent, l as completeObject$1, m as authenticationUnlinkedEvent, n as briefEntriesFromReportEvents, o as isEventConversationMessage, p as authenticationLinkedEvent, s as generateBrief, t as BRIEF_PROMPT, u as completeText } from "./prompt-
|
|
9
|
+
import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, f as credentialContextForActor, g as credentialUserSubjectId, h as credentialSubjectSchema, m as credentialLogContext, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-9XwqSnM-.js";
|
|
10
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DZeD2WbL.js";
|
|
11
|
+
import { d as JUNIOR_NATIVE_EVENT_NAMESPACE, f as agentsInstructionsUpdatedEvent, g as renderJuniorNativeConversationEvent, l as completeObject$1, m as authenticationUnlinkedEvent, n as briefEntriesFromReportEvents, o as isEventConversationMessage, p as authenticationLinkedEvent, s as generateBrief, t as BRIEF_PROMPT, u as completeText } from "./prompt-DXc9DYT9.js";
|
|
12
12
|
import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS, r as acquireActiveLock } from "./locks-D-0h111u.js";
|
|
13
|
-
import { g as createCache, i as readActorIdentity, l as resolveViewerUser, n as findUserByEmailFromSql, o as readIdentityById, p as parseAvatarUrl, s as readIdentityByIdFromSql } from "./viewer-
|
|
14
|
-
import { a as getStateAdapter, i as getDefaultRedisStateAdapterFor, n as readEncryptedState, o as getStateValues, s as setStateValues, t as createEncryptedState } from "./state-
|
|
13
|
+
import { g as createCache, i as readActorIdentity, l as resolveViewerUser, n as findUserByEmailFromSql, o as readIdentityById, p as parseAvatarUrl, s as readIdentityByIdFromSql } from "./viewer-CgiGjW10.js";
|
|
14
|
+
import { a as getStateAdapter, i as getDefaultRedisStateAdapterFor, n as readEncryptedState, o as getStateValues, s as setStateValues, t as createEncryptedState } from "./state-CSuA2J1V.js";
|
|
15
15
|
import { n as isWithinNotificationSchedule, r as notificationScheduleSchema, s as isValidTimeZone, t as DEFAULT_NOTIFICATION_SCHEDULE } from "./schedule-cP0AACm1.js";
|
|
16
|
-
import {
|
|
16
|
+
import { $ as parseStoredBrief, B as readMessageCardRefs, I as reviewItemChangeRecordSchema, K as readMessageAttachments, Q as parseBriefInput, R as messageCardRef, X as briefResourceLabel, Z as conversationBriefSchema, _ as conversationReportMessageEventSchema, g as conversationReportEventSchema } from "./conversation-DCkzvxqB.js";
|
|
17
17
|
import { n as redactSandboxEgressProxyPath, t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
|
|
18
18
|
import { i as readWebPushPrivateKey, t as readJuniorSecret } from "./secrets-DebYU866.js";
|
|
19
19
|
import path from "node:path";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as completeText$1, S as completeObject$1, x as completeDecision$1 } from "./config-
|
|
2
|
-
import { _ as runBestEffort, a as extractGenAiUsageSummary } from "./logging-
|
|
3
|
-
import { q as agentTurnCostUsd, r as getConversationEventStore } from "./db-
|
|
4
|
-
import {
|
|
1
|
+
import { C as completeText$1, S as completeObject$1, x as completeDecision$1 } from "./config-BOByVnxe.js";
|
|
2
|
+
import { _ as runBestEffort, a as extractGenAiUsageSummary } from "./logging-CJTi5niy.js";
|
|
3
|
+
import { q as agentTurnCostUsd, r as getConversationEventStore } from "./db-CoMNr2Zm.js";
|
|
4
|
+
import { Q as parseBriefInput, Y as briefOutcomeStatusSchema, Z as conversationBriefSchema } from "./conversation-DCkzvxqB.js";
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { conversationEventPresentationSchema, defineConversationEvent } from "@sentry/junior-plugin-api";
|
|
7
7
|
// src/chat/conversations/structured-events.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $n as getPluginSystemPromptContributions, $t as REPLY_TOOL_NAME, Cr as getReviewItem, Fn as escapeTagText, Mn as SESSION_CONTEXT_SECTION_TAG, Ni as listWorkspaces, Nn as TURN_CONTEXT_TAG, On as retainRuntimeTurnContext, Rn as renderTag$1, ao as sandboxSkillDir, fn as REPORT_BLOCKED_TOOL_NAME, io as SANDBOX_WORKSPACE_ROOT, jn as REQUEST_CONTEXT_SECTION_TAG, kn as stripRuntimeTurnContext, oo as sandboxSkillFile, ot as getTurnRecord, sn as NO_REPLY_TOOL_NAME, so as sandboxSkillPathResolution, st as listTurnSummaries, to as SANDBOX_DATA_ROOT, tr as getPluginUserPromptContributions, yn as hasRuntimeTurnContext } from "./projection-
|
|
2
|
-
import { F as renderCurrentInstruction, L as escapeXml, R as escapeXmlText, n as botConfig } from "./config-
|
|
3
|
-
import { h as logWarn, m as logInfo, v as serializeGenAiAttribute } from "./logging-
|
|
1
|
+
import { $n as getPluginSystemPromptContributions, $t as REPLY_TOOL_NAME, Cr as getReviewItem, Fn as escapeTagText, Mn as SESSION_CONTEXT_SECTION_TAG, Ni as listWorkspaces, Nn as TURN_CONTEXT_TAG, On as retainRuntimeTurnContext, Rn as renderTag$1, ao as sandboxSkillDir, fn as REPORT_BLOCKED_TOOL_NAME, io as SANDBOX_WORKSPACE_ROOT, jn as REQUEST_CONTEXT_SECTION_TAG, kn as stripRuntimeTurnContext, oo as sandboxSkillFile, ot as getTurnRecord, sn as NO_REPLY_TOOL_NAME, so as sandboxSkillPathResolution, st as listTurnSummaries, to as SANDBOX_DATA_ROOT, tr as getPluginUserPromptContributions, yn as hasRuntimeTurnContext } from "./projection-BgwEE36_.js";
|
|
2
|
+
import { F as renderCurrentInstruction, L as escapeXml, R as escapeXmlText, n as botConfig } from "./config-BOByVnxe.js";
|
|
3
|
+
import { h as logWarn, m as logInfo, v as serializeGenAiAttribute } from "./logging-CJTi5niy.js";
|
|
4
4
|
import { o as isUserActor, t as createActor } from "./actor-6jsm_v96.js";
|
|
5
|
-
import { o as getDb, r as getConversationEventStore } from "./db-
|
|
6
|
-
import { M as juniorUsers } from "./executor-
|
|
5
|
+
import { o as getDb, r as getConversationEventStore } from "./db-CoMNr2Zm.js";
|
|
6
|
+
import { M as juniorUsers } from "./executor-C-m8VrzX.js";
|
|
7
7
|
import { i as isVisionImageMediaType } from "./media-BepyEUNm.js";
|
|
8
8
|
import { a as listReferenceFiles, c as soulPathCandidates, l as worldPathCandidates } from "./package-discovery-DJhGdS4c.js";
|
|
9
|
-
import { a as EVENT_SYSTEM_ACTOR, d as JUNIOR_NATIVE_EVENT_NAMESPACE, h as conversationNoteEvent, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-
|
|
10
|
-
import { i as isEventMailboxMetadata, t as EVENT_WAIT_MS } from "./notification-
|
|
9
|
+
import { a as EVENT_SYSTEM_ACTOR, d as JUNIOR_NATIVE_EVENT_NAMESPACE, h as conversationNoteEvent, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-DXc9DYT9.js";
|
|
10
|
+
import { i as isEventMailboxMetadata, t as EVENT_WAIT_MS } from "./notification-Bv25xbj0.js";
|
|
11
11
|
import { i as formatUserInputAnswer, u as userCustomizationTextSchema } from "./user-input-request-CXNIov9n.js";
|
|
12
12
|
import path from "node:path";
|
|
13
13
|
import { isDeepStrictEqual } from "node:util";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-
|
|
1
|
+
import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-CJTi5niy.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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Gi as getSandboxProvider, Ja as sleep, Ui as isStale, Vi as create, eo as SANDBOX_COMMAND_PATH, io as SANDBOX_WORKSPACE_ROOT, uo as runNonInteractiveCommand } from "./projection-
|
|
2
|
-
import { E as withSpan, b as setSpanAttributes } from "./logging-
|
|
3
|
-
import { a as getStateAdapter } from "./state-
|
|
1
|
+
import { Gi as getSandboxProvider, Ja as sleep, Ui as isStale, Vi as create, eo as SANDBOX_COMMAND_PATH, io as SANDBOX_WORKSPACE_ROOT, uo as runNonInteractiveCommand } from "./projection-BgwEE36_.js";
|
|
2
|
+
import { E as withSpan, b as setSpanAttributes } from "./logging-CJTi5niy.js";
|
|
3
|
+
import { a as getStateAdapter } from "./state-CSuA2J1V.js";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
// src/chat/sandbox/resources.ts
|
|
6
6
|
let configuredResources;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { zn as renderUntrustedTag } from "./projection-
|
|
3
|
-
import { D as turnBehavior, M as SYSTEM_IDENTITY_ID, a as getConversationStore } from "./db-
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import { a as EVENT_SYSTEM_ACTOR } from "./prompt-
|
|
6
|
-
import { _ as getEventBatchDelayMs, b as resolveMailboxTurnWork, t as eventReviewItemInputs, v as listActiveMailboxTurns, y as parseEventMessages } from "./prompt-input-
|
|
7
|
-
import { S as resolveAgentInvocationId, _ as createAgentInvocationWorker, b as endAgentInvocationsOfStoppedWork, g as routeChildInput, h as getChildAgentInputInvocation, k as createAgentInvocationFromLatest, m as childAgentInput, p as listUnreportedSiblingAgents, x as enqueueAgentInvocation, y as endActiveAgentInvocations } from "./warmup-
|
|
8
|
-
import { t as getConversationStoppedAtMs } from "./session-stop-
|
|
9
|
-
import { $ as
|
|
10
|
-
import { a as renderEventBatchInputs, o as timerWatchCredentialSubject, r as eventBatchMessageMeta, t as EVENT_WAIT_MS } from "./notification-
|
|
11
|
-
import { _ as getConversationWorkState, r as appendAndEnqueueInboundMessage } from "./store-
|
|
2
|
+
import { zn as renderUntrustedTag } from "./projection-BgwEE36_.js";
|
|
3
|
+
import { D as turnBehavior, M as SYSTEM_IDENTITY_ID, a as getConversationStore } from "./db-CoMNr2Zm.js";
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-9XwqSnM-.js";
|
|
5
|
+
import { a as EVENT_SYSTEM_ACTOR } from "./prompt-DXc9DYT9.js";
|
|
6
|
+
import { _ as getEventBatchDelayMs, b as resolveMailboxTurnWork, t as eventReviewItemInputs, v as listActiveMailboxTurns, y as parseEventMessages } from "./prompt-input-BUr4J9RO.js";
|
|
7
|
+
import { S as resolveAgentInvocationId, _ as createAgentInvocationWorker, b as endAgentInvocationsOfStoppedWork, g as routeChildInput, h as getChildAgentInputInvocation, k as createAgentInvocationFromLatest, m as childAgentInput, p as listUnreportedSiblingAgents, x as enqueueAgentInvocation, y as endActiveAgentInvocations } from "./warmup-CwKbxQLl.js";
|
|
8
|
+
import { t as getConversationStoppedAtMs } from "./session-stop-D4i7e6iT.js";
|
|
9
|
+
import { $ as getAgentInvocationResultMessageId, A as listAgentInvocationsForConversation, B as reportReplacedWithoutOpenWork, E as getLatestAgentInvocationForConversation, F as markAgentInvocationParentMailboxAppended, V as sendsResultToParent, X as getAgentInvocationIdForMessage, Y as getAgentInvocationIdForEvents, Z as getAgentInvocationIdForResult, b as NON_TERMINAL_AGENT_INVOCATION_STATUSES, dt as buildDeterministicTurnId, it as getTurnReplyKey, k as isTerminalAgentInvocation, lt as parseTurnReplyMessageId, ot as isAgentReplyMessageId, tt as getAgentReplyMessageId, x as TERMINAL_AGENT_INVOCATION_STATUSES } from "./turn-user-message-BSPmkm7X.js";
|
|
10
|
+
import { a as renderEventBatchInputs, o as timerWatchCredentialSubject, r as eventBatchMessageMeta, t as EVENT_WAIT_MS } from "./notification-Bv25xbj0.js";
|
|
11
|
+
import { _ as getConversationWorkState, r as appendAndEnqueueInboundMessage } from "./store-B1zepKG8.js";
|
|
12
12
|
import { _ as agentInvocationResultEventType, g as AGENT_REPLY_EVENT_TYPE, h as AGENT_MESSAGE_EVENT_TYPE, m as AGENT_INVOCATION_EVENT_NAMESPACE } from "./user-input-request-CXNIov9n.js";
|
|
13
13
|
// src/chat/agent-invocations/result.ts
|
|
14
14
|
var result_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { A as latestConversationMessageSeq, I as upsertConversationMessage, M as normalizeConversationText, N as recordDeliveredAssistantMessage, W as authorizationId, a as loadProjection, an as getAssistantReplyText, b as persistConversationMessages, d as recordAuthorizationCompleted, j as markConversationMessage, mn as persistWithRetry, nt as saveTurnCheckpoint, t as commitAcceptedReply, v as hydrateConversationMessages } from "./projection-
|
|
2
|
-
import { S as setTags, T as withLogContext, p as logException } from "./logging-
|
|
3
|
-
import { M as SYSTEM_IDENTITY_ID, a as getConversationStore, r as getConversationEventStore } from "./db-
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import {
|
|
6
|
-
import { _ as ConversationTurnLifecycleService, g as startActiveTurn, h as markTurnFailed } from "./turn-user-message-
|
|
7
|
-
import { a as getPersistedThreadState, c as coerceThreadConversationState, i as getPersistedSandboxState, s as persistThreadStateById } from "./turn-session-routing-
|
|
8
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
9
|
-
import { c as buildDeliveredTurnStatePatch, l as loadPendingMessageCards, o as completeAuthPauseTurn, r as finalizeFailedTurnReplyWithEvent, t as buildTurnThreadContext } from "./thread-context-
|
|
1
|
+
import { A as latestConversationMessageSeq, I as upsertConversationMessage, M as normalizeConversationText, N as recordDeliveredAssistantMessage, W as authorizationId, a as loadProjection, an as getAssistantReplyText, b as persistConversationMessages, d as recordAuthorizationCompleted, j as markConversationMessage, mn as persistWithRetry, nt as saveTurnCheckpoint, t as commitAcceptedReply, v as hydrateConversationMessages } from "./projection-BgwEE36_.js";
|
|
2
|
+
import { S as setTags, T as withLogContext, p as logException } from "./logging-CJTi5niy.js";
|
|
3
|
+
import { M as SYSTEM_IDENTITY_ID, a as getConversationStore, r as getConversationEventStore } from "./db-CoMNr2Zm.js";
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-9XwqSnM-.js";
|
|
5
|
+
import { z as messageCardText } from "./conversation-DCkzvxqB.js";
|
|
6
|
+
import { _ as ConversationTurnLifecycleService, g as startActiveTurn, h as markTurnFailed } from "./turn-user-message-BSPmkm7X.js";
|
|
7
|
+
import { a as getPersistedThreadState, c as coerceThreadConversationState, i as getPersistedSandboxState, s as persistThreadStateById } from "./turn-session-routing-VXDVXLRl.js";
|
|
8
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-CT4M8oDz.js";
|
|
9
|
+
import { c as buildDeliveredTurnStatePatch, l as loadPendingMessageCards, o as completeAuthPauseTurn, r as finalizeFailedTurnReplyWithEvent, t as buildTurnThreadContext } from "./thread-context-DnqUkbzN.js";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
12
12
|
// src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ua as sandboxEgressSignalsResponseSchema } from "./projection-
|
|
1
|
+
import { Ua as sandboxEgressSignalsResponseSchema } from "./projection-BgwEE36_.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;
|
|
@@ -1444,6 +1444,8 @@ declare const conversationAgentTreeNodeSchema: z.ZodObject<{
|
|
|
1444
1444
|
thread: "thread";
|
|
1445
1445
|
}>;
|
|
1446
1446
|
label: z.ZodString;
|
|
1447
|
+
agentType: z.ZodOptional<z.ZodString>;
|
|
1448
|
+
fork: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1447
1449
|
}, z.core.$strict>;
|
|
1448
1450
|
type ConversationAgentTreeNode = z.infer<typeof conversationAgentTreeNodeSchema>;
|
|
1449
1451
|
declare const conversationEventPageSchema: z.ZodObject<{
|
|
@@ -1992,6 +1994,8 @@ declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
1992
1994
|
thread: "thread";
|
|
1993
1995
|
}>;
|
|
1994
1996
|
label: z.ZodString;
|
|
1997
|
+
agentType: z.ZodOptional<z.ZodString>;
|
|
1998
|
+
fork: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1995
1999
|
}, z.core.$strict>>>;
|
|
1996
2000
|
autoArchive: z.ZodOptional<z.ZodBoolean>;
|
|
1997
2001
|
canFork: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3097,6 +3101,8 @@ declare const conversationDetailWithMailboxReportSchema: z.ZodObject<{
|
|
|
3097
3101
|
thread: "thread";
|
|
3098
3102
|
}>;
|
|
3099
3103
|
label: z.ZodString;
|
|
3104
|
+
agentType: z.ZodOptional<z.ZodString>;
|
|
3105
|
+
fork: z.ZodOptional<z.ZodLiteral<true>>;
|
|
3100
3106
|
}, z.core.$strict>>>;
|
|
3101
3107
|
autoArchive: z.ZodOptional<z.ZodBoolean>;
|
|
3102
3108
|
canFork: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as notificationScheduleSchema } from "./schedule-cP0AACm1.js";
|
|
2
|
-
import { E as conversationChildAgentTotalsSchema, i as actorIdentitySchema, s as conversationAuxiliaryCostsSchema, x as conversationUsageSchema, y as conversationSummaryReportSchema } from "./conversation-
|
|
2
|
+
import { E as conversationChildAgentTotalsSchema, i as actorIdentitySchema, s as conversationAuxiliaryCostsSchema, x as conversationUsageSchema, y as conversationSummaryReportSchema } from "./conversation-DCkzvxqB.js";
|
|
3
3
|
import { p as AGENT_INVOCATION_STATUSES, s as userInputRequestSchema } from "./user-input-request-CXNIov9n.js";
|
|
4
4
|
import { i as fillUtcHours, r as fillUtcDays, s as sumUtcHoursIntoSixHours } from "./reporting-window-DopzcOHh.js";
|
|
5
|
-
import "./automation-
|
|
6
|
-
import "./conversation-feed-
|
|
5
|
+
import "./automation-Cn8qmbdr.js";
|
|
6
|
+
import "./conversation-feed-CMA12Rjs.js";
|
|
7
7
|
import { t as isPushServiceEndpoint } from "./push-endpoint-CO-nomUd.js";
|
|
8
8
|
import * as z from "zod";
|
|
9
9
|
import { codeChangeStateSchema, eventMatchSchema } from "@sentry/junior-plugin-api";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
-
import { r as disconnectStateAdapter } from "./state-
|
|
3
|
-
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DZeD2WbL.js";
|
|
2
|
+
import { r as disconnectStateAdapter } from "./state-CSuA2J1V.js";
|
|
3
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-GzAMUQ8a.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,7 +1,7 @@
|
|
|
1
|
-
import { G as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-
|
|
2
|
-
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-
|
|
1
|
+
import { G as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-CJTi5niy.js";
|
|
2
|
+
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-9XwqSnM-.js";
|
|
3
3
|
import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS } from "./locks-D-0h111u.js";
|
|
4
|
-
import { a as getStateAdapter, n as readEncryptedState, t as createEncryptedState } from "./state-
|
|
4
|
+
import { a as getStateAdapter, n as readEncryptedState, t as createEncryptedState } from "./state-CSuA2J1V.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,9 +1,9 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { M as normalizeConversationText, ti as cancelSubscriptions, x as toStoredConversationMessage } from "./projection-
|
|
3
|
-
import { et as nextDetailVersion, r as getConversationEventStore, s as getSqlExecutor, w as isPersonInput } from "./db-
|
|
4
|
-
import { A as juniorConversations } from "./executor-
|
|
5
|
-
import { _ as getEventBatchDelayMs, s as instructionForInputs, t as eventReviewItemInputs } from "./prompt-input-
|
|
6
|
-
import { a as renderEventBatchInputs, i as isEventMailboxMetadata, r as eventBatchMessageMeta } from "./notification-
|
|
2
|
+
import { M as normalizeConversationText, ti as cancelSubscriptions, x as toStoredConversationMessage } from "./projection-BgwEE36_.js";
|
|
3
|
+
import { et as nextDetailVersion, r as getConversationEventStore, s as getSqlExecutor, w as isPersonInput } from "./db-CoMNr2Zm.js";
|
|
4
|
+
import { A as juniorConversations } from "./executor-C-m8VrzX.js";
|
|
5
|
+
import { _ as getEventBatchDelayMs, s as instructionForInputs, t as eventReviewItemInputs } from "./prompt-input-BUr4J9RO.js";
|
|
6
|
+
import { a as renderEventBatchInputs, i as isEventMailboxMetadata, r as eventBatchMessageMeta } from "./notification-Bv25xbj0.js";
|
|
7
7
|
import { and, eq, inArray, isNull, lt, lte, or, sql } from "drizzle-orm";
|
|
8
8
|
// src/chat/conversations/sql/subtree.ts
|
|
9
9
|
/** Columns of the `conversation_subtree` table that `conversationSubtree` returns. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { h as logWarn } from "./logging-
|
|
2
|
+
import { h as logWarn } from "./logging-CJTi5niy.js";
|
|
3
3
|
import { s as skillRoots } from "./package-discovery-DJhGdS4c.js";
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DZeD2WbL.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { O as conversationKindFromRow, o as getDb } from "./db-
|
|
4
|
-
import { A as juniorConversations } from "./executor-
|
|
5
|
-
import { Ft as actorFromRun, It as toolInvocationDestination } from "./agent-runner-
|
|
6
|
-
import { A as AgentDepthLimitError, v as createAndEnqueueAgentInvocation } from "./warmup-
|
|
2
|
+
import { n as botConfig } from "./config-BOByVnxe.js";
|
|
3
|
+
import { O as conversationKindFromRow, o as getDb } from "./db-CoMNr2Zm.js";
|
|
4
|
+
import { A as juniorConversations } from "./executor-C-m8VrzX.js";
|
|
5
|
+
import { Ft as actorFromRun, It as toolInvocationDestination } from "./agent-runner-Q9GkoerG.js";
|
|
6
|
+
import { A as AgentDepthLimitError, v as createAndEnqueueAgentInvocation } from "./warmup-CwKbxQLl.js";
|
|
7
7
|
import { desc, eq, sql } from "drizzle-orm";
|
|
8
8
|
// src/chat/conversations/lineage.ts
|
|
9
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { h as logWarn } from "./logging-
|
|
1
|
+
import { i as getChatConfig } from "./config-BOByVnxe.js";
|
|
2
|
+
import { h as logWarn } from "./logging-CJTi5niy.js";
|
|
3
3
|
import { t as ACTIVE_LOCK_TTL_MS } from "./locks-D-0h111u.js";
|
|
4
4
|
import { createCipheriv, createDecipheriv, randomBytes } from "node:crypto";
|
|
5
5
|
import { createMemoryState } from "@chat-adapter/state-memory";
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { h as startSpan } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { $ as loadTurnCheckpoint, $i as escapeSlackMrkdwnText, $o as configValueSchema, A as latestConversationMessageSeq, An as trimTrailingAssistantMessages, Br as reviewItemNeedsSomeone, Cr as getReviewItem, D as estimateConversationMessagesTokens, Da as withSlackRetries, Do as readConversationEventPageAfter, E as buildConversationContext, Eo as readConversationEventPage, Er as listWaitingConversations, F as turnHasReply, Fo as getSlackFileId, Fr as canUserReadReviewItem, H as PluginCredentialFailureError, Hn as createUserTokenStore, I as upsertConversationMessage, Ir as isOnlyAssignee, Jo as lookupSlackUserNames, K as AuthorizationFlowDisabledError, Lo as readAttachmentVisionSummary, M as normalizeConversationText, Mr as canActOnReviewItem, N as recordDeliveredAssistantMessage, O as getConversationMessageSlackTs, Oo as readConversationEventPageAround, P as trimConversationMessages, Po as notInheritedByForkChild, Pt as moveIdleConversationDestination, Ro as recordSlackAttachment, S as resolveConversationTitle, Sa as getSlackClient, So as viewerMarksFromParticipant, Ta as normalizeSlackConversationId, To as readLatestConversationBrief, Tr as listReplyActionItems, Uo as listConversationAnnotations, Wn as webActorUserIds, Wo as listConversationAnnotationsById, X as clearPendingAuth, Xt as buildTurnErrorResponse, Zo as createPluginCache, _o as conversationHasParticipantUser, a as loadProjection, aa as addReactionToMessage, an as getAssistantReplyText, at as failTurnRecord, b as persistConversationMessages, bo as conversationPinnedForUser, ct as recordTurnSummary, d as recordAuthorizationCompleted, da as postSlackMessage, ea as formatSlackLink, et as lostWorkerBeforeFirstSave, fa as removeReactionFromMessage, fo as createPluginLogger, go as readConversationAccessFromSql, h as recordSubscribedReplyRoute, ho as createConversationAccessReader, i as loadConversationProjection, ia as truncateStatusText, it as completeTurnRecord, j as markConversationMessage, jo as buildSentryConversationUrl, k as isHumanConversationMessage, kr as takeReviewItem, mn as persistWithRetry, mo as canAddConversationMessages, n as commitMessages, na as normalizeSlackStatusText, nr as getPlugins, nt as saveTurnCheckpoint, o as loadTurnProjection, oa as deleteSlackMessage, ot as getTurnRecord, qo as lookupSlackUser, rt as abandonTurnRecord, sa as getSlackMessagePermalink, st as listTurnSummaries, t as commitAcceptedReply, ti as cancelSubscriptions, ts as piMessageFromHistoryItem, tt as pauseLostWorkerTurn, v as hydrateConversationMessages, va as SlackActionError, vo as conversationIsMemberRoot, w as fallbackShortTitle, wa as isDmChannel, xa as getHeaderString, xo as conversationViewerMarks, y as persistConversationMessageWindow, ya as downloadPrivateSlackFile, yi as getDashboardConversationLink, yo as conversationIsNotUnsubscribedRoot, yr as closeReviewItem, zo as slackAttachmentsVersionQuery, zt as releaseInboundMessage } from "./projection-
|
|
3
|
-
import { A as estimateTextTokens, E as resolveGatewayModel, K as isProviderRetryError, L as escapeXml, c as getSlackClientSecret, i as getChatConfig, j as textCharsForTokens, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, s as getSlackClientId, v as normalizeSlackEmojiName } from "./config-
|
|
4
|
-
import { E as withSpan, G as isRecord, K as toOptionalNumber, S as setTags, T as withLogContext, b as setSpanAttributes, f as logError, h as logWarn, m as logInfo, n as createChatSdkLogger, o as getActiveTraceContext, p as logException, q as toOptionalString, s as getActiveTraceId, t as buildTurnFailureResponse, y as setSentryUser } from "./logging-
|
|
5
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { $ as loadTurnCheckpoint, $i as escapeSlackMrkdwnText, $o as configValueSchema, A as latestConversationMessageSeq, An as trimTrailingAssistantMessages, Br as reviewItemNeedsSomeone, Cr as getReviewItem, D as estimateConversationMessagesTokens, Da as withSlackRetries, Do as readConversationEventPageAfter, E as buildConversationContext, Eo as readConversationEventPage, Er as listWaitingConversations, F as turnHasReply, Fo as getSlackFileId, Fr as canUserReadReviewItem, H as PluginCredentialFailureError, Hn as createUserTokenStore, I as upsertConversationMessage, Ir as isOnlyAssignee, Jo as lookupSlackUserNames, K as AuthorizationFlowDisabledError, Lo as readAttachmentVisionSummary, M as normalizeConversationText, Mr as canActOnReviewItem, N as recordDeliveredAssistantMessage, O as getConversationMessageSlackTs, Oo as readConversationEventPageAround, P as trimConversationMessages, Po as notInheritedByForkChild, Pt as moveIdleConversationDestination, Ro as recordSlackAttachment, S as resolveConversationTitle, Sa as getSlackClient, So as viewerMarksFromParticipant, Ta as normalizeSlackConversationId, To as readLatestConversationBrief, Tr as listReplyActionItems, Uo as listConversationAnnotations, Wn as webActorUserIds, Wo as listConversationAnnotationsById, X as clearPendingAuth, Xt as buildTurnErrorResponse, Zo as createPluginCache, _o as conversationHasParticipantUser, a as loadProjection, aa as addReactionToMessage, an as getAssistantReplyText, at as failTurnRecord, b as persistConversationMessages, bo as conversationPinnedForUser, ct as recordTurnSummary, d as recordAuthorizationCompleted, da as postSlackMessage, ea as formatSlackLink, et as lostWorkerBeforeFirstSave, fa as removeReactionFromMessage, fo as createPluginLogger, go as readConversationAccessFromSql, h as recordSubscribedReplyRoute, ho as createConversationAccessReader, i as loadConversationProjection, ia as truncateStatusText, it as completeTurnRecord, j as markConversationMessage, jo as buildSentryConversationUrl, k as isHumanConversationMessage, kr as takeReviewItem, mn as persistWithRetry, mo as canAddConversationMessages, n as commitMessages, na as normalizeSlackStatusText, nr as getPlugins, nt as saveTurnCheckpoint, o as loadTurnProjection, oa as deleteSlackMessage, ot as getTurnRecord, qo as lookupSlackUser, rt as abandonTurnRecord, sa as getSlackMessagePermalink, st as listTurnSummaries, t as commitAcceptedReply, ti as cancelSubscriptions, ts as piMessageFromHistoryItem, tt as pauseLostWorkerTurn, v as hydrateConversationMessages, va as SlackActionError, vo as conversationIsMemberRoot, w as fallbackShortTitle, wa as isDmChannel, xa as getHeaderString, xo as conversationViewerMarks, y as persistConversationMessageWindow, ya as downloadPrivateSlackFile, yi as getDashboardConversationLink, yo as conversationIsNotUnsubscribedRoot, yr as closeReviewItem, zo as slackAttachmentsVersionQuery, zt as releaseInboundMessage } from "./projection-BgwEE36_.js";
|
|
3
|
+
import { A as estimateTextTokens, E as resolveGatewayModel, K as isProviderRetryError, L as escapeXml, c as getSlackClientSecret, i as getChatConfig, j as textCharsForTokens, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, s as getSlackClientId, v as normalizeSlackEmojiName } from "./config-BOByVnxe.js";
|
|
4
|
+
import { E as withSpan, G as isRecord, K as toOptionalNumber, S as setTags, T as withLogContext, b as setSpanAttributes, f as logError, h as logWarn, m as logInfo, n as createChatSdkLogger, o as getActiveTraceContext, p as logException, q as toOptionalString, s as getActiveTraceId, t as buildTurnFailureResponse, y as setSentryUser } from "./logging-CJTi5niy.js";
|
|
5
|
+
import { t as JUNIOR_VERSION } from "./version-DcZ40a0g.js";
|
|
6
6
|
import { f as parseSlackTeamId, h as parseSlackMessageTs, i as isActorUserId, n as createSlackActor, o as isUserActor, r as createSlackResumeActor, s as parseActorUserId, t as createActor, u as parseSlackChannelId } from "./actor-6jsm_v96.js";
|
|
7
|
-
import { A as setFirstConversationLocation, C as deliversFinalText, E as postsRunNotices, F as saveActorAvatar, G as parseSessionSource, K as addAgentTurnUsage, O as conversationKindFromRow, P as resolveActorIdentityId, S as withConversationMutationLock, T as isTopLevelKind, U as claimProviderConversation, W as getConversationIdByProviderConversation, X as hasAgentTurnUsage, Y as agentTurnUsageSchema, Z as resolveRootConversationId, _ as setArchivedAt, a as getConversationStore, et as nextDetailVersion, g as readConversationTrees, it as requireSlackDestination, k as locationFromRow, m as conversationAncestors, nt as createSlackDestination, o as getDb, p as withConversationEventLock, r as getConversationEventStore, s as getSqlExecutor, v as loadConversationSlackTenantIds, y as lastMessageAtSql } from "./db-
|
|
8
|
-
import { A as juniorConversations, D as juniorCodeChanges, E as juniorConversationAnnotations, M as juniorUsers, N as juniorDestinations, b as juniorConversationBriefs, j as juniorIdentities, l as juniorReviewItems, s as juniorReviewItemConversations, v as juniorConversationParticipants, w as juniorConversationEvents } from "./executor-
|
|
7
|
+
import { A as setFirstConversationLocation, C as deliversFinalText, E as postsRunNotices, F as saveActorAvatar, G as parseSessionSource, K as addAgentTurnUsage, O as conversationKindFromRow, P as resolveActorIdentityId, S as withConversationMutationLock, T as isTopLevelKind, U as claimProviderConversation, W as getConversationIdByProviderConversation, X as hasAgentTurnUsage, Y as agentTurnUsageSchema, Z as resolveRootConversationId, _ as setArchivedAt, a as getConversationStore, et as nextDetailVersion, g as readConversationTrees, it as requireSlackDestination, k as locationFromRow, m as conversationAncestors, nt as createSlackDestination, o as getDb, p as withConversationEventLock, r as getConversationEventStore, s as getSqlExecutor, v as loadConversationSlackTenantIds, y as lastMessageAtSql } from "./db-CoMNr2Zm.js";
|
|
8
|
+
import { A as juniorConversations, D as juniorCodeChanges, E as juniorConversationAnnotations, M as juniorUsers, N as juniorDestinations, b as juniorConversationBriefs, j as juniorIdentities, l as juniorReviewItems, s as juniorReviewItemConversations, v as juniorConversationParticipants, w as juniorConversationEvents } from "./executor-C-m8VrzX.js";
|
|
9
9
|
import { _ as instructionProvenanceFor, a as KNOWN_CONVERSATION_EVENT_TYPES, h as contextProvenance, i as isVisionImageMediaType, r as detectImageMediaType } from "./media-BepyEUNm.js";
|
|
10
|
-
import { d as actorLogContext, f as credentialContextForActor } from "./registry-
|
|
11
|
-
import { C as createSlackReviewItemShow, Ct as conversationReadPositionQuery, F as resolveSlackChannelIdFromMessage, H as resolveDestinationVisibility, I as resolveSlackChannelIdFromThreadId, L as checkSlackChannelReadAccess, Lt as shouldEmitDevAgentTrace, N as parseSlackThreadId, Ot as throwApiError, P as readSlackRawMessageContext, Pt as RetryableDeliveryError, R as joinPublicChannelForRead, S as renderBlockText, V as listThreadReplies, Z as readConversationSourceTask, _t as decodeInputImages, a as buildAuthPauseResponse, ft as createAndEnqueueConversation, ht as webActorFromUser, j as runWithSlackInstallation, kt as listedConversation, lt as acceptsWebMessages, m as latestProgressStatus, mt as recordWebConversationActivity, n as executeAgentRun, ot as deliverReviewItemChange, pt as createConversationId, t as createAgentRunner, ut as appendAndEnqueueWebMessage, x as renderAttachmentText, xt as storeAttachment, z as getConversationInfo } from "./agent-runner-
|
|
12
|
-
import { a as EVENT_SYSTEM_ACTOR, c as completeDecision, o as isEventConversationMessage, u as completeText } from "./prompt-
|
|
10
|
+
import { d as actorLogContext, f as credentialContextForActor } from "./registry-9XwqSnM-.js";
|
|
11
|
+
import { C as createSlackReviewItemShow, Ct as conversationReadPositionQuery, F as resolveSlackChannelIdFromMessage, H as resolveDestinationVisibility, I as resolveSlackChannelIdFromThreadId, L as checkSlackChannelReadAccess, Lt as shouldEmitDevAgentTrace, N as parseSlackThreadId, Ot as throwApiError, P as readSlackRawMessageContext, Pt as RetryableDeliveryError, R as joinPublicChannelForRead, S as renderBlockText, V as listThreadReplies, Z as readConversationSourceTask, _t as decodeInputImages, a as buildAuthPauseResponse, ft as createAndEnqueueConversation, ht as webActorFromUser, j as runWithSlackInstallation, kt as listedConversation, lt as acceptsWebMessages, m as latestProgressStatus, mt as recordWebConversationActivity, n as executeAgentRun, ot as deliverReviewItemChange, pt as createConversationId, t as createAgentRunner, ut as appendAndEnqueueWebMessage, x as renderAttachmentText, xt as storeAttachment, z as getConversationInfo } from "./agent-runner-Q9GkoerG.js";
|
|
12
|
+
import { a as EVENT_SYSTEM_ACTOR, c as completeDecision, o as isEventConversationMessage, u as completeText } from "./prompt-DXc9DYT9.js";
|
|
13
13
|
import { r as acquireActiveLock } from "./locks-D-0h111u.js";
|
|
14
|
-
import { f as identityAvatarUrl, h as readUserAvatarUrls } from "./viewer-
|
|
15
|
-
import { a as getStateAdapter, o as getStateValues, s as setStateValues } from "./state-
|
|
16
|
-
import {
|
|
14
|
+
import { f as identityAvatarUrl, h as readUserAvatarUrls } from "./viewer-CgiGjW10.js";
|
|
15
|
+
import { a as getStateAdapter, o as getStateValues, s as setStateValues } from "./state-CSuA2J1V.js";
|
|
16
|
+
import { K as readMessageAttachments, d as conversationEventPageSchema, l as conversationDetailReportSchema } from "./conversation-DCkzvxqB.js";
|
|
17
17
|
import { t as readJuniorSecret } from "./secrets-DebYU866.js";
|
|
18
|
-
import { C as legacyWebMailboxMetadataSchema, b as resolveMailboxTurnWork, l as withoutSavedSteeringMessages, n as loadReviewItemInput, o as buildSteeringPiMessage, p as isExperimentalFeatureEnabled, r as savedInputInstruction } from "./prompt-input-
|
|
19
|
-
import { C as dropOwnUnreadLoopReplies, E as stopChildAgentsOf, T as stopChildAgentsBelow, c as listConversationWork, l as readLastUserMessageAtByConversation, s as isConversationWorkDone } from "./warmup-
|
|
20
|
-
import { l as getVercelConversationWorkQueue, w as getTurnRequestDeadline } from "./background-compaction-queue-
|
|
21
|
-
import { c as conversationSubtreeColumns, o as skipInputAfterConversationStop, r as markConversationsStopped, s as conversationSubtree } from "./session-stop-
|
|
22
|
-
import { T as getChildAgentLabel, a as ConversationTurnBoundaryError, c as TurnInputDeferredError, d as isTurnInputCommitLostError, f as isTurnInputDeferredError, g as startActiveTurn, h as markTurnFailed, i as getTurnUserSlackMessageTs, l as getConversationTurnBoundaryError, m as markTurnCompleted,
|
|
23
|
-
import { S as sendSlackReply, T as recordFinishedTurnForAutomatedLimit, x as resolveSlackReplyTarget, y as maybePostAutomatedTurnLimitNotice } from "./notification-
|
|
24
|
-
import { E as stopConversationWork, T as steerWebPendingMessages, _ as getConversationWorkState, a as cancelHumanFacingPendingMessages, g as getConversation, h as ensureConversationWake, r as appendAndEnqueueInboundMessage, s as claimInboundMessage } from "./store-
|
|
25
|
-
import { a as getPersistedThreadState, c as coerceThreadConversationState, i as getPersistedSandboxState, n as resolveTurnSessionRouting, o as persistThreadRuntimeState, r as getLocationConfigurationService, s as persistThreadStateById, t as resolveConversationRouting } from "./turn-session-routing-
|
|
18
|
+
import { C as legacyWebMailboxMetadataSchema, b as resolveMailboxTurnWork, l as withoutSavedSteeringMessages, n as loadReviewItemInput, o as buildSteeringPiMessage, p as isExperimentalFeatureEnabled, r as savedInputInstruction } from "./prompt-input-BUr4J9RO.js";
|
|
19
|
+
import { C as dropOwnUnreadLoopReplies, E as stopChildAgentsOf, T as stopChildAgentsBelow, c as listConversationWork, l as readLastUserMessageAtByConversation, s as isConversationWorkDone } from "./warmup-CwKbxQLl.js";
|
|
20
|
+
import { l as getVercelConversationWorkQueue, w as getTurnRequestDeadline } from "./background-compaction-queue-BZhGFOK6.js";
|
|
21
|
+
import { c as conversationSubtreeColumns, o as skipInputAfterConversationStop, r as markConversationsStopped, s as conversationSubtree } from "./session-stop-D4i7e6iT.js";
|
|
22
|
+
import { T as getChildAgentLabel, a as ConversationTurnBoundaryError, c as TurnInputDeferredError, d as isTurnInputCommitLostError, dt as buildDeterministicTurnId, f as isTurnInputDeferredError, g as startActiveTurn, h as markTurnFailed, i as getTurnUserSlackMessageTs, l as getConversationTurnBoundaryError, m as markTurnCompleted, o as CooperativeTurnYieldError, p as markTurnClosed, r as getTurnUserReplyAttachmentContext, s as TurnInputCommitLostError, t as getTurnUserMessage, u as isCooperativeTurnYieldError, ut as buildDeterministicAssistantMessageId, v as getTurnLifecycle } from "./turn-user-message-BSPmkm7X.js";
|
|
23
|
+
import { S as sendSlackReply, T as recordFinishedTurnForAutomatedLimit, x as resolveSlackReplyTarget, y as maybePostAutomatedTurnLimitNotice } from "./notification-Bv25xbj0.js";
|
|
24
|
+
import { E as stopConversationWork, T as steerWebPendingMessages, _ as getConversationWorkState, a as cancelHumanFacingPendingMessages, g as getConversation, h as ensureConversationWake, r as appendAndEnqueueInboundMessage, s as claimInboundMessage } from "./store-B1zepKG8.js";
|
|
25
|
+
import { a as getPersistedThreadState, c as coerceThreadConversationState, i as getPersistedSandboxState, n as resolveTurnSessionRouting, o as persistThreadRuntimeState, r as getLocationConfigurationService, s as persistThreadStateById, t as resolveConversationRouting } from "./turn-session-routing-VXDVXLRl.js";
|
|
26
26
|
import { a as isEmptyUserInputAnswer, o as normalizeUserInputAnswer } from "./user-input-request-CXNIov9n.js";
|
|
27
|
-
import { a as AgentRunError, i as supersedeTurnForInput, o as executeTurn, t as cancelSignInWait } from "./turn-cancel-
|
|
28
|
-
import { a as getTurnAuthorization, c as getWebAuthorization, i as wakePausedTurn, n as getPausedTurnRequest, t as createPausedTurns } from "./turn-wake-
|
|
27
|
+
import { a as AgentRunError, i as supersedeTurnForInput, o as executeTurn, t as cancelSignInWait } from "./turn-cancel-l460pfGW.js";
|
|
28
|
+
import { a as getTurnAuthorization, c as getWebAuthorization, i as wakePausedTurn, n as getPausedTurnRequest, t as createPausedTurns } from "./turn-wake-DVFVXyhX.js";
|
|
29
29
|
import { n as canShareTurn, t as canJoinTurn } from "./attempt-selection-ClP3MMPr.js";
|
|
30
30
|
import { p as webMessageId } from "./reporting-window-DopzcOHh.js";
|
|
31
|
-
import { D as readAutomationTitlesByConversationId, _ as markDispatchRunning, a as getDispatchConversationId, c as getDispatchRecord, d as isTerminalDispatchStatus, g as markDispatchFailed, h as markDispatchCompleted, l as getDispatchTurnId, m as markDispatchBlocked, n as claimDispatchMailboxAppend, p as markDispatchAwaitingResume, r as confirmDispatchMailboxAppend, s as getDispatchInputMessageId } from "./store-
|
|
32
|
-
import { l as conversationPendingMessagesReportSchema, n as conversationFeedSchema, p as healthReportSchema, t as conversationFeedBriefSchema } from "./conversation-feed-
|
|
33
|
-
import { i as enqueueAgentInvocationResult, n as createDeliverToParent, s as withAgentInvocationResultActors, t as createChildConversationWorker } from "./result-
|
|
34
|
-
import { a as withTurnSpan, i as turnInputTelemetry, n as createConversationTurnWorker, o as canPauseConversationDelivery, r as getTurnInputSpanAttributes } from "./conversation-turn-
|
|
35
|
-
import { t as bindMessageAgent } from "./message-
|
|
36
|
-
import { r as readConversationLineage, t as bindSpawnAgent } from "./spawn-
|
|
37
|
-
import { n as scheduleSessionCompletedPluginTasks } from "./task-runner-
|
|
38
|
-
import { a as requireTurnFailureEventId, c as buildDeliveredTurnStatePatch, i as getAgentTurnDiagnosticsAttributes, l as loadPendingMessageCards, n as loadThreadContextTrimFloor, o as completeAuthPauseTurn, r as finalizeFailedTurnReplyWithEvent, s as persistAuthPauseTurnState, t as buildTurnThreadContext } from "./thread-context-
|
|
31
|
+
import { D as readAutomationTitlesByConversationId, _ as markDispatchRunning, a as getDispatchConversationId, c as getDispatchRecord, d as isTerminalDispatchStatus, g as markDispatchFailed, h as markDispatchCompleted, l as getDispatchTurnId, m as markDispatchBlocked, n as claimDispatchMailboxAppend, p as markDispatchAwaitingResume, r as confirmDispatchMailboxAppend, s as getDispatchInputMessageId } from "./store-DrA17Fbz.js";
|
|
32
|
+
import { l as conversationPendingMessagesReportSchema, n as conversationFeedSchema, p as healthReportSchema, t as conversationFeedBriefSchema } from "./conversation-feed-CMA12Rjs.js";
|
|
33
|
+
import { i as enqueueAgentInvocationResult, n as createDeliverToParent, s as withAgentInvocationResultActors, t as createChildConversationWorker } from "./result-C2Vn8QGn.js";
|
|
34
|
+
import { a as withTurnSpan, i as turnInputTelemetry, n as createConversationTurnWorker, o as canPauseConversationDelivery, r as getTurnInputSpanAttributes } from "./conversation-turn-D9qvcDX6.js";
|
|
35
|
+
import { t as bindMessageAgent } from "./message-Q6_5DAWR.js";
|
|
36
|
+
import { r as readConversationLineage, t as bindSpawnAgent } from "./spawn-6cX6xE9G.js";
|
|
37
|
+
import { n as scheduleSessionCompletedPluginTasks } from "./task-runner-CT4M8oDz.js";
|
|
38
|
+
import { a as requireTurnFailureEventId, c as buildDeliveredTurnStatePatch, i as getAgentTurnDiagnosticsAttributes, l as loadPendingMessageCards, n as loadThreadContextTrimFloor, o as completeAuthPauseTurn, r as finalizeFailedTurnReplyWithEvent, s as persistAuthPauseTurnState, t as buildTurnThreadContext } from "./thread-context-DnqUkbzN.js";
|
|
39
39
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
40
40
|
import * as z from "zod";
|
|
41
41
|
import { and, asc, count, desc, eq, gt, inArray, isNotNull, isNull, lte, ne, or, sql } from "drizzle-orm";
|
|
@@ -8158,7 +8158,9 @@ async function readConversationAgentTree(conversation, readAccess) {
|
|
|
8158
8158
|
return {
|
|
8159
8159
|
conversationId: id,
|
|
8160
8160
|
kind,
|
|
8161
|
-
label: agent?.title ?? agent?.agentName ?? childLabel(kind)
|
|
8161
|
+
label: agent?.title ?? agent?.agentName ?? childLabel(kind),
|
|
8162
|
+
...agent?.agentType ? { agentType: agent.agentType } : void 0,
|
|
8163
|
+
...agent?.fork ? { fork: true } : void 0
|
|
8162
8164
|
};
|
|
8163
8165
|
}));
|
|
8164
8166
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Bt as requestAnotherSlice$1, Ct as deadLetterAttempt$1, Dt as getConversationWorkState$1, Et as getConversation$1, Ht as startConversationWork$1, It as recordAttemptFailure$1, Lt as recordConversationRetry$1, Mt as listActiveConversationIds$1, Nt as markConversationWorkEnqueued$1, Rt as releaseConversationWork$1, Tt as dropPendingMessages$1, Ut as steerWebPendingMessages$1, Vt as requestConversationWork$1, Wt as stopConversationWork$1, _t as claimInboundMessage$1, bt as completeConversationStop$1, dt as ackMessages$1, ft as appendExclusiveInboundMessage, gt as checkInConversationWork$1, ht as cancelHumanFacingPendingMessages$1, kt as hasRunnableConversationWork, mt as beginConversationResume$1, pt as appendInboundMessage, vt as clearConsumedConversationWake$1, wt as drainConversationMailbox$1, xt as completeConversationWork$1, yt as clearExpiredConversationLease$1, zt as releaseInboundMessage } from "./projection-
|
|
2
|
-
import { a as getConversationStore } from "./db-
|
|
3
|
-
import "./background-compaction-queue-
|
|
1
|
+
import { Bt as requestAnotherSlice$1, Ct as deadLetterAttempt$1, Dt as getConversationWorkState$1, Et as getConversation$1, Ht as startConversationWork$1, It as recordAttemptFailure$1, Lt as recordConversationRetry$1, Mt as listActiveConversationIds$1, Nt as markConversationWorkEnqueued$1, Rt as releaseConversationWork$1, Tt as dropPendingMessages$1, Ut as steerWebPendingMessages$1, Vt as requestConversationWork$1, Wt as stopConversationWork$1, _t as claimInboundMessage$1, bt as completeConversationStop$1, dt as ackMessages$1, ft as appendExclusiveInboundMessage, gt as checkInConversationWork$1, ht as cancelHumanFacingPendingMessages$1, kt as hasRunnableConversationWork, mt as beginConversationResume$1, pt as appendInboundMessage, vt as clearConsumedConversationWake$1, wt as drainConversationMailbox$1, xt as completeConversationWork$1, yt as clearExpiredConversationLease$1, zt as releaseInboundMessage } from "./projection-BgwEE36_.js";
|
|
2
|
+
import { a as getConversationStore } from "./db-CoMNr2Zm.js";
|
|
3
|
+
import "./background-compaction-queue-BZhGFOK6.js";
|
|
4
4
|
// src/chat/task-execution/store.ts
|
|
5
5
|
function metadataStore(options) {
|
|
6
6
|
return options.conversationStore ?? getConversationStore();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { $i as escapeSlackMrkdwnText, Ci as getDashboardTaskLink, Ei as ToolInputError, ca as openSlackDirectMessage, da as postSlackMessage, ea as formatSlackLink, vi as JUNIOR_THREAD_STATE_TTL_MS, w as fallbackShortTitle } from "./projection-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { _ as runBestEffort, h as logWarn } from "./logging-
|
|
4
|
-
import { J as agentTurnTotalTokens, o as getDb, q as agentTurnCostUsd } from "./db-
|
|
5
|
-
import { A as juniorConversations, d as juniorAutomationVersions, f as juniorAutomations, u as juniorAutomationRuns } from "./executor-
|
|
6
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
7
|
-
import { a as getStateAdapter } from "./state-
|
|
8
|
-
import { u as automationEventCatalog, v as registeredEventTriggerProblems } from "./turn-session-routing-
|
|
9
|
-
import { B as automationTaskColumns, H as automationTaskSchema, M as scheduledAutomationSchema, S as automationVersionSchema, V as automationTaskDescription, k as eventAutomationSchema, z as automationSkillNameSchema } from "./automation-
|
|
1
|
+
import { $i as escapeSlackMrkdwnText, Ci as getDashboardTaskLink, Ei as ToolInputError, ca as openSlackDirectMessage, da as postSlackMessage, ea as formatSlackLink, vi as JUNIOR_THREAD_STATE_TTL_MS, w as fallbackShortTitle } from "./projection-BgwEE36_.js";
|
|
2
|
+
import { n as botConfig } from "./config-BOByVnxe.js";
|
|
3
|
+
import { _ as runBestEffort, h as logWarn } from "./logging-CJTi5niy.js";
|
|
4
|
+
import { J as agentTurnTotalTokens, o as getDb, q as agentTurnCostUsd } from "./db-CoMNr2Zm.js";
|
|
5
|
+
import { A as juniorConversations, d as juniorAutomationVersions, f as juniorAutomations, u as juniorAutomationRuns } from "./executor-C-m8VrzX.js";
|
|
6
|
+
import { h as credentialSubjectSchema } from "./registry-9XwqSnM-.js";
|
|
7
|
+
import { a as getStateAdapter } from "./state-CSuA2J1V.js";
|
|
8
|
+
import { u as automationEventCatalog, v as registeredEventTriggerProblems } from "./turn-session-routing-VXDVXLRl.js";
|
|
9
|
+
import { B as automationTaskColumns, H as automationTaskSchema, M as scheduledAutomationSchema, S as automationVersionSchema, V as automationTaskDescription, k as eventAutomationSchema, z as automationSkillNameSchema } from "./automation-Cn8qmbdr.js";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
11
11
|
import * as z from "zod";
|
|
12
12
|
import { and, asc, count, desc, eq, gte, inArray, isNotNull, isNull, lte, max, ne, or, sql } from "drizzle-orm";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as logWarn } from "./logging-
|
|
2
|
-
import { C as queueCallback, S as verifyQueueMessage, T as getQueueProvider, b as QUEUE_SIGNATURE_MAX_AGE_MS, x as signQueueMessage } from "./background-compaction-queue-
|
|
1
|
+
import { h as logWarn } from "./logging-CJTi5niy.js";
|
|
2
|
+
import { C as queueCallback, S as verifyQueueMessage, T as getQueueProvider, b as QUEUE_SIGNATURE_MAX_AGE_MS, x as signQueueMessage } from "./background-compaction-queue-BZhGFOK6.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
// src/chat/plugins/task-queue.ts
|
|
@@ -60,7 +60,7 @@ function pluginTaskCallback() {
|
|
|
60
60
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
61
61
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
62
62
|
run: async (message) => {
|
|
63
|
-
const { processPluginTask } = await import("./task-runner-
|
|
63
|
+
const { processPluginTask } = await import("./task-runner-CT4M8oDz.js").then((n) => n.r);
|
|
64
64
|
await processPluginTask(message);
|
|
65
65
|
},
|
|
66
66
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { $a as createPluginModel, Co as createPluginConversationEvents, Di as createPluginState, Dn as normalizeToolNameFromResult, En as isToolResultMessage, Qa as createPluginEmbedder, Tn as isToolResultError, Zo as createPluginCache, ar as coreTaskRegistrations, do as createPluginModelCostRecorder, fo as createPluginLogger, gn as getPiMessageRole, kn as stripRuntimeTurnContext, nr as getPlugins, ot as getTurnRecord, v as hydrateConversationMessages, xn as instructionTextForProjection } from "./projection-
|
|
3
|
-
import { E as withSpan } from "./logging-
|
|
2
|
+
import { $a as createPluginModel, Co as createPluginConversationEvents, Di as createPluginState, Dn as normalizeToolNameFromResult, En as isToolResultMessage, Qa as createPluginEmbedder, Tn as isToolResultError, Zo as createPluginCache, ar as coreTaskRegistrations, do as createPluginModelCostRecorder, fo as createPluginLogger, gn as getPiMessageRole, kn as stripRuntimeTurnContext, nr as getPlugins, ot as getTurnRecord, v as hydrateConversationMessages, xn as instructionTextForProjection } from "./projection-BgwEE36_.js";
|
|
3
|
+
import { E as withSpan } from "./logging-CJTi5niy.js";
|
|
4
4
|
import { h as parseSlackMessageTs } from "./actor-6jsm_v96.js";
|
|
5
|
-
import { a as getConversationStore, o as getDb } from "./db-
|
|
5
|
+
import { a as getConversationStore, o as getDb } from "./db-CoMNr2Zm.js";
|
|
6
6
|
import { v as sameActorIdentity } from "./media-BepyEUNm.js";
|
|
7
|
-
import { i as readActorIdentity } from "./viewer-
|
|
8
|
-
import { a as getStateAdapter } from "./state-
|
|
9
|
-
import { a as getPersistedThreadState, c as coerceThreadConversationState, t as resolveConversationRouting } from "./turn-session-routing-
|
|
10
|
-
import { c as getDispatchRecord } from "./store-
|
|
11
|
-
import { i as pluginTaskParamsSchema, r as pluginTaskId, s as sendVercelPluginTask } from "./task-queue-
|
|
7
|
+
import { i as readActorIdentity } from "./viewer-CgiGjW10.js";
|
|
8
|
+
import { a as getStateAdapter } from "./state-CSuA2J1V.js";
|
|
9
|
+
import { a as getPersistedThreadState, c as coerceThreadConversationState, t as resolveConversationRouting } from "./turn-session-routing-VXDVXLRl.js";
|
|
10
|
+
import { c as getDispatchRecord } from "./store-DrA17Fbz.js";
|
|
11
|
+
import { i as pluginTaskParamsSchema, r as pluginTaskId, s as sendVercelPluginTask } from "./task-queue-D1rXWfFN.js";
|
|
12
12
|
import { pluginRunContextSchema } from "@sentry/junior-plugin-api";
|
|
13
13
|
// src/chat/plugins/task-runner.ts
|
|
14
14
|
/**
|