@sentry/junior 0.226.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-FUetyyLe.js → agent-hooks-DUQ3ASdp.js} +227 -12
- package/dist/{agent-runner-DEF7auSj.js → agent-runner-CIesujf5.js} +123 -77
- package/dist/api/schema.d.ts +203 -32
- package/dist/api/schema.js +3 -3
- package/dist/api.js +105 -67
- package/dist/{app-TVL42pGL.d.ts → app-BRZB3MuD.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +275 -137
- package/dist/{briefs-Cb4T2BUI.js → briefs-BTrVMqUg.js} +4 -4
- package/dist/{catalog-runtime-BYGR3Dr4.js → catalog-runtime-NOBDOyJi.js} +1 -1
- package/dist/{checkpoint-CJe-dZFF.js → checkpoint-CzN3gXoB.js} +7 -7
- 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-C2WBBx7m.js → client-C6VUBzL_.js} +2 -2
- package/dist/{config-Bws6Rpsh.js → config-BLPaWN1Q.js} +2 -2
- package/dist/{context-Bplcgypl.js → context-0Et9iVSB.js} +1 -1
- package/dist/{conversation-DPbmIwjy.js → conversation-DOI6Y60M.js} +52 -24
- package/dist/{conversation-privacy-pCcW0a5Y.js → conversation-privacy-DJ88ECSq.js} +1 -1
- package/dist/{credential-sync-ibuNsMyl.js → credential-sync-OKs419AB.js} +14 -14
- package/dist/{executor-D36FWjcf.js → executor-DZVZBfmX.js} +1 -1
- package/dist/{history-DI9KJT3J.d.ts → history-H-SI5Dej.d.ts} +27 -1
- package/dist/images-D3x6EemU.js +82 -0
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-2mFFDMHB.js → job-queue-BuSPM0cX.js} +1 -1
- package/dist/{logging-CvjMHRvg.js → logging-Blgn76r3.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-authorization-l4O1rXsL.js → oauth-authorization-t-NPqTNB.js} +1 -1
- package/dist/{oauth-callback-server-Ds8M5FFX.js → oauth-callback-server-BP7SgTcu.js} +2 -2
- package/dist/{pending-auth-DLNJbD8H.js → pending-auth-CXLwmDaG.js} +1 -1
- package/dist/{profile-dvV7PB7u.js → profile-a5xmeUHf.js} +4 -4
- package/dist/{prompt-DehgjkO5.js → prompt-9C-wUwwx.js} +1 -1
- package/dist/{registry-C6FHctIu.js → registry-BUbczT2k.js} +2 -2
- package/dist/{resolve-DqwGI9wq.js → resolve-3PhWSiEF.js} +2 -2
- package/dist/{runner-CzYEcB73.js → runner-CsnuKcsq.js} +10 -10
- package/dist/{sandbox-egress-signals-BZOv0fns.js → sandbox-egress-signals-D34sI4J6.js} +1 -1
- package/dist/{schema-BZg-xzfG.js → schema-CXmCvVLn.js} +1 -1
- package/dist/{skills-EhiVbjF4.js → skills-CLgyYrgF.js} +2 -2
- package/dist/{spawn-Ck3L0rEr.js → spawn-CS56i7Nm.js} +2 -2
- package/dist/{task-queue-TXhAWQwj.js → task-queue-C2sTDXqQ.js} +3 -3
- package/dist/{task-runner-axUJS1No.js → task-runner-uSodiP4v.js} +10 -10
- package/dist/{thread-state-CTuWhjru.js → thread-state-BurqeqMv.js} +5 -5
- package/dist/{turn-failure-response-csVoLOzx.js → turn-failure-response-Bshcqa0a.js} +9 -9
- package/dist/{turn-lifecycle-C1S6vELh.js → turn-lifecycle-foKlVl_T.js} +1 -1
- package/dist/{turn-session-routing-5RejBvit.js → turn-session-routing-DDUMJ2GY.js} +1 -1
- package/dist/{validation-q2PFxkTQ.js → validation-DZc56dXw.js} +1 -1
- package/dist/{version-ByLtIYyy.js → version-y4cRp5Y2.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-Biy8nsS7.js → web-authorization-BfVYx0t1.js} +6 -6
- package/dist/{web-input-DM9LaEdn.js → web-input-B6FZlrgg.js} +73 -41
- package/dist/{work-QrbHdXTc.js → work-Dy8sW9MZ.js} +7 -7
- package/dist/{worker-r17aopXW.js → worker-BH0RP7Hj.js} +5 -5
- package/package.json +5 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
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-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { E as juniorConversations, s as juniorAutomationExecutions } from "./executor-
|
|
6
|
-
import {
|
|
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-
|
|
2
|
+
import { p as logWarn } from "./logging-Blgn76r3.js";
|
|
3
|
+
import { b as parseSlackMessageTs, r as credentialSubjectSchema } from "./context-0Et9iVSB.js";
|
|
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-
|
|
3
|
-
import {
|
|
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-
|
|
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
|
+
import { b as parseSlackMessageTs } from "./context-0Et9iVSB.js";
|
|
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 {
|
|
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,32 +1,33 @@
|
|
|
1
|
-
import { $ as
|
|
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
|
-
import {
|
|
7
|
-
import { B as downloadPrivateSlackFile, G as isDmChannel, H as getHeaderString,
|
|
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 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 {
|
|
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-
|
|
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";
|
|
26
27
|
import { z } from "zod";
|
|
27
28
|
import { createHash } from "node:crypto";
|
|
28
29
|
import { and, desc, eq, inArray, lt, notInArray, or, sql } from "drizzle-orm";
|
|
29
|
-
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";
|
|
30
31
|
import { del, get, put } from "@vercel/blob";
|
|
31
32
|
import { Message, ThreadImpl, stringifyMarkdown } from "chat";
|
|
32
33
|
import { createSlackAdapter } from "@chat-adapter/slack";
|
|
@@ -327,9 +328,11 @@ function preview(text, length) {
|
|
|
327
328
|
/** Show an Automation as a native Work Object, not an operation receipt. */
|
|
328
329
|
function renderSlackAutomationCard(card) {
|
|
329
330
|
const title = preview(card.title, 160);
|
|
331
|
+
const iconUrl = getDashboardObjectIconLink("workflow");
|
|
330
332
|
const trigger = preview(card.trigger, 500);
|
|
331
333
|
const warning = card.warning ? preview(card.warning, 500) : null;
|
|
332
334
|
const text = [
|
|
335
|
+
"Automation",
|
|
333
336
|
card.url ? formatSlackLink(card.url, title) : escapeSlackMrkdwnText(title),
|
|
334
337
|
card.status ? escapeSlackMrkdwnText(card.status) : null,
|
|
335
338
|
escapeSlackMrkdwnText(trigger),
|
|
@@ -351,7 +354,11 @@ function renderSlackAutomationCard(card) {
|
|
|
351
354
|
entity_payload: {
|
|
352
355
|
attributes: {
|
|
353
356
|
title: { text: title },
|
|
354
|
-
display_type: "Automation"
|
|
357
|
+
display_type: "Automation",
|
|
358
|
+
product_icon: iconUrl ? {
|
|
359
|
+
url: iconUrl,
|
|
360
|
+
alt_text: "Automation"
|
|
361
|
+
} : void 0
|
|
355
362
|
},
|
|
356
363
|
custom_fields: [
|
|
357
364
|
...card.status ? [{
|
|
@@ -391,12 +398,17 @@ function renderSlackObjectCard(card, conversationId) {
|
|
|
391
398
|
warning: card.warning ?? null,
|
|
392
399
|
status: card.status
|
|
393
400
|
});
|
|
401
|
+
const presentation = objectPresentation(card);
|
|
402
|
+
const type = card.displayType ?? presentation.label;
|
|
403
|
+
const iconUrl = getDashboardObjectIconLink(presentation.icon);
|
|
394
404
|
const title = card.title.slice(0, 160);
|
|
395
405
|
const facts = objectFactFields(card.facts);
|
|
396
406
|
const text = [
|
|
407
|
+
escapeSlackMrkdwnText(type),
|
|
397
408
|
card.url ? formatSlackLink(card.url, title) : escapeSlackMrkdwnText(title),
|
|
398
409
|
escapeSlackMrkdwnText(card.label),
|
|
399
410
|
card.status ? escapeSlackMrkdwnText(card.status) : null,
|
|
411
|
+
card.warning ? escapeSlackMrkdwnText(`Needs attention: ${card.warning}`) : null,
|
|
400
412
|
...facts.map((field) => escapeSlackMrkdwnText(`${field.label}: ${field.value}`))
|
|
401
413
|
].filter(Boolean).join("\n");
|
|
402
414
|
if (!card.url) return {
|
|
@@ -407,19 +419,22 @@ function renderSlackObjectCard(card, conversationId) {
|
|
|
407
419
|
const attributes = {
|
|
408
420
|
title: { text: title },
|
|
409
421
|
display_id: card.label,
|
|
410
|
-
display_type:
|
|
422
|
+
display_type: type,
|
|
423
|
+
product_icon: iconUrl ? {
|
|
424
|
+
url: iconUrl,
|
|
425
|
+
alt_text: `${type}${card.status ? `: ${card.status}` : ""}`
|
|
426
|
+
} : void 0,
|
|
411
427
|
product_name: card.plugin
|
|
412
428
|
};
|
|
413
|
-
const customFields = facts.map((field) => ({
|
|
429
|
+
const customFields = [...facts.map((field) => ({
|
|
414
430
|
...field,
|
|
415
431
|
type: "string"
|
|
416
|
-
}))
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
label: "Source updated",
|
|
432
|
+
})), ...card.warning ? [{
|
|
433
|
+
key: "warning",
|
|
434
|
+
label: "Needs attention",
|
|
420
435
|
type: "string",
|
|
421
|
-
value: card.
|
|
422
|
-
}
|
|
436
|
+
value: card.warning
|
|
437
|
+
}] : []];
|
|
423
438
|
return {
|
|
424
439
|
text,
|
|
425
440
|
entity: {
|
|
@@ -2467,7 +2482,8 @@ const slackConversationMessageMetadataSchema = z.union([slackConversationMessage
|
|
|
2467
2482
|
namespace: z.string(),
|
|
2468
2483
|
identifier: z.string(),
|
|
2469
2484
|
subscriptionId: z.string(),
|
|
2470
|
-
trustedSummary: z.string().optional()
|
|
2485
|
+
trustedSummary: z.string().optional(),
|
|
2486
|
+
objectType: objectTypeSchema.optional()
|
|
2471
2487
|
}).strict()
|
|
2472
2488
|
}).strict()]);
|
|
2473
2489
|
function requireSlackAuthorId(message) {
|
|
@@ -2830,11 +2846,6 @@ function buildStoredAttachmentPromptText(args) {
|
|
|
2830
2846
|
"</attachment>"
|
|
2831
2847
|
].join("\n");
|
|
2832
2848
|
}
|
|
2833
|
-
function getSlackFileId(attachment) {
|
|
2834
|
-
const metadataId = attachment.fetchMetadata?.fileId;
|
|
2835
|
-
if (metadataId) return metadataId;
|
|
2836
|
-
return (attachment.url ?? attachment.fetchMetadata?.url ?? "").match(/(?:^|[-/])(F[A-Z0-9]+)(?:[-/]|$)/i)?.[1];
|
|
2837
|
-
}
|
|
2838
2849
|
function getCachedImageSummaries(args) {
|
|
2839
2850
|
if (!args.conversation || !args.messageTs) return [];
|
|
2840
2851
|
const conversationMessage = args.conversation.messages.find((message) => getConversationMessageSlackTs(message) === args.messageTs);
|
|
@@ -3186,6 +3197,10 @@ function toConversationMessage(args) {
|
|
|
3186
3197
|
},
|
|
3187
3198
|
meta: {
|
|
3188
3199
|
attachmentCount: args.entry.attachments.length,
|
|
3200
|
+
slackFileIds: args.entry.attachments.flatMap((attachment) => {
|
|
3201
|
+
const id = getSlackFileId(attachment);
|
|
3202
|
+
return id ? [id] : [];
|
|
3203
|
+
}),
|
|
3189
3204
|
explicitMention: args.explicitMention,
|
|
3190
3205
|
imageAttachmentCount: imageAttachmentCount > 0 ? imageAttachmentCount : void 0,
|
|
3191
3206
|
imagesHydrated: !messageHasPotentialImageAttachment,
|
|
@@ -7075,6 +7090,7 @@ function createConversationTurnWorker(agentRunner, deliverMessage) {
|
|
|
7075
7090
|
const isResume = resolved.kind === "resume";
|
|
7076
7091
|
let turnInputFacts;
|
|
7077
7092
|
let text = "";
|
|
7093
|
+
let attachments = [];
|
|
7078
7094
|
let turnId = "";
|
|
7079
7095
|
let userMessageId = "";
|
|
7080
7096
|
let startedAtMs = Date.now();
|
|
@@ -7089,6 +7105,7 @@ function createConversationTurnWorker(agentRunner, deliverMessage) {
|
|
|
7089
7105
|
if (resolved.kind === "mailbox") {
|
|
7090
7106
|
const first = resolved.batch[0];
|
|
7091
7107
|
text = joinMailboxText(resolved.batch.map((entry) => entry.message));
|
|
7108
|
+
attachments = resolved.batch.flatMap((entry) => readMessageAttachments(entry.message.input.attachments));
|
|
7092
7109
|
startedAtMs = first.message.createdAtMs;
|
|
7093
7110
|
userMessageId = first.message.inboundMessageId;
|
|
7094
7111
|
turnId = buildDeterministicTurnId(userMessageId);
|
|
@@ -7117,6 +7134,7 @@ function createConversationTurnWorker(agentRunner, deliverMessage) {
|
|
|
7117
7134
|
});
|
|
7118
7135
|
userMessageId = userMessage.id;
|
|
7119
7136
|
text = userMessage.text;
|
|
7137
|
+
attachments = userMessage.meta?.attachments ?? [];
|
|
7120
7138
|
startedAtMs = userMessage.createdAtMs;
|
|
7121
7139
|
inputMessageIds = [userMessageId];
|
|
7122
7140
|
}
|
|
@@ -7178,11 +7196,13 @@ function createConversationTurnWorker(agentRunner, deliverMessage) {
|
|
|
7178
7196
|
createdAtMs: startedAtMs,
|
|
7179
7197
|
author,
|
|
7180
7198
|
meta: {
|
|
7199
|
+
...attachments.length ? { attachments } : void 0,
|
|
7181
7200
|
explicitMention: true,
|
|
7182
7201
|
replied: false,
|
|
7183
7202
|
...source.kind === "web" ? { source: "web" } : void 0,
|
|
7184
7203
|
...event ? {
|
|
7185
7204
|
eventType: event.eventType,
|
|
7205
|
+
eventObjectType: event.objectType,
|
|
7186
7206
|
...event.trustedSummary ? { trustedSummary: event.trustedSummary } : void 0
|
|
7187
7207
|
} : void 0
|
|
7188
7208
|
}
|
|
@@ -7275,6 +7295,7 @@ function createConversationTurnWorker(agentRunner, deliverMessage) {
|
|
|
7275
7295
|
runId: currentRunId,
|
|
7276
7296
|
instruction: {
|
|
7277
7297
|
text,
|
|
7298
|
+
storedAttachments: attachments,
|
|
7278
7299
|
context: buildConversationContext(conversation, { excludeMessageId: userMessageId })
|
|
7279
7300
|
},
|
|
7280
7301
|
history: piMessages,
|
|
@@ -7621,7 +7642,6 @@ function createProductionConversationWorkOptions(options) {
|
|
|
7621
7642
|
}
|
|
7622
7643
|
//#endregion
|
|
7623
7644
|
//#region src/chat/conversations/web-input.ts
|
|
7624
|
-
/** Store web input in a Conversation mailbox. */
|
|
7625
7645
|
function normalizeEmail(email) {
|
|
7626
7646
|
return email.trim().toLowerCase();
|
|
7627
7647
|
}
|
|
@@ -7667,7 +7687,7 @@ function webActorFromEmail(email, profile) {
|
|
|
7667
7687
|
/** Build one web mailbox entry. */
|
|
7668
7688
|
function buildWebInboundMessage(args) {
|
|
7669
7689
|
const text = args.message.trim();
|
|
7670
|
-
if (!text) throw new Error("Web Message must not be empty");
|
|
7690
|
+
if (!text && !args.attachments?.length) throw new Error("Web Message must not be empty");
|
|
7671
7691
|
if (!args.actor.email) throw new Error("Web Actor requires a verified email");
|
|
7672
7692
|
const destination = resolveConversationDestination({
|
|
7673
7693
|
conversationId: args.conversationId,
|
|
@@ -7683,6 +7703,7 @@ function buildWebInboundMessage(args) {
|
|
|
7683
7703
|
input: {
|
|
7684
7704
|
authorId: args.actor.userId,
|
|
7685
7705
|
text,
|
|
7706
|
+
...args.attachments?.length ? { attachments: args.attachments } : void 0,
|
|
7686
7707
|
metadata: {
|
|
7687
7708
|
authorEmail: normalizeEmail(args.actor.email),
|
|
7688
7709
|
...args.actor.fullName && { authorFullName: args.actor.fullName },
|
|
@@ -7730,12 +7751,13 @@ async function createAndEnqueueConversation(input, options) {
|
|
|
7730
7751
|
conversationId,
|
|
7731
7752
|
idempotencyKey: input.idempotencyKey,
|
|
7732
7753
|
message: input.message,
|
|
7754
|
+
images: input.images,
|
|
7733
7755
|
rootVisibility: input.visibility === "private" ? "private" : "public"
|
|
7734
7756
|
}, options);
|
|
7735
7757
|
}
|
|
7736
7758
|
async function appendAndEnqueueWebMessage(input, options) {
|
|
7737
7759
|
const text = input.message.trim();
|
|
7738
|
-
if (!text) throw new Error("Web Message must not be empty");
|
|
7760
|
+
if (!text && !input.images?.length) throw new Error("Web Message must not be empty");
|
|
7739
7761
|
if (!input.actor.email) throw new Error("Web Actor requires a verified email");
|
|
7740
7762
|
const nowMs = options.nowMs ?? Date.now();
|
|
7741
7763
|
const messageId = await webMessageId({
|
|
@@ -7749,12 +7771,22 @@ async function appendAndEnqueueWebMessage(input, options) {
|
|
|
7749
7771
|
nowMs,
|
|
7750
7772
|
...input.rootVisibility && { rootVisibility: input.rootVisibility }
|
|
7751
7773
|
});
|
|
7774
|
+
let attachments = [];
|
|
7775
|
+
if (input.images?.length) {
|
|
7776
|
+
if (!options.attachmentStorage) throw new Error("Attachment storage is unavailable.");
|
|
7777
|
+
attachments = await storeInputImages({
|
|
7778
|
+
conversationId: input.conversationId,
|
|
7779
|
+
files: input.images,
|
|
7780
|
+
storage: options.attachmentStorage
|
|
7781
|
+
});
|
|
7782
|
+
}
|
|
7752
7783
|
const result = await (options.exclusive ? appendAndEnqueueExclusiveInboundMessage : appendAndEnqueueInboundMessage)({
|
|
7753
7784
|
message: buildWebInboundMessage({
|
|
7754
7785
|
actor: input.actor,
|
|
7755
7786
|
conversationId: input.conversationId,
|
|
7756
7787
|
destination,
|
|
7757
7788
|
message: text,
|
|
7789
|
+
attachments,
|
|
7758
7790
|
messageId,
|
|
7759
7791
|
nowMs
|
|
7760
7792
|
}),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { f as juniorAgentBindings, p as juniorAgentInvocations } from "./executor-
|
|
5
|
-
import { I as openConversationProjection, _ as getTerminalAssistantMessages, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord } from "./checkpoint-
|
|
6
|
-
import { d as getConversationTurnBoundaryError, l as TurnInputCommitLostError, p as isTurnInputCommitLostError, r as getAssistantReplyText } from "./oauth-authorization-
|
|
7
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
8
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-
|
|
2
|
+
import { On as AuthorizationFlowDisabledError, ct as agentInvocationSchema, dt as AgentInvocationLimitError, lt as createAgentInvocationSchema, n as runAgentWithTimeout, st as agentBindingSchema, ut as AgentInvocationBusyError, v as PluginCredentialFailureError, xt as appendAndEnqueueInboundMessage } from "./agent-runner-CIesujf5.js";
|
|
3
|
+
import { $t as getConversationStore, Zt as getConversationEventStore, tn as getSqlExecutor } from "./agent-hooks-DUQ3ASdp.js";
|
|
4
|
+
import { f as juniorAgentBindings, p as juniorAgentInvocations } from "./executor-DZVZBfmX.js";
|
|
5
|
+
import { I as openConversationProjection, _ as getTerminalAssistantMessages, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord } from "./checkpoint-CzN3gXoB.js";
|
|
6
|
+
import { d as getConversationTurnBoundaryError, l as TurnInputCommitLostError, p as isTurnInputCommitLostError, r as getAssistantReplyText } from "./oauth-authorization-t-NPqTNB.js";
|
|
7
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-foKlVl_T.js";
|
|
8
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-BurqeqMv.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
11
11
|
import { and, asc, count, eq, inArray } from "drizzle-orm";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { At as
|
|
3
|
-
import { b as isProviderRetryError } from "./client-
|
|
4
|
-
import { C as withLogContext, d as logException, f as logInfo, p as logWarn } from "./logging-
|
|
5
|
-
import { a as getChatConfig } from "./config-
|
|
6
|
-
import { f as getTurnRequestDeadline, m as ConversationQueueMessageRejectedError } from "./job-queue-
|
|
2
|
+
import { At as deadLetterAttempt, Dt as completeConversationStop, Lt as recordAttemptFailure, Mt as ensureConversationWake, Ot as completeConversationWork, Pt as getConversationWorkState, Rt as recordConversationRetry, St as beginConversationResume, Tt as clearConsumedConversationWake, Ut as startConversationWork, Vt as requestAnotherSlice, Xt as isInvalidConversationRecordError, Yt as isFinalAttempt, jt as drainConversationMailbox, kt as countPendingConversationMessages, qt as hasConversationStop, wt as checkInConversationWork, yt as ackMessages, zt as releaseConversationWork } from "./agent-runner-CIesujf5.js";
|
|
3
|
+
import { b as isProviderRetryError } from "./client-C6VUBzL_.js";
|
|
4
|
+
import { C as withLogContext, d as logException, f as logInfo, p as logWarn } from "./logging-Blgn76r3.js";
|
|
5
|
+
import { a as getChatConfig } from "./config-BLPaWN1Q.js";
|
|
6
|
+
import { f as getTurnRequestDeadline, m as ConversationQueueMessageRejectedError } from "./job-queue-BuSPM0cX.js";
|
|
7
7
|
//#region src/chat/task-execution/worker.ts
|
|
8
8
|
var worker_exports = /* @__PURE__ */ __exportAll({
|
|
9
9
|
CONVERSATION_WORK_DEFER_DELAY_MS: () => CONVERSATION_WORK_DEFER_DELAY_MS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.228.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"@opentelemetry/core": "2.9.0",
|
|
68
68
|
"@sentry/node": "10.65.0",
|
|
69
69
|
"@sinclair/typebox": "^0.34.49",
|
|
70
|
+
"@slack/types": "^2.21.1",
|
|
70
71
|
"@slack/web-api": "^7.16.0",
|
|
71
72
|
"@vercel/blob": "^2.6.1",
|
|
72
73
|
"@vercel/functions": "^3.6.0",
|
|
@@ -85,7 +86,7 @@
|
|
|
85
86
|
"pg": "^8.16.3",
|
|
86
87
|
"yaml": "^2.9.0",
|
|
87
88
|
"zod": "^4.5.4",
|
|
88
|
-
"@sentry/junior-plugin-api": "0.
|
|
89
|
+
"@sentry/junior-plugin-api": "0.228.0"
|
|
89
90
|
},
|
|
90
91
|
"devDependencies": {
|
|
91
92
|
"@emnapi/core": "^1.10.0",
|
|
@@ -104,9 +105,9 @@
|
|
|
104
105
|
"typescript": "^6.0.3",
|
|
105
106
|
"vercel": "^54.4.0",
|
|
106
107
|
"vitest": "^4.1.7",
|
|
107
|
-
"@sentry/junior-
|
|
108
|
+
"@sentry/junior-memory": "0.228.0",
|
|
108
109
|
"@sentry/junior-testing": "0.0.0",
|
|
109
|
-
"@sentry/junior-
|
|
110
|
+
"@sentry/junior-github": "0.228.0"
|
|
110
111
|
},
|
|
111
112
|
"scripts": {
|
|
112
113
|
"build": "tsdown",
|