@sentry/junior 0.227.0 → 0.228.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/{agent-hooks-bEwEJhlg.js → agent-hooks-DUQ3ASdp.js} +18 -10
- package/dist/{agent-runner-BGDSjciH.js → agent-runner-CIesujf5.js} +27 -22
- package/dist/api/schema.d.ts +139 -27
- package/dist/api/schema.js +2 -2
- package/dist/api.js +71 -54
- package/dist/{app-CjRIKZb5.d.ts → app-BRZB3MuD.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +94 -28
- package/dist/{briefs-BkM_ZW4B.js → briefs-BTrVMqUg.js} +4 -4
- package/dist/{catalog-runtime-Cw9V2jpn.js → catalog-runtime-NOBDOyJi.js} +1 -1
- package/dist/{checkpoint-oZYD3-Ar.js → checkpoint-CzN3gXoB.js} +6 -6
- package/dist/cli/chat.js +13 -13
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +1 -1
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-Pcxo3lGn.js → client-C6VUBzL_.js} +2 -2
- package/dist/{config-CYvEow1F.js → config-BLPaWN1Q.js} +2 -2
- package/dist/{conversation-BnhOMfEB.js → conversation-DOI6Y60M.js} +3 -2
- package/dist/{conversation-privacy-hQmyZbOC.js → conversation-privacy-DJ88ECSq.js} +1 -1
- package/dist/{credential-sync-CUGbiiCM.js → credential-sync-OKs419AB.js} +13 -13
- package/dist/{executor-BXMlFrV6.js → executor-DZVZBfmX.js} +1 -1
- package/dist/{history-nukv1YN8.d.ts → history-H-SI5Dej.d.ts} +1 -0
- package/dist/{images-8siTAUNW.js → images-D3x6EemU.js} +3 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-AI0_QAgc.js → job-queue-BuSPM0cX.js} +1 -1
- package/dist/{logging-BPBx6WF-.js → logging-Blgn76r3.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-authorization-Cq1GaLIP.js → oauth-authorization-t-NPqTNB.js} +1 -1
- package/dist/{oauth-callback-server-CnF03VYh.js → oauth-callback-server-BP7SgTcu.js} +2 -2
- package/dist/{pending-auth-CHUjr_6d.js → pending-auth-CXLwmDaG.js} +1 -1
- package/dist/{profile-upzC-wN1.js → profile-a5xmeUHf.js} +4 -4
- package/dist/{prompt-CZIQcPHy.js → prompt-9C-wUwwx.js} +1 -1
- package/dist/{registry-DM5aMhjm.js → registry-BUbczT2k.js} +1 -1
- package/dist/{resolve-sF6Lg7Ay.js → resolve-3PhWSiEF.js} +2 -2
- package/dist/{runner-Bu2wYpK8.js → runner-CsnuKcsq.js} +9 -9
- package/dist/{sandbox-egress-signals-Dgerhizb.js → sandbox-egress-signals-D34sI4J6.js} +1 -1
- package/dist/{schema-BSiwcvjm.js → schema-CXmCvVLn.js} +1 -1
- package/dist/{skills-CAI5s___.js → skills-CLgyYrgF.js} +2 -2
- package/dist/{spawn-DRK9TBgY.js → spawn-CS56i7Nm.js} +2 -2
- package/dist/{task-queue-iuDAqfZg.js → task-queue-C2sTDXqQ.js} +3 -3
- package/dist/{task-runner-S3QtH38c.js → task-runner-uSodiP4v.js} +9 -9
- package/dist/{thread-state-C_arVuaN.js → thread-state-BurqeqMv.js} +5 -5
- package/dist/{turn-failure-response-DarwGYgC.js → turn-failure-response-Bshcqa0a.js} +8 -8
- package/dist/{turn-lifecycle-CdiIejXH.js → turn-lifecycle-foKlVl_T.js} +1 -1
- package/dist/{turn-session-routing-DyLGd_wU.js → turn-session-routing-DDUMJ2GY.js} +1 -1
- package/dist/{validation-BMig74Zp.js → validation-DZc56dXw.js} +1 -1
- package/dist/{version-lhQSfLjx.js → version-y4cRp5Y2.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-r2lKYKJ2.js → web-authorization-BfVYx0t1.js} +6 -6
- package/dist/{web-input-BU-Fu7iq.js → web-input-B6FZlrgg.js} +50 -28
- package/dist/{work-B9koS8sW.js → work-Dy8sW9MZ.js} +7 -7
- package/dist/{worker-C_iJSRgG.js → worker-BH0RP7Hj.js} +5 -5
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema } from "./model-profile-BwU8mqwD.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { actorSchema, codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, objectFactFields, ownedObjectAnnotationSchema } from "@sentry/junior-plugin-api";
|
|
3
|
+
import { actorSchema, codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, objectFactFields, objectTypeSchema, ownedObjectAnnotationSchema } from "@sentry/junior-plugin-api";
|
|
4
4
|
//#region src/usage-schema.ts
|
|
5
5
|
const usageCostSchema = z.object({
|
|
6
6
|
input: z.number().finite().nonnegative().optional(),
|
|
@@ -734,7 +734,7 @@ function annotationCard(annotation) {
|
|
|
734
734
|
return value.kind === "object" ? value : {
|
|
735
735
|
...value,
|
|
736
736
|
kind: "object",
|
|
737
|
-
objectType: "item",
|
|
737
|
+
objectType: value.objectType ?? "item",
|
|
738
738
|
title: value.label
|
|
739
739
|
};
|
|
740
740
|
}
|
|
@@ -928,6 +928,7 @@ const conversationReportMessageEventDataSchema = z.object({
|
|
|
928
928
|
source: z.enum(["slack", "web"]).optional(),
|
|
929
929
|
actorIdentity: actorIdentitySchema.optional(),
|
|
930
930
|
eventType: z.string().min(1).optional(),
|
|
931
|
+
eventObjectType: objectTypeSchema.optional(),
|
|
931
932
|
explicitMention: z.boolean().optional(),
|
|
932
933
|
trustedSummary: z.string().min(1).optional(),
|
|
933
934
|
cards: z.array(messageCardSchema).optional(),
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Cn as createUserTokenStore, T as lookupSlackUserProfile, _ as putMcpStoredOAuthCredentials, d as deleteMcpAuthSession, dn as resolveBaseUrl, ft as getMcpProviderErrorAttributes, g as getMcpStoredOAuthCredentials, h as getMcpAuthSession, ln as formatProviderLabel, u as finalizeMcpAuthorization, un as parseOAuthStatePayload, x as resolvePluginOAuthAccount, yn as postSlackMessage } from "./agent-runner-
|
|
2
|
-
import { m as escapeXml } from "./client-
|
|
3
|
-
import { d as logException, h as runBestEffort, p as logWarn } from "./logging-
|
|
4
|
-
import { n as botConfig, o as getRuntimeMetadata } from "./config-
|
|
1
|
+
import { Cn as createUserTokenStore, T as lookupSlackUserProfile, _ as putMcpStoredOAuthCredentials, d as deleteMcpAuthSession, dn as resolveBaseUrl, ft as getMcpProviderErrorAttributes, g as getMcpStoredOAuthCredentials, h as getMcpAuthSession, ln as formatProviderLabel, u as finalizeMcpAuthorization, un as parseOAuthStatePayload, x as resolvePluginOAuthAccount, yn as postSlackMessage } from "./agent-runner-CIesujf5.js";
|
|
2
|
+
import { m as escapeXml } from "./client-C6VUBzL_.js";
|
|
3
|
+
import { d as logException, h as runBestEffort, p as logWarn } from "./logging-Blgn76r3.js";
|
|
4
|
+
import { n as botConfig, o as getRuntimeMetadata } from "./config-BLPaWN1Q.js";
|
|
5
5
|
import { g as parseSlackUserId } from "./context-0Et9iVSB.js";
|
|
6
|
-
import { U as getSlackClient,
|
|
6
|
+
import { U as getSlackClient, gn as upsertLinkedIdentity, hn as upsertIdentity, tn as getSqlExecutor } from "./agent-hooks-DUQ3ASdp.js";
|
|
7
7
|
import { i as homeDir } from "./package-discovery-7a9YqLhE.js";
|
|
8
|
-
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
10
|
-
import { t as discoverSkills } from "./skills-
|
|
11
|
-
import { B as recordAuthorizationCompleted, s as getTurnRecord, z as recordAuthenticationLinked } from "./checkpoint-
|
|
12
|
-
import { E as acquireActiveLock, w as getStateAdapter } from "./profile-
|
|
13
|
-
import { i as getConversationPendingAuth } from "./pending-auth-
|
|
14
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
15
|
-
import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-BUbczT2k.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-NOBDOyJi.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-CLgyYrgF.js";
|
|
11
|
+
import { B as recordAuthorizationCompleted, s as getTurnRecord, z as recordAuthenticationLinked } from "./checkpoint-CzN3gXoB.js";
|
|
12
|
+
import { E as acquireActiveLock, w as getStateAdapter } from "./profile-a5xmeUHf.js";
|
|
13
|
+
import { i as getConversationPendingAuth } from "./pending-auth-CXLwmDaG.js";
|
|
14
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BurqeqMv.js";
|
|
15
|
+
import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-BfVYx0t1.js";
|
|
16
16
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-CdCnu80W.js";
|
|
17
17
|
import path from "node:path";
|
|
18
18
|
import { z } from "zod";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as startSpanManual } from "./sentry-CgWZM_kV.js";
|
|
2
|
-
import "./config-
|
|
2
|
+
import "./config-BLPaWN1Q.js";
|
|
3
3
|
import { n as juniorDestinations, r as timestamptz } from "./destinations-BeBiJeEM.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { getTableColumns, sql } from "drizzle-orm";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { j as storeAttachment, k as readLiveAttachment } from "./agent-runner-
|
|
3
|
-
import {
|
|
4
|
-
import "./conversation-
|
|
2
|
+
import { j as storeAttachment, k as readLiveAttachment } from "./agent-runner-CIesujf5.js";
|
|
3
|
+
import { tn as getSqlExecutor } from "./agent-hooks-DUQ3ASdp.js";
|
|
4
|
+
import "./conversation-DOI6Y60M.js";
|
|
5
5
|
//#region src/chat/attachments/images.ts
|
|
6
6
|
var images_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
decodeInputImages: () => decodeInputImages,
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-
|
|
1
|
+
import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-Blgn76r3.js";
|
|
2
2
|
import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-CgWZM_kV.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-DJ88ECSq.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-BLvBjy_e.js";
|
|
5
5
|
//#region src/chat/sentry-payload-filter.ts
|
|
6
6
|
const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getChatConfig } from "./config-
|
|
1
|
+
import { a as getChatConfig } from "./config-BLPaWN1Q.js";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException, y as withScope } from "./sentry-CgWZM_kV.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-y4cRp5Y2.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { styleText } from "node:util";
|
|
5
5
|
import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { n as JuniorDashboardOptions } from "./app-BRZB3MuD.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-BT2l4We3.js";
|
|
3
3
|
//#region src/nitro.d.ts
|
|
4
4
|
export type JuniorNitroDashboardOptions = JuniorDashboardOptions;
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-Blgn76r3.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-7a9YqLhE.js";
|
|
3
|
-
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-
|
|
3
|
+
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-BuSPM0cX.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-egKWjgue.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-C2sTDXqQ.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-BKGOXca2.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as extractAssistantText } from "./checkpoint-
|
|
1
|
+
import { h as extractAssistantText } from "./checkpoint-CzN3gXoB.js";
|
|
2
2
|
//#region src/chat/runtime/turn.ts
|
|
3
3
|
/** Classified Slack turn failure carrying the owning Sentry capture outward. */
|
|
4
4
|
var ConversationTurnBoundaryError = class extends Error {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Cn as createUserTokenStore } from "./agent-runner-
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { Cn as createUserTokenStore } from "./agent-runner-CIesujf5.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-OKs419AB.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
//#region src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as abandonTurnRecord } from "./checkpoint-
|
|
1
|
+
import { i as abandonTurnRecord } from "./checkpoint-CzN3gXoB.js";
|
|
2
2
|
//#region src/chat/state/turn-id.ts
|
|
3
3
|
/** Build a stable turn identifier from a message ID. */
|
|
4
4
|
function buildDeterministicTurnId(messageId) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { w as toOptionalTrimmed } from "./client-
|
|
2
|
-
import { v as setSpanAttributes, y as setSpanStatus } from "./logging-
|
|
3
|
-
import { a as getChatConfig } from "./config-
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
1
|
+
import { w as toOptionalTrimmed } from "./client-C6VUBzL_.js";
|
|
2
|
+
import { v as setSpanAttributes, y as setSpanStatus } from "./logging-Blgn76r3.js";
|
|
3
|
+
import { a as getChatConfig } from "./config-BLPaWN1Q.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-NOBDOyJi.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { createMemoryState } from "@chat-adapter/state-memory";
|
|
7
7
|
import { createRedisState } from "@chat-adapter/state-redis";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as conversationBriefSchema, U as parseBriefInput, V as briefOutcomeStatusSchema } from "./conversation-
|
|
1
|
+
import { H as conversationBriefSchema, U as parseBriefInput, V as briefOutcomeStatusSchema } from "./conversation-DOI6Y60M.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/chat/briefs/generate.ts
|
|
4
4
|
const MAX_INPUT_CHARS = 6e4;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-
|
|
1
|
+
import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-Blgn76r3.js";
|
|
2
2
|
import { i as credentialUserSubjectId } from "./context-0Et9iVSB.js";
|
|
3
3
|
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-7a9YqLhE.js";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { v as setSpanAttributes, w as withSpan } from "./logging-
|
|
2
|
-
import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-
|
|
1
|
+
import { v as setSpanAttributes, w as withSpan } from "./logging-Blgn76r3.js";
|
|
2
|
+
import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-a5xmeUHf.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { FileSystem, Sandbox } from "@vercel/sandbox";
|
|
5
5
|
//#region src/chat/sandbox/resources.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { C as withLogContext, b as setTags, d as logException } from "./logging-
|
|
1
|
+
import { C as withLogContext, b as setTags, d as logException } from "./logging-Blgn76r3.js";
|
|
2
2
|
import { t as credentialContextForActor } from "./context-0Et9iVSB.js";
|
|
3
|
-
import {
|
|
4
|
-
import { M as messageCardText } from "./conversation-
|
|
5
|
-
import { A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, P as loadProjection, Y as persistConversationMessages, ct as markConversationMessage, ft as upsertConversationMessage, lt as normalizeConversationText, r as saveTurnCheckpoint, rt as buildConversationContext, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-
|
|
6
|
-
import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-
|
|
7
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
8
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
9
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
10
|
-
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-
|
|
3
|
+
import { $t as getConversationStore, Zt as getConversationEventStore } from "./agent-hooks-DUQ3ASdp.js";
|
|
4
|
+
import { M as messageCardText } from "./conversation-DOI6Y60M.js";
|
|
5
|
+
import { A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, P as loadProjection, Y as persistConversationMessages, ct as markConversationMessage, ft as upsertConversationMessage, lt as normalizeConversationText, r as saveTurnCheckpoint, rt as buildConversationContext, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-CzN3gXoB.js";
|
|
6
|
+
import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-t-NPqTNB.js";
|
|
7
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-uSodiP4v.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-foKlVl_T.js";
|
|
9
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BurqeqMv.js";
|
|
10
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-Bshcqa0a.js";
|
|
11
11
|
import { randomUUID } from "node:crypto";
|
|
12
12
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
13
13
|
//#region src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn as sandboxEgressSignalsResponseSchema } from "./agent-runner-
|
|
1
|
+
import { cn as sandboxEgressSignalsResponseSchema } from "./agent-runner-CIesujf5.js";
|
|
2
2
|
//#region src/chat/local/sandbox-egress-signals.ts
|
|
3
3
|
const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
|
|
4
4
|
const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as juniorDestinationKindSchema } from "./destinations-BeBiJeEM.js";
|
|
2
|
-
import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-
|
|
2
|
+
import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-DOI6Y60M.js";
|
|
3
3
|
import { a as fillUtcHours, c as sumUtcHoursIntoSixHours, i as fillUtcDays } from "./web-message-id-xPI_EFSC.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { codeChangeStateSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { p as logWarn } from "./logging-
|
|
2
|
+
import { p as logWarn } from "./logging-Blgn76r3.js";
|
|
3
3
|
import { s as skillRoots } from "./package-discovery-7a9YqLhE.js";
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-NOBDOyJi.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { Dn as toolInvocationDestination, En as actorFromRun } from "./agent-runner-
|
|
3
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { Dn as toolInvocationDestination, En as actorFromRun } from "./agent-runner-CIesujf5.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-Dy8sW9MZ.js";
|
|
4
4
|
//#region src/chat/agent-invocations/spawn.ts
|
|
5
5
|
var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
|
|
6
6
|
/** Bind a Run's Actor and credentials to new Agent invocations. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as logWarn } from "./logging-
|
|
2
|
-
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as createVercelQueueClient, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-
|
|
1
|
+
import { p as logWarn } from "./logging-Blgn76r3.js";
|
|
2
|
+
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as createVercelQueueClient, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-BuSPM0cX.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import { handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
@@ -109,7 +109,7 @@ function pluginTaskCallback() {
|
|
|
109
109
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
110
110
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
111
111
|
run: async (message) => {
|
|
112
|
-
const { processPluginTask } = await import("./task-runner-
|
|
112
|
+
const { processPluginTask } = await import("./task-runner-uSodiP4v.js").then((n) => n.r);
|
|
113
113
|
await processPluginTask(message);
|
|
114
114
|
},
|
|
115
115
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { p as logWarn } from "./logging-
|
|
2
|
+
import { p as logWarn } from "./logging-Blgn76r3.js";
|
|
3
3
|
import { b as parseSlackMessageTs, r as credentialSubjectSchema } from "./context-0Et9iVSB.js";
|
|
4
|
-
import { $t as
|
|
5
|
-
import { E as juniorConversations, s as juniorAutomationExecutions } from "./executor-
|
|
6
|
-
import { nt as sameActorIdentity } from "./conversation-
|
|
7
|
-
import { C as isToolResultError, D as stripRuntimeTurnContext, J as hydrateConversationMessages, T as normalizeToolNameFromResult, b as instructionTextForProjection, g as getPiMessageRole, s as getTurnRecord, w as isToolResultMessage } from "./checkpoint-
|
|
8
|
-
import { w as getStateAdapter } from "./profile-
|
|
9
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
10
|
-
import { t as resolveConversationRouting } from "./turn-session-routing-
|
|
11
|
-
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-
|
|
4
|
+
import { $t as getConversationStore, Ct as createPluginLogger, Nt as createPluginConversationEvents, Q as readActorIdentity, St as createPluginModel, bt as createPluginState, en as getDb, ht as JUNIOR_THREAD_STATE_TTL_MS, ln as agentTurnCostUsd, p as coreTaskRegistrations, u as getPlugins, un as agentTurnTotalTokens, xt as createPluginEmbedder } from "./agent-hooks-DUQ3ASdp.js";
|
|
5
|
+
import { E as juniorConversations, s as juniorAutomationExecutions } from "./executor-DZVZBfmX.js";
|
|
6
|
+
import { nt as sameActorIdentity } from "./conversation-DOI6Y60M.js";
|
|
7
|
+
import { C as isToolResultError, D as stripRuntimeTurnContext, J as hydrateConversationMessages, T as normalizeToolNameFromResult, b as instructionTextForProjection, g as getPiMessageRole, s as getTurnRecord, w as isToolResultMessage } from "./checkpoint-CzN3gXoB.js";
|
|
8
|
+
import { w as getStateAdapter } from "./profile-a5xmeUHf.js";
|
|
9
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BurqeqMv.js";
|
|
10
|
+
import { t as resolveConversationRouting } from "./turn-session-routing-DDUMJ2GY.js";
|
|
11
|
+
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-C2sTDXqQ.js";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
14
14
|
import { and, asc, count, desc, eq, gte, inArray, lte, max, or, sql } from "drizzle-orm";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-
|
|
2
|
-
import {
|
|
1
|
+
import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-Blgn76r3.js";
|
|
2
|
+
import { en as getDb, ht as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-DUQ3ASdp.js";
|
|
3
3
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
4
|
-
import { u as juniorLocationConfigurations } from "./executor-
|
|
5
|
-
import { Y as persistConversationMessages } from "./checkpoint-
|
|
6
|
-
import { w as getStateAdapter } from "./profile-
|
|
4
|
+
import { u as juniorLocationConfigurations } from "./executor-DZVZBfmX.js";
|
|
5
|
+
import { Y as persistConversationMessages } from "./checkpoint-CzN3gXoB.js";
|
|
6
|
+
import { w as getStateAdapter } from "./profile-a5xmeUHf.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
import { and, eq, sql } from "drizzle-orm";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { _ as findProviderError, h as ProviderError, v as getProviderErrorAttributes, y as getProviderErrorUserMessage } from "./client-
|
|
2
|
-
import { I as isRecord, t as buildTurnFailureResponse } from "./logging-
|
|
1
|
+
import { _ as findProviderError, h as ProviderError, v as getProviderErrorAttributes, y as getProviderErrorUserMessage } from "./client-C6VUBzL_.js";
|
|
2
|
+
import { I as isRecord, t as buildTurnFailureResponse } from "./logging-Blgn76r3.js";
|
|
3
3
|
import { b as parseSlackMessageTs } from "./context-0Et9iVSB.js";
|
|
4
|
-
import {
|
|
5
|
-
import { A as messageCardKey, N as readMessageCards, j as messageCardRefSchema } from "./conversation-
|
|
6
|
-
import { J as hydrateConversationMessages, ct as markConversationMessage } from "./checkpoint-
|
|
7
|
-
import { r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-
|
|
8
|
-
import { g as markTurnCompleted, h as markTurnClosed } from "./oauth-authorization-
|
|
9
|
-
import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
4
|
+
import { Zt as getConversationEventStore } from "./agent-hooks-DUQ3ASdp.js";
|
|
5
|
+
import { A as messageCardKey, N as readMessageCards, j as messageCardRefSchema } from "./conversation-DOI6Y60M.js";
|
|
6
|
+
import { J as hydrateConversationMessages, ct as markConversationMessage } from "./checkpoint-CzN3gXoB.js";
|
|
7
|
+
import { r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-CXLwmDaG.js";
|
|
8
|
+
import { g as markTurnCompleted, h as markTurnClosed } from "./oauth-authorization-t-NPqTNB.js";
|
|
9
|
+
import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BurqeqMv.js";
|
|
10
10
|
//#region src/chat/conversations/pending-cards.ts
|
|
11
11
|
/** Read undelivered card snapshots across resume and history replacement. */
|
|
12
12
|
async function loadPendingMessageCards(conversationId) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Zt as getConversationEventStore } from "./agent-hooks-DUQ3ASdp.js";
|
|
2
2
|
//#region src/chat/conversations/turn-lifecycle.ts
|
|
3
3
|
/** Persist correlated turn lifecycle facts with retry-safe terminal exclusion. */
|
|
4
4
|
var ConversationTurnLifecycleService = class {
|
|
@@ -34,7 +34,7 @@ function slackSourceForDestination(args) {
|
|
|
34
34
|
* Reads parent Conversations when this Conversation has no Destination.
|
|
35
35
|
*/
|
|
36
36
|
async function resolveConversationRouting(args) {
|
|
37
|
-
const conversationStore = args.conversationStore ?? (await import("./agent-hooks-
|
|
37
|
+
const conversationStore = args.conversationStore ?? (await import("./agent-hooks-DUQ3ASdp.js").then((n) => n.Xt)).getConversationStore();
|
|
38
38
|
const chain = await loadConversationChain(args.conversationId, conversationStore);
|
|
39
39
|
let destination;
|
|
40
40
|
let source;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-NOBDOyJi.js";
|
|
3
3
|
import { isDeepStrictEqual } from "node:util";
|
|
4
4
|
//#region src/chat/plugins/validation.ts
|
|
5
5
|
var validation_exports = /* @__PURE__ */ __exportAll({
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
1
|
+
import { t as JUNIOR_VERSION } from "./version-y4cRp5Y2.js";
|
|
2
2
|
export { JUNIOR_VERSION };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ht as requestConversationWork, Mt as ensureConversationWake } from "./agent-runner-
|
|
2
|
-
import {
|
|
3
|
-
import { n as loadTurnCheckpoint, o as failTurnRecord, s as getTurnRecord } from "./checkpoint-
|
|
4
|
-
import { w as getStateAdapter } from "./profile-
|
|
5
|
-
import { a as getVercelConversationWorkQueue } from "./job-queue-
|
|
6
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-
|
|
1
|
+
import { Ht as requestConversationWork, Mt as ensureConversationWake } from "./agent-runner-CIesujf5.js";
|
|
2
|
+
import { Zt as getConversationEventStore } from "./agent-hooks-DUQ3ASdp.js";
|
|
3
|
+
import { n as loadTurnCheckpoint, o as failTurnRecord, s as getTurnRecord } from "./checkpoint-CzN3gXoB.js";
|
|
4
|
+
import { w as getStateAdapter } from "./profile-a5xmeUHf.js";
|
|
5
|
+
import { a as getVercelConversationWorkQueue } from "./job-queue-BuSPM0cX.js";
|
|
6
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-DDUMJ2GY.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
//#region src/chat/task-execution/authorized-turn.ts
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { $t as recordFinishedTurnForAutomatedLimit, B as isListedScheduledAutomation, Cn as createUserTokenStore, D as renderBlockText, E as renderAttachmentText, F as resolveSlackChannelIdFromThreadId, G as readScheduledAutomation, I as listThreadReplies, K as saveScheduledAutomation, M as parseSlackThreadId, N as readSlackRawMessageContext, On as AuthorizationFlowDisabledError, P as resolveSlackChannelIdFromMessage, Pt as getConversationWorkState, Q as effectiveTaskOutcomes, Qt as maybePostAutomatedTurnLimitNotice, Tn as RetryableDeliveryError, V as listPublicScheduledAutomationsForTeams, W as parseScheduledAutomationRow, Z as eventAutomationTriggerAvailable, _n as truncateStatusText, _t as getEventCatalog, a as isExperimentalFeatureEnabled, at as listEventAutomationsCreatedBy, bn as removeReactionFromMessage, bt as appendAndEnqueueExclusiveInboundMessage, c as createContextCompactor, et as deleteEventAutomation, gn as normalizeSlackStatusText, gt as isEventMailboxMetadata, hn as normalizeSlackReplyMarkdown, ht as EVENT_WAIT_MS, it as listDeletedEventAutomationsCreatedBy, j as storeAttachment, kn as shouldEmitDevAgentTrace, mn as formatSlackLink, ot as listPublicEventAutomationsForTeams, pn as escapeSlackMrkdwnText, rt as getEventAutomation, s as executeAgentRun, t as createAgentRunner, tt as eventAutomationBelongsToUser, v as PluginCredentialFailureError, vn as addReactionToMessage, wn as buildSteeringPiMessage, xt as appendAndEnqueueInboundMessage, y as latestProgressStatus, yn as postSlackMessage } from "./agent-runner-
|
|
2
|
-
import { b as isProviderRetryError, i as completeText, m as escapeXml, r as completeObject } from "./client-
|
|
3
|
-
import { C as withLogContext, I as isRecord, L as toOptionalNumber, R as toOptionalString, _ as setSentryUser, b as setTags, d as logException, f as logInfo, n as createChatSdkLogger, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, u as logError, v as setSpanAttributes, w as withSpan } from "./logging-
|
|
4
|
-
import { a as getChatConfig, c as getSlackClientId, d as getSlackSigningSecret, h as normalizeSlackEmojiName, l as getSlackClientSecret, n as botConfig, s as getSlackBotToken } from "./config-
|
|
1
|
+
import { $t as recordFinishedTurnForAutomatedLimit, B as isListedScheduledAutomation, Cn as createUserTokenStore, D as renderBlockText, E as renderAttachmentText, F as resolveSlackChannelIdFromThreadId, G as readScheduledAutomation, I as listThreadReplies, K as saveScheduledAutomation, M as parseSlackThreadId, N as readSlackRawMessageContext, On as AuthorizationFlowDisabledError, P as resolveSlackChannelIdFromMessage, Pt as getConversationWorkState, Q as effectiveTaskOutcomes, Qt as maybePostAutomatedTurnLimitNotice, Tn as RetryableDeliveryError, V as listPublicScheduledAutomationsForTeams, W as parseScheduledAutomationRow, Z as eventAutomationTriggerAvailable, _n as truncateStatusText, _t as getEventCatalog, a as isExperimentalFeatureEnabled, at as listEventAutomationsCreatedBy, bn as removeReactionFromMessage, bt as appendAndEnqueueExclusiveInboundMessage, c as createContextCompactor, et as deleteEventAutomation, gn as normalizeSlackStatusText, gt as isEventMailboxMetadata, hn as normalizeSlackReplyMarkdown, ht as EVENT_WAIT_MS, it as listDeletedEventAutomationsCreatedBy, j as storeAttachment, kn as shouldEmitDevAgentTrace, mn as formatSlackLink, ot as listPublicEventAutomationsForTeams, pn as escapeSlackMrkdwnText, rt as getEventAutomation, s as executeAgentRun, t as createAgentRunner, tt as eventAutomationBelongsToUser, v as PluginCredentialFailureError, vn as addReactionToMessage, wn as buildSteeringPiMessage, xt as appendAndEnqueueInboundMessage, y as latestProgressStatus, yn as postSlackMessage } from "./agent-runner-CIesujf5.js";
|
|
2
|
+
import { b as isProviderRetryError, i as completeText, m as escapeXml, r as completeObject } from "./client-C6VUBzL_.js";
|
|
3
|
+
import { C as withLogContext, I as isRecord, L as toOptionalNumber, R as toOptionalString, _ as setSentryUser, b as setTags, d as logException, f as logInfo, n as createChatSdkLogger, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, u as logError, v as setSpanAttributes, w as withSpan } from "./logging-Blgn76r3.js";
|
|
4
|
+
import { a as getChatConfig, c as getSlackClientId, d as getSlackSigningSecret, h as normalizeSlackEmojiName, l as getSlackClientSecret, n as botConfig, s as getSlackBotToken } from "./config-BLPaWN1Q.js";
|
|
5
5
|
import { o as modelIdForProfile, r as defaultModelId } from "./model-profile-BwU8mqwD.js";
|
|
6
6
|
import { a as createActor, b as parseSlackMessageTs, c as isActorUserId, l as isUserActor, o as createSlackActor, p as parseSlackChannelId, s as createSlackResumeActor, t as credentialContextForActor, u as parseActorUserId } from "./context-0Et9iVSB.js";
|
|
7
|
-
import { $t as
|
|
7
|
+
import { $t as getConversationStore, B as downloadPrivateSlackFile, Bt as recordSlackAttachment, G as isDmChannel, H as getHeaderString, It as buildSentryConversationUrl, K as normalizeSlackConversationId, Lt as getSlackFileId, U as getSlackClient, Zt as getConversationEventStore, _n as createSlackDestination, _t as getDashboardObjectIconLink, en as getDb, gt as getDashboardConversationLink, ht as JUNIOR_THREAD_STATE_TTL_MS, o as getPluginSlackConversationLink, ot as cancelSubscriptions, q as runWithSlackInstallationToken, tn as getSqlExecutor, yn as requireSlackDestination, z as SlackActionError, zt as readAttachmentVisionSummary } from "./agent-hooks-DUQ3ASdp.js";
|
|
8
8
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
9
|
-
import { D as juniorIdentities, O as juniorUsers, o as juniorSchedulerTasks } from "./executor-
|
|
10
|
-
import { I as readMessageAttachments, R as isVisionImageMediaType, tt as instructionProvenanceFor } from "./conversation-
|
|
11
|
-
import { $ as fallbackShortTitle, A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, N as loadConversationProjection, O as trimTrailingAssistantMessages, P as loadProjection, Q as resolveConversationTitle, W as recordSubscribedReplyRoute, Y as persistConversationMessages, Z as persistConversationMessageSummaries, a as completeTurnRecord, at as estimateConversationContextTokens, c as listTurnSummaries, ct as markConversationMessage, dt as turnHasReply, ft as upsertConversationMessage, i as abandonTurnRecord, it as createConversationMemoryService, j as commitMessages, l as recordTurnSummary, lt as normalizeConversationText, n as loadTurnCheckpoint, nt as appendThreadContextMessages, o as failTurnRecord, ot as getConversationMessageSlackTs, p as buildTurnErrorResponse, pt as estimateTextTokens, r as saveTurnCheckpoint, rt as buildConversationContext, s as getTurnRecord, st as isHumanConversationMessage, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-
|
|
12
|
-
import { E as acquireActiveLock, O as withLock, T as MUTATION_LOCK_TTL_MS, w as getStateAdapter } from "./profile-
|
|
13
|
-
import { a as isPendingAuthLatestRequest, o as buildDeterministicAssistantMessageId, r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-
|
|
14
|
-
import { _ as markTurnFailed, c as CooperativeTurnYieldError, d as getConversationTurnBoundaryError, f as isCooperativeTurnYieldError, g as markTurnCompleted, h as markTurnClosed, l as TurnInputCommitLostError, m as isTurnInputDeferredError, p as isTurnInputCommitLostError, r as getAssistantReplyText, s as ConversationTurnBoundaryError, u as TurnInputDeferredError, v as startActiveTurn } from "./oauth-authorization-
|
|
15
|
-
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-
|
|
16
|
-
import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline } from "./job-queue-
|
|
9
|
+
import { D as juniorIdentities, O as juniorUsers, o as juniorSchedulerTasks } from "./executor-DZVZBfmX.js";
|
|
10
|
+
import { I as readMessageAttachments, R as isVisionImageMediaType, tt as instructionProvenanceFor } from "./conversation-DOI6Y60M.js";
|
|
11
|
+
import { $ as fallbackShortTitle, A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, N as loadConversationProjection, O as trimTrailingAssistantMessages, P as loadProjection, Q as resolveConversationTitle, W as recordSubscribedReplyRoute, Y as persistConversationMessages, Z as persistConversationMessageSummaries, a as completeTurnRecord, at as estimateConversationContextTokens, c as listTurnSummaries, ct as markConversationMessage, dt as turnHasReply, ft as upsertConversationMessage, i as abandonTurnRecord, it as createConversationMemoryService, j as commitMessages, l as recordTurnSummary, lt as normalizeConversationText, n as loadTurnCheckpoint, nt as appendThreadContextMessages, o as failTurnRecord, ot as getConversationMessageSlackTs, p as buildTurnErrorResponse, pt as estimateTextTokens, r as saveTurnCheckpoint, rt as buildConversationContext, s as getTurnRecord, st as isHumanConversationMessage, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-CzN3gXoB.js";
|
|
12
|
+
import { E as acquireActiveLock, O as withLock, T as MUTATION_LOCK_TTL_MS, w as getStateAdapter } from "./profile-a5xmeUHf.js";
|
|
13
|
+
import { a as isPendingAuthLatestRequest, o as buildDeterministicAssistantMessageId, r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-CXLwmDaG.js";
|
|
14
|
+
import { _ as markTurnFailed, c as CooperativeTurnYieldError, d as getConversationTurnBoundaryError, f as isCooperativeTurnYieldError, g as markTurnCompleted, h as markTurnClosed, l as TurnInputCommitLostError, m as isTurnInputDeferredError, p as isTurnInputCommitLostError, r as getAssistantReplyText, s as ConversationTurnBoundaryError, u as TurnInputDeferredError, v as startActiveTurn } from "./oauth-authorization-t-NPqTNB.js";
|
|
15
|
+
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-9C-wUwwx.js";
|
|
16
|
+
import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline } from "./job-queue-BuSPM0cX.js";
|
|
17
17
|
import { c as sumUtcHoursIntoSixHours, m as healthReportSchema, t as webMessageId } from "./web-message-id-xPI_EFSC.js";
|
|
18
|
-
import { C as readAutomationExecutionStatusDays, D as readAutomationRuns, E as readAutomationExecutions, S as readAutomationExecutionHours, T as readAutomationExecutionSummaries, _ as markDispatchFailed, a as confirmDispatchMailboxAppend, b as readAutomationExecutionByConversationId, c as getDispatchInputMessageId, f as isTerminalDispatchStatus, g as markDispatchCompleted, h as markDispatchBlocked, i as claimDispatchMailboxAppend, l as getDispatchRecord, m as markDispatchAwaitingResume, n as scheduleSessionCompletedPluginTasks, s as getDispatchConversationId, t as processPluginTask, u as getDispatchTurnId, v as markDispatchRunning, w as readAutomationExecutionStatusHours, x as readAutomationExecutionDays, y as emptyAutomationRunWindows } from "./task-runner-
|
|
19
|
-
import { i as resolveAgentInvocationId, o as AgentRunError, s as executeTurn, t as createAgentInvocationWorker } from "./work-
|
|
20
|
-
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
21
|
-
import { a as persistThreadState, c as configValueSchema, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-
|
|
22
|
-
import { a as getPausedTurnRequest, c as getTurnAuthorization, i as createPausedTurns, n as deleteWebAuthorization, s as wakePausedTurn, t as createWebAuthorization } from "./web-authorization-
|
|
23
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-
|
|
24
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
25
|
-
import { a as persistAuthPauseTurnState, c as getTurnUserSlackMessageTs, d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, n as getAgentTurnDiagnosticsAttributes, o as getTurnUserMessage, r as requireTurnFailureEventId, s as getTurnUserReplyAttachmentContext, t as finalizeFailedTurnReplyWithEvent, u as getInterruptionMarker } from "./turn-failure-response-
|
|
26
|
-
import { r as storeInputImages } from "./images-
|
|
18
|
+
import { C as readAutomationExecutionStatusDays, D as readAutomationRuns, E as readAutomationExecutions, S as readAutomationExecutionHours, T as readAutomationExecutionSummaries, _ as markDispatchFailed, a as confirmDispatchMailboxAppend, b as readAutomationExecutionByConversationId, c as getDispatchInputMessageId, f as isTerminalDispatchStatus, g as markDispatchCompleted, h as markDispatchBlocked, i as claimDispatchMailboxAppend, l as getDispatchRecord, m as markDispatchAwaitingResume, n as scheduleSessionCompletedPluginTasks, s as getDispatchConversationId, t as processPluginTask, u as getDispatchTurnId, v as markDispatchRunning, w as readAutomationExecutionStatusHours, x as readAutomationExecutionDays, y as emptyAutomationRunWindows } from "./task-runner-uSodiP4v.js";
|
|
19
|
+
import { i as resolveAgentInvocationId, o as AgentRunError, s as executeTurn, t as createAgentInvocationWorker } from "./work-Dy8sW9MZ.js";
|
|
20
|
+
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-foKlVl_T.js";
|
|
21
|
+
import { a as persistThreadState, c as configValueSchema, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-BurqeqMv.js";
|
|
22
|
+
import { a as getPausedTurnRequest, c as getTurnAuthorization, i as createPausedTurns, n as deleteWebAuthorization, s as wakePausedTurn, t as createWebAuthorization } from "./web-authorization-BfVYx0t1.js";
|
|
23
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-DDUMJ2GY.js";
|
|
24
|
+
import { t as bindSpawnAgent } from "./spawn-CS56i7Nm.js";
|
|
25
|
+
import { a as persistAuthPauseTurnState, c as getTurnUserSlackMessageTs, d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, n as getAgentTurnDiagnosticsAttributes, o as getTurnUserMessage, r as requireTurnFailureEventId, s as getTurnUserReplyAttachmentContext, t as finalizeFailedTurnReplyWithEvent, u as getInterruptionMarker } from "./turn-failure-response-Bshcqa0a.js";
|
|
26
|
+
import { r as storeInputImages } from "./images-D3x6EemU.js";
|
|
27
27
|
import { z } from "zod";
|
|
28
28
|
import { createHash } from "node:crypto";
|
|
29
29
|
import { and, desc, eq, inArray, lt, notInArray, or, sql } from "drizzle-orm";
|
|
30
|
-
import { createEventSource, createLocalSource, createSlackSource, createWebSource, localDestinationSchema, objectFactFields } from "@sentry/junior-plugin-api";
|
|
30
|
+
import { createEventSource, createLocalSource, createSlackSource, createWebSource, localDestinationSchema, objectFactFields, objectPresentation, objectTypeSchema } from "@sentry/junior-plugin-api";
|
|
31
31
|
import { del, get, put } from "@vercel/blob";
|
|
32
32
|
import { Message, ThreadImpl, stringifyMarkdown } from "chat";
|
|
33
33
|
import { createSlackAdapter } from "@chat-adapter/slack";
|
|
@@ -328,9 +328,11 @@ function preview(text, length) {
|
|
|
328
328
|
/** Show an Automation as a native Work Object, not an operation receipt. */
|
|
329
329
|
function renderSlackAutomationCard(card) {
|
|
330
330
|
const title = preview(card.title, 160);
|
|
331
|
+
const iconUrl = getDashboardObjectIconLink("workflow");
|
|
331
332
|
const trigger = preview(card.trigger, 500);
|
|
332
333
|
const warning = card.warning ? preview(card.warning, 500) : null;
|
|
333
334
|
const text = [
|
|
335
|
+
"Automation",
|
|
334
336
|
card.url ? formatSlackLink(card.url, title) : escapeSlackMrkdwnText(title),
|
|
335
337
|
card.status ? escapeSlackMrkdwnText(card.status) : null,
|
|
336
338
|
escapeSlackMrkdwnText(trigger),
|
|
@@ -352,7 +354,11 @@ function renderSlackAutomationCard(card) {
|
|
|
352
354
|
entity_payload: {
|
|
353
355
|
attributes: {
|
|
354
356
|
title: { text: title },
|
|
355
|
-
display_type: "Automation"
|
|
357
|
+
display_type: "Automation",
|
|
358
|
+
product_icon: iconUrl ? {
|
|
359
|
+
url: iconUrl,
|
|
360
|
+
alt_text: "Automation"
|
|
361
|
+
} : void 0
|
|
356
362
|
},
|
|
357
363
|
custom_fields: [
|
|
358
364
|
...card.status ? [{
|
|
@@ -392,12 +398,17 @@ function renderSlackObjectCard(card, conversationId) {
|
|
|
392
398
|
warning: card.warning ?? null,
|
|
393
399
|
status: card.status
|
|
394
400
|
});
|
|
401
|
+
const presentation = objectPresentation(card);
|
|
402
|
+
const type = card.displayType ?? presentation.label;
|
|
403
|
+
const iconUrl = getDashboardObjectIconLink(presentation.icon);
|
|
395
404
|
const title = card.title.slice(0, 160);
|
|
396
405
|
const facts = objectFactFields(card.facts);
|
|
397
406
|
const text = [
|
|
407
|
+
escapeSlackMrkdwnText(type),
|
|
398
408
|
card.url ? formatSlackLink(card.url, title) : escapeSlackMrkdwnText(title),
|
|
399
409
|
escapeSlackMrkdwnText(card.label),
|
|
400
410
|
card.status ? escapeSlackMrkdwnText(card.status) : null,
|
|
411
|
+
card.warning ? escapeSlackMrkdwnText(`Needs attention: ${card.warning}`) : null,
|
|
401
412
|
...facts.map((field) => escapeSlackMrkdwnText(`${field.label}: ${field.value}`))
|
|
402
413
|
].filter(Boolean).join("\n");
|
|
403
414
|
if (!card.url) return {
|
|
@@ -408,13 +419,22 @@ function renderSlackObjectCard(card, conversationId) {
|
|
|
408
419
|
const attributes = {
|
|
409
420
|
title: { text: title },
|
|
410
421
|
display_id: card.label,
|
|
411
|
-
display_type:
|
|
422
|
+
display_type: type,
|
|
423
|
+
product_icon: iconUrl ? {
|
|
424
|
+
url: iconUrl,
|
|
425
|
+
alt_text: `${type}${card.status ? `: ${card.status}` : ""}`
|
|
426
|
+
} : void 0,
|
|
412
427
|
product_name: card.plugin
|
|
413
428
|
};
|
|
414
|
-
const customFields = facts.map((field) => ({
|
|
429
|
+
const customFields = [...facts.map((field) => ({
|
|
415
430
|
...field,
|
|
416
431
|
type: "string"
|
|
417
|
-
}))
|
|
432
|
+
})), ...card.warning ? [{
|
|
433
|
+
key: "warning",
|
|
434
|
+
label: "Needs attention",
|
|
435
|
+
type: "string",
|
|
436
|
+
value: card.warning
|
|
437
|
+
}] : []];
|
|
418
438
|
return {
|
|
419
439
|
text,
|
|
420
440
|
entity: {
|
|
@@ -2462,7 +2482,8 @@ const slackConversationMessageMetadataSchema = z.union([slackConversationMessage
|
|
|
2462
2482
|
namespace: z.string(),
|
|
2463
2483
|
identifier: z.string(),
|
|
2464
2484
|
subscriptionId: z.string(),
|
|
2465
|
-
trustedSummary: z.string().optional()
|
|
2485
|
+
trustedSummary: z.string().optional(),
|
|
2486
|
+
objectType: objectTypeSchema.optional()
|
|
2466
2487
|
}).strict()
|
|
2467
2488
|
}).strict()]);
|
|
2468
2489
|
function requireSlackAuthorId(message) {
|
|
@@ -7181,6 +7202,7 @@ function createConversationTurnWorker(agentRunner, deliverMessage) {
|
|
|
7181
7202
|
...source.kind === "web" ? { source: "web" } : void 0,
|
|
7182
7203
|
...event ? {
|
|
7183
7204
|
eventType: event.eventType,
|
|
7205
|
+
eventObjectType: event.objectType,
|
|
7184
7206
|
...event.trustedSummary ? { trustedSummary: event.trustedSummary } : void 0
|
|
7185
7207
|
} : void 0
|
|
7186
7208
|
}
|