@sentry/junior 0.249.0 → 0.250.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{admin-DZeUvFHI.js → admin-DMKyXi83.js} +1 -1
- package/dist/{agent-hooks-B4bQ4kBT.js → agent-hooks-CtZuJPTU.js} +23 -8
- package/dist/{agent-runner-B8u9yBSO.js → agent-runner-CNiTpIpb.js} +101 -20
- package/dist/api/schema.d.ts +33 -0
- package/dist/api/schema.js +2 -2
- package/dist/api.js +54 -22
- package/dist/app.js +35 -43
- package/dist/{assistant-reply-Bhi3sqgj.js → assistant-reply-K5r1pcgJ.js} +1 -1
- package/dist/{briefs-pUYuPjCW.js → briefs-8xyS3oeV.js} +2 -2
- package/dist/{catalog-runtime-oITS5Rjx.js → catalog-runtime-BQ3g3OX_.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +2 -2
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-CvAOTqQF.js → client-Q27hki0Y.js} +2 -2
- package/dist/{config-DytdkbYS.js → config-Cb--Qs-g.js} +2 -2
- package/dist/{web-authorization-DLz3WwL6.js → connections-DZ70JeSN.js} +85 -8
- package/dist/{conversation-privacy-B1yNx-7X.js → conversation-privacy-BIDN1sW3.js} +1 -1
- package/dist/{credential-sync-BejMAPTR.js → credential-sync-CyAN-Gos.js} +18 -23
- package/dist/{executor-BYtCR1fJ.js → executor-D8y7v95s.js} +2 -2
- package/dist/{images-CbP-PoMG.js → images-BkGhqKIK.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-B-8tT6DC.js → job-queue-uGq6Grnt.js} +1 -1
- package/dist/{logging-DkfhlwYe.js → logging-C22RdmU8.js} +1 -1
- package/dist/{message-D1tGYTCC.js → message-D0RPetp-.js} +3 -3
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-Ck1Vs9l_.js → oauth-callback-server-DF_Odkvh.js} +2 -2
- package/dist/{pending-auth-CBZduFHf.js → pending-auth-Bg3A1-pE.js} +2 -2
- package/dist/{profile-Ch9aZ6bb.js → profile-DK9umvav.js} +4 -4
- package/dist/{registry-BPeYibTN.js → registry-BvsLuoLK.js} +1 -1
- package/dist/{resolve-QOZbqF7t.js → resolve-C9btOXju.js} +2 -2
- package/dist/{result-Dp8BPIuR.js → result-CcdQ2iau.js} +6 -6
- package/dist/{runner-dfLJ6ZCW.js → runner-Bem4DUHN.js} +9 -9
- package/dist/{sandbox-egress-signals-Y5eS_FDi.js → sandbox-egress-signals-Bl-4cF7E.js} +1 -1
- package/dist/{schema-Bz-kE1z4.js → schema-DELmAdjR.js} +17 -1
- package/dist/{session-stop-Akrz6ImY.js → session-stop-DteRDRCi.js} +16 -13
- package/dist/{skills-D4Tpsuvg.js → skills-CVwSL6Gc.js} +2 -2
- package/dist/{spawn-DYgYT32M.js → spawn-CA0YYtzr.js} +2 -2
- package/dist/{store-DqnCyIPs.js → store-Dw3eBN9S.js} +6 -6
- package/dist/{task-queue-BNllROcl.js → task-queue-C7cyjcVj.js} +3 -3
- package/dist/{task-runner-exdzicSg.js → task-runner-BbSyWmOq.js} +10 -10
- package/dist/{tasks-Cf4ib3bG.js → tasks-B8nH3ND_.js} +8 -8
- package/dist/{thread-state-CPvS5vpy.js → thread-state-BTOLzCM-.js} +6 -6
- package/dist/{turn-failure-response-CdixRkEW.js → turn-failure-response-BwNfO8Xt.js} +7 -7
- package/dist/{turn-lifecycle-DahlJysg.js → turn-lifecycle-DSN0xGW7.js} +1 -1
- package/dist/{turn-session-routing-B3pBx_Ep.js → turn-session-routing-BRKYIn6n.js} +1 -1
- package/dist/{validation-LNypV_fu.js → validation-CBkyzKCP.js} +1 -1
- package/dist/{version-DEl6GNnH.js → version-CkwwLVLb.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-BQqX8fDS.js → viewer-DdzigZQh.js} +3 -3
- package/dist/{web-input-DisCMhtH.js → web-input-BjdnnpuN.js} +26 -26
- package/dist/{work-6KB-2tbx.js → work-qQEjtmlv.js} +9 -9
- package/dist/{worker-6RfyAjWY.js → worker-C-CSZMy_.js} +5 -5
- package/package.json +4 -4
|
@@ -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-C22RdmU8.js";
|
|
2
2
|
import { o as parseActorUserId } from "./actor-BTtLaeWy.js";
|
|
3
3
|
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-BVvSnQBB.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-C22RdmU8.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-DK9umvav.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { FileSystem, Sandbox } from "@vercel/sandbox";
|
|
5
5
|
//#region src/chat/sandbox/resources.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { $ as getAgentInvocation, X as createAgentInvocationFromLatest, ct as isTerminalAgentInvocation, et as getAgentInvocationIdForEvents, ft as markAgentInvocationParentMailboxAppended, it as getAgentInvocationResultMessageId, nt as getAgentInvocationIdForResult, st as getLatestAgentInvocationForConversation, tt as getAgentInvocationIdForMessage } from "./agent-runner-
|
|
2
|
+
import { $ as getAgentInvocation, X as createAgentInvocationFromLatest, ct as isTerminalAgentInvocation, et as getAgentInvocationIdForEvents, ft as markAgentInvocationParentMailboxAppended, it as getAgentInvocationResultMessageId, nt as getAgentInvocationIdForResult, st as getLatestAgentInvocationForConversation, tt as getAgentInvocationIdForMessage } from "./agent-runner-CNiTpIpb.js";
|
|
3
3
|
import { t as createActor } from "./actor-BTtLaeWy.js";
|
|
4
|
-
import { d as credentialContextForActor } from "./registry-
|
|
5
|
-
import { $ as listTurnSummaries, Q as getTurnRecord } from "./tasks-
|
|
6
|
-
import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-
|
|
4
|
+
import { d as credentialContextForActor } from "./registry-BvsLuoLK.js";
|
|
5
|
+
import { $ as listTurnSummaries, Q as getTurnRecord } from "./tasks-B8nH3ND_.js";
|
|
6
|
+
import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-DteRDRCi.js";
|
|
7
7
|
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-kYP1FAX_.js";
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-Dw3eBN9S.js";
|
|
9
|
+
import { r as enqueueAgentInvocation } from "./work-qQEjtmlv.js";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
|
|
12
12
|
//#region src/chat/task-execution/mailbox-input.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { C as withLogContext, b as setTags, d as logException } from "./logging-
|
|
2
|
-
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-
|
|
3
|
-
import { d as credentialContextForActor } from "./registry-
|
|
4
|
-
import { At as loadProjection, Gt as hydrateConversationMessages, J as saveTurnCheckpoint, Kt as persistConversationMessages, Lt as recordAuthorizationCompleted, Tt as commitAcceptedReply, an as markConversationMessage, en as buildConversationContext, ln as upsertConversationMessage, on as normalizeConversationText, sn as recordDeliveredAssistantMessage, tt as persistWithRetry } from "./tasks-
|
|
1
|
+
import { C as withLogContext, b as setTags, d as logException } from "./logging-C22RdmU8.js";
|
|
2
|
+
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-DdzigZQh.js";
|
|
3
|
+
import { d as credentialContextForActor } from "./registry-BvsLuoLK.js";
|
|
4
|
+
import { At as loadProjection, Gt as hydrateConversationMessages, J as saveTurnCheckpoint, Kt as persistConversationMessages, Lt as recordAuthorizationCompleted, Tt as commitAcceptedReply, an as markConversationMessage, en as buildConversationContext, ln as upsertConversationMessage, on as normalizeConversationText, sn as recordDeliveredAssistantMessage, tt as persistWithRetry } from "./tasks-B8nH3ND_.js";
|
|
5
5
|
import { K as messageCardText } from "./conversation-NutPJ8S8.js";
|
|
6
6
|
import { f as markTurnFailed, p as startActiveTurn, t as authorizationId } from "./oauth-authorization-BA4Dt6a7.js";
|
|
7
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
8
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
9
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
10
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
11
|
-
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-
|
|
7
|
+
import { n as getAssistantReplyText } from "./assistant-reply-K5r1pcgJ.js";
|
|
8
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-BbSyWmOq.js";
|
|
9
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DSN0xGW7.js";
|
|
10
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BTOLzCM-.js";
|
|
11
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-BwNfO8Xt.js";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
13
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
14
14
|
//#region src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as sandboxEgressSignalsResponseSchema } from "./agent-runner-
|
|
1
|
+
import { At as sandboxEgressSignalsResponseSchema } from "./agent-runner-CNiTpIpb.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;
|
|
@@ -152,6 +152,22 @@ const codePersonReportSchema = z.object({
|
|
|
152
152
|
windowStart: z.string()
|
|
153
153
|
}).strict();
|
|
154
154
|
//#endregion
|
|
155
|
+
//#region src/api/schema/connection.ts
|
|
156
|
+
const connectionSchema = z.object({
|
|
157
|
+
provider: z.string(),
|
|
158
|
+
displayName: z.string(),
|
|
159
|
+
description: z.string(),
|
|
160
|
+
account: z.object({
|
|
161
|
+
label: z.string(),
|
|
162
|
+
url: z.string().optional()
|
|
163
|
+
}).strict().optional(),
|
|
164
|
+
connected: z.boolean()
|
|
165
|
+
}).strict();
|
|
166
|
+
const connectionListSchema = z.object({ connections: z.array(connectionSchema) }).strict();
|
|
167
|
+
const connectionParamsSchema = z.object({ provider: z.string().regex(/^[a-z][a-z0-9-]*$/).max(64) }).strict();
|
|
168
|
+
const startConnectionResponseSchema = z.object({ authorizationUrl: z.string().url() }).strict();
|
|
169
|
+
const disconnectConnectionResponseSchema = z.object({ disconnected: z.literal(true) }).strict();
|
|
170
|
+
//#endregion
|
|
155
171
|
//#region src/api/activity.ts
|
|
156
172
|
const dailyConversationActivitySchema = z.object({
|
|
157
173
|
active: z.number(),
|
|
@@ -400,4 +416,4 @@ const statsReportSchema = z.object({
|
|
|
400
416
|
windowStart: z.string()
|
|
401
417
|
}).strict();
|
|
402
418
|
//#endregion
|
|
403
|
-
export {
|
|
419
|
+
export { connectionSchema as A, codeRepositorySummarySchema as B, locationParamsSchema as C, dailyConversationActivitySchema as D, activitySixHours as E, codeChangeSummarySchema as F, conversationChildAgentsReportSchema as H, codeOverviewReportSchema as I, codePersonReportSchema as L, startConnectionResponseSchema as M, codeActivityDaySchema as N, connectionListSchema as O, codeChangeSummaryReportSchema as P, codeRepositoryParamsSchema as R, locationDirectoryReportSchema as S, activityHours as T, stopConversationTurnResponseSchema as U, conversationChildAgentSchema as V, apiErrorSchema as W, actorProfileReportSchema as _, workspaceBodySchema as a, locationActivityDayReportSchema as b, workspaceRepoSchema as c, createdPersonalTokenSchema as d, personalTokenListSchema as f, actorDirectoryReportSchema as g, revokePersonalTokenResponseSchema as h, deleteWorkspaceResponseSchema as i, disconnectConnectionResponseSchema as j, connectionParamsSchema as k, workspaceSchema as l, personalTokenParamsSchema as m, statsReportSchema as n, workspaceListSchema as o, personalTokenMetadataSchema as p, baselineSnapshotSchema as r, workspaceParamsSchema as s, statSchema as t, createPersonalTokenBodySchema as u, personParamsSchema as v, activityDays as w, locationDetailReportSchema as x, personalSpendReportSchema as y, codeRepositoryReportSchema as z };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { d as logException, f as logInfo, p as logWarn } from "./logging-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { f as getSqlExecutor, u as getConversationStore } from "./viewer-
|
|
2
|
+
import { d as logException, f as logInfo, p as logWarn } from "./logging-C22RdmU8.js";
|
|
3
|
+
import { n as botConfig } from "./config-Cb--Qs-g.js";
|
|
4
|
+
import { f as getSqlExecutor, u as getConversationStore } from "./viewer-DdzigZQh.js";
|
|
5
5
|
import { s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
|
|
6
|
-
import "./executor-
|
|
7
|
-
import { p as credentialSubjectSchema } from "./registry-
|
|
8
|
-
import { V as postSlackMessage, _t as isToolResultError, ht as isAssistantMessage, vt as isToolResultMessage, wt as ToolInputError, yt as normalizeToolNameFromResult } from "./tasks-
|
|
9
|
-
import { nt as verifyTimerWatchCredentialSubject, rt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins } from "./agent-hooks-
|
|
10
|
-
import { w as getStateAdapter } from "./profile-
|
|
11
|
-
import { r as sanitizeAssistantText } from "./assistant-reply-
|
|
6
|
+
import "./executor-D8y7v95s.js";
|
|
7
|
+
import { p as credentialSubjectSchema } from "./registry-BvsLuoLK.js";
|
|
8
|
+
import { V as postSlackMessage, _t as isToolResultError, ht as isAssistantMessage, vt as isToolResultMessage, wt as ToolInputError, yt as normalizeToolNameFromResult } from "./tasks-B8nH3ND_.js";
|
|
9
|
+
import { nt as verifyTimerWatchCredentialSubject, rt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins } from "./agent-hooks-CtZuJPTU.js";
|
|
10
|
+
import { w as getStateAdapter } from "./profile-DK9umvav.js";
|
|
11
|
+
import { r as sanitizeAssistantText } from "./assistant-reply-K5r1pcgJ.js";
|
|
12
12
|
import { r as EVENT_AUTHOR_ID } from "./prompt-kYP1FAX_.js";
|
|
13
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
13
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-Dw3eBN9S.js";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
import { eq, inArray } from "drizzle-orm";
|
|
16
16
|
import { eventMatchSchema, normalizeEventIdentifier, objectTypeSchema } from "@sentry/junior-plugin-api";
|
|
@@ -355,6 +355,7 @@ function renderTaskInput(args) {
|
|
|
355
355
|
if (!instructions) throw new Error("Task instructions are required");
|
|
356
356
|
const about = args.about?.trim();
|
|
357
357
|
const creator = args.creator?.trim();
|
|
358
|
+
const people = (args.people ?? []).map((person) => oneLine(person)).filter(Boolean);
|
|
358
359
|
const lines = [
|
|
359
360
|
"[task]",
|
|
360
361
|
"",
|
|
@@ -362,6 +363,7 @@ function renderTaskInput(args) {
|
|
|
362
363
|
"",
|
|
363
364
|
...about ? [`About: ${oneLine(about)}`] : [],
|
|
364
365
|
...creator ? [`Created by: ${oneLine(creator)}. "Me" and "my" in the instructions mean this person: mention them in the message. If the instructions do not say "me" or "my", do not mention this person.`] : [],
|
|
366
|
+
...people.length > 0 ? [`People involved: ${people.join(", ")}`] : [],
|
|
365
367
|
`Instructions: ${instructions}`
|
|
366
368
|
];
|
|
367
369
|
const guidance = args.guidance?.trim();
|
|
@@ -629,10 +631,11 @@ const EVENT_WAIT_MS = 3e4;
|
|
|
629
631
|
* Keep this short: facts the model cannot reconstruct, plus a one-line handling
|
|
630
632
|
* contract. Stable delivery rules live in runtime and docs, not this prompt.
|
|
631
633
|
*/
|
|
632
|
-
function renderEventNotificationText(subscription, event) {
|
|
633
|
-
const guidance = eventGuidance(getEventCatalog(), event.namespace, subscription.resourceType, event.eventType);
|
|
634
|
+
function renderEventNotificationText(subscription, event, people = []) {
|
|
635
|
+
const guidance = [eventGuidance(getEventCatalog(), event.namespace, subscription.resourceType, event.eventType), subscription.guidance?.[event.eventType]].filter((text) => Boolean(text?.trim())).join(" ");
|
|
634
636
|
return renderTaskInput({
|
|
635
637
|
about: subscription.label,
|
|
638
|
+
people,
|
|
636
639
|
instructions: subscription.intent,
|
|
637
640
|
guidance,
|
|
638
641
|
trustedSummary: event.trustedSummary,
|
|
@@ -728,7 +731,7 @@ async function enqueueEventNotification(args) {
|
|
|
728
731
|
});
|
|
729
732
|
return { status: "duplicate" };
|
|
730
733
|
}
|
|
731
|
-
const text = renderEventNotificationText(args.subscription, args.event);
|
|
734
|
+
const text = renderEventNotificationText(args.subscription, args.event, args.people);
|
|
732
735
|
return await appendAndEnqueueInboundMessage({
|
|
733
736
|
message: createEventInboundMessage({
|
|
734
737
|
event: args.event,
|
|
@@ -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-C22RdmU8.js";
|
|
3
3
|
import { s as skillRoots } from "./package-discovery-BVvSnQBB.js";
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BQ3g3OX_.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 { Bt as toolInvocationDestination, zt as actorFromRun } from "./agent-runner-
|
|
3
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { Bt as toolInvocationDestination, zt as actorFromRun } from "./agent-runner-CNiTpIpb.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-qQEjtmlv.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,10 +1,10 @@
|
|
|
1
|
-
import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-
|
|
2
|
-
import { i as getChatConfig } from "./config-
|
|
1
|
+
import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-C22RdmU8.js";
|
|
2
|
+
import { i as getChatConfig } from "./config-Cb--Qs-g.js";
|
|
3
3
|
import { s as parseStoredSlackActor } from "./actor-BTtLaeWy.js";
|
|
4
|
-
import { F as sameDestination, N as parseDestination, u as getConversationStore } from "./viewer-
|
|
5
|
-
import { rt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-
|
|
6
|
-
import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-
|
|
7
|
-
import "./job-queue-
|
|
4
|
+
import { F as sameDestination, N as parseDestination, u as getConversationStore } from "./viewer-DdzigZQh.js";
|
|
5
|
+
import { rt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-CtZuJPTU.js";
|
|
6
|
+
import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-DK9umvav.js";
|
|
7
|
+
import "./job-queue-uGq6Grnt.js";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
10
|
import { destinationSchema } from "@sentry/junior-plugin-api";
|
|
@@ -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-C22RdmU8.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-uGq6Grnt.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import { handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
@@ -115,7 +115,7 @@ function pluginTaskCallback() {
|
|
|
115
115
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
116
116
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
117
117
|
run: async (message) => {
|
|
118
|
-
const { processPluginTask } = await import("./task-runner-
|
|
118
|
+
const { processPluginTask } = await import("./task-runner-BbSyWmOq.js").then((n) => n.r);
|
|
119
119
|
await processPluginTask(message);
|
|
120
120
|
},
|
|
121
121
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { h as runBestEffort, p as logWarn } from "./logging-
|
|
2
|
+
import { h as runBestEffort, p as logWarn } from "./logging-C22RdmU8.js";
|
|
3
3
|
import { g as parseSlackMessageTs } from "./actor-BTtLaeWy.js";
|
|
4
|
-
import { C as agentTurnTotalTokens, S as agentTurnCostUsd, d as getDb, r as readActorIdentity, u as getConversationStore } from "./viewer-
|
|
4
|
+
import { C as agentTurnTotalTokens, S as agentTurnCostUsd, d as getDb, r as readActorIdentity, u as getConversationStore } from "./viewer-DdzigZQh.js";
|
|
5
5
|
import { s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
|
|
6
|
-
import { c as juniorAutomationExecutions } from "./executor-
|
|
6
|
+
import { c as juniorAutomationExecutions } from "./executor-D8y7v95s.js";
|
|
7
7
|
import { m as sameActorIdentity } from "./history-9pO1Zd4Y.js";
|
|
8
|
-
import { p as credentialSubjectSchema } from "./registry-
|
|
9
|
-
import { Gt as hydrateConversationMessages, M as formatSlackLink, Q as getTurnRecord, V as postSlackMessage, Zt as fallbackShortTitle, _t as isToolResultError, a as readScheduledAutomation, g as getEventAutomation, j as escapeSlackMrkdwnText, mt as instructionTextForProjection, u as blockEventAutomation, ut as getPiMessageRole, vt as isToolResultMessage, xt as stripRuntimeTurnContext, yt as normalizeToolNameFromResult, z as openSlackDirectMessage } from "./tasks-
|
|
10
|
-
import { ct as createPluginState, dt as createPluginLogger, lt as createPluginEmbedder, ot as getDashboardTaskLink, p as coreTaskRegistrations, rt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, ut as createPluginModel, xt as createPluginConversationEvents } from "./agent-hooks-
|
|
11
|
-
import { w as getStateAdapter } from "./profile-
|
|
12
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
13
|
-
import { t as resolveConversationRouting } from "./turn-session-routing-
|
|
14
|
-
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-
|
|
8
|
+
import { p as credentialSubjectSchema } from "./registry-BvsLuoLK.js";
|
|
9
|
+
import { Gt as hydrateConversationMessages, M as formatSlackLink, Q as getTurnRecord, V as postSlackMessage, Zt as fallbackShortTitle, _t as isToolResultError, a as readScheduledAutomation, g as getEventAutomation, j as escapeSlackMrkdwnText, mt as instructionTextForProjection, u as blockEventAutomation, ut as getPiMessageRole, vt as isToolResultMessage, xt as stripRuntimeTurnContext, yt as normalizeToolNameFromResult, z as openSlackDirectMessage } from "./tasks-B8nH3ND_.js";
|
|
10
|
+
import { ct as createPluginState, dt as createPluginLogger, lt as createPluginEmbedder, ot as getDashboardTaskLink, p as coreTaskRegistrations, rt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, ut as createPluginModel, xt as createPluginConversationEvents } from "./agent-hooks-CtZuJPTU.js";
|
|
11
|
+
import { w as getStateAdapter } from "./profile-DK9umvav.js";
|
|
12
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BTOLzCM-.js";
|
|
13
|
+
import { t as resolveConversationRouting } from "./turn-session-routing-BRKYIn6n.js";
|
|
14
|
+
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-C7cyjcVj.js";
|
|
15
15
|
import { z } from "zod";
|
|
16
16
|
import { createHash } from "node:crypto";
|
|
17
17
|
import { and, asc, count, desc, eq, gte, inArray, lte, max, or, sql } from "drizzle-orm";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { d as unwrapCurrentInstruction, f as escapeXml, i as completeText, o as resolveGatewayModel } from "./client-
|
|
2
|
-
import { d as logException, o as getActiveTraceId, p as logWarn, s as getLogContextAttributes, t as buildTurnFailureResponse, v as setSpanAttributes } from "./logging-
|
|
1
|
+
import { d as unwrapCurrentInstruction, f as escapeXml, i as completeText, o as resolveGatewayModel } from "./client-Q27hki0Y.js";
|
|
2
|
+
import { d as logException, o as getActiveTraceId, p as logWarn, s as getLogContextAttributes, t as buildTurnFailureResponse, v as setSpanAttributes } from "./logging-C22RdmU8.js";
|
|
3
3
|
import { n as captureMessage } from "./sentry-CgWZM_kV.js";
|
|
4
|
-
import { n as botConfig, v as normalizeSlackEmojiName } from "./config-
|
|
4
|
+
import { n as botConfig, v as normalizeSlackEmojiName } from "./config-Cb--Qs-g.js";
|
|
5
5
|
import { c as toStoredSlackActor, f as parseSlackUserId, g as parseSlackMessageTs } from "./actor-BTtLaeWy.js";
|
|
6
|
-
import { c as getConversationEventStore, f as getSqlExecutor, m as withConversationEventLock, p as createSqlConversationEventStore, u as getConversationStore, v as startLocationThread, x as addAgentTurnUsage, y as bindProviderConversation } from "./viewer-
|
|
7
|
-
import { a as juniorSchedulerRuns, o as juniorSchedulerTasks, s as juniorAutomationVersions, u as juniorEventAutomations } from "./executor-
|
|
6
|
+
import { c as getConversationEventStore, f as getSqlExecutor, m as withConversationEventLock, p as createSqlConversationEventStore, u as getConversationStore, v as startLocationThread, x as addAgentTurnUsage, y as bindProviderConversation } from "./viewer-DdzigZQh.js";
|
|
7
|
+
import { a as juniorSchedulerRuns, o as juniorSchedulerTasks, s as juniorAutomationVersions, u as juniorEventAutomations } from "./executor-D8y7v95s.js";
|
|
8
8
|
import { d as contextProvenance, f as instructionActors, n as agentHistoryItemSchema, p as instructionProvenanceFor } from "./history-9pO1Zd4Y.js";
|
|
9
|
-
import { p as credentialSubjectSchema } from "./registry-
|
|
10
|
-
import { Kt as withSlackRetries, Lt as SlackActionError, Qt as authenticationUnlinkedEvent, Vt as getSlackClient, Wt as normalizeSlackConversationId, Xt as agentsInstructionsUpdatedEvent, Yt as JUNIOR_NATIVE_EVENT_NAMESPACE, Zt as authenticationLinkedEvent, n as applyPluginFormatMarkdown } from "./agent-hooks-
|
|
9
|
+
import { p as credentialSubjectSchema } from "./registry-BvsLuoLK.js";
|
|
10
|
+
import { Kt as withSlackRetries, Lt as SlackActionError, Qt as authenticationUnlinkedEvent, Vt as getSlackClient, Wt as normalizeSlackConversationId, Xt as agentsInstructionsUpdatedEvent, Yt as JUNIOR_NATIVE_EVENT_NAMESPACE, Zt as authenticationLinkedEvent, n as applyPluginFormatMarkdown } from "./agent-hooks-CtZuJPTU.js";
|
|
11
11
|
import { G as messageCardRef } from "./conversation-NutPJ8S8.js";
|
|
12
|
-
import { D as fenceLock, O as withLock, T as MUTATION_LOCK_TTL_MS, k as sleep, w as getStateAdapter } from "./profile-
|
|
12
|
+
import { D as fenceLock, O as withLock, T as MUTATION_LOCK_TTL_MS, k as sleep, w as getStateAdapter } from "./profile-DK9umvav.js";
|
|
13
13
|
import { A as eventAutomationSchema, D as scheduledRunSchema, E as scheduledAutomationSchema, S as automationVersionSchema } from "./automation-gznOMaQ2.js";
|
|
14
14
|
import { isDeepStrictEqual } from "node:util";
|
|
15
15
|
import { z } from "zod";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-
|
|
2
|
-
import { d as getDb } from "./viewer-
|
|
1
|
+
import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-C22RdmU8.js";
|
|
2
|
+
import { d as getDb } from "./viewer-DdzigZQh.js";
|
|
3
3
|
import { d as juniorDestinations } from "./agent-invocations-D_YoNnAn.js";
|
|
4
|
-
import { d as juniorLocationConfigurations } from "./executor-
|
|
5
|
-
import { Kt as persistConversationMessages } from "./tasks-
|
|
6
|
-
import { rt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-
|
|
7
|
-
import { w as getStateAdapter } from "./profile-
|
|
4
|
+
import { d as juniorLocationConfigurations } from "./executor-D8y7v95s.js";
|
|
5
|
+
import { Kt as persistConversationMessages } from "./tasks-B8nH3ND_.js";
|
|
6
|
+
import { rt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-CtZuJPTU.js";
|
|
7
|
+
import { w as getStateAdapter } from "./profile-DK9umvav.js";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
10
|
import { and, eq, sql } from "drizzle-orm";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { _ as getProviderErrorUserMessage, g as getProviderErrorAttributes, h as findProviderError, p as ProviderError } from "./client-
|
|
2
|
-
import { I as isRecord, t as buildTurnFailureResponse } from "./logging-
|
|
1
|
+
import { _ as getProviderErrorUserMessage, g as getProviderErrorAttributes, h as findProviderError, p as ProviderError } from "./client-Q27hki0Y.js";
|
|
2
|
+
import { I as isRecord, t as buildTurnFailureResponse } from "./logging-C22RdmU8.js";
|
|
3
3
|
import { g as parseSlackMessageTs } from "./actor-BTtLaeWy.js";
|
|
4
|
-
import { c as getConversationEventStore, d as getDb } from "./viewer-
|
|
5
|
-
import { Gt as hydrateConversationMessages, an as markConversationMessage } from "./tasks-
|
|
6
|
-
import { Mt as listConversationAnnotations } from "./agent-hooks-
|
|
4
|
+
import { c as getConversationEventStore, d as getDb } from "./viewer-DdzigZQh.js";
|
|
5
|
+
import { Gt as hydrateConversationMessages, an as markConversationMessage } from "./tasks-B8nH3ND_.js";
|
|
6
|
+
import { Mt as listConversationAnnotations } from "./agent-hooks-CtZuJPTU.js";
|
|
7
7
|
import { J as removedCardSchema, Y as resolveMessageCards, q as readMessageCardRefs } from "./conversation-NutPJ8S8.js";
|
|
8
|
-
import { r as clearPendingAuth, u as buildDeterministicTurnId } from "./pending-auth-
|
|
8
|
+
import { r as clearPendingAuth, u as buildDeterministicTurnId } from "./pending-auth-Bg3A1-pE.js";
|
|
9
9
|
import { d as markTurnCompleted, u as markTurnClosed } from "./oauth-authorization-BA4Dt6a7.js";
|
|
10
|
-
import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
10
|
+
import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BTOLzCM-.js";
|
|
11
11
|
//#region src/chat/conversations/pending-cards.ts
|
|
12
12
|
/** Select undelivered cards and load their latest saved facts. */
|
|
13
13
|
async function loadPendingMessageCards(conversationId) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as getConversationEventStore } from "./viewer-
|
|
1
|
+
import { c as getConversationEventStore } from "./viewer-DdzigZQh.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("./viewer-
|
|
37
|
+
const conversationStore = args.conversationStore ?? (await import("./viewer-DdzigZQh.js").then((n) => n.s)).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-BQ3g3OX_.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-CkwwLVLb.js";
|
|
2
2
|
export { JUNIOR_VERSION };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { F as normalizeIdentityEmail } from "./logging-
|
|
3
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
+
import { F as normalizeIdentityEmail } from "./logging-C22RdmU8.js";
|
|
3
|
+
import { i as getChatConfig } from "./config-Cb--Qs-g.js";
|
|
4
4
|
import { d as parseSlackTeamId, o as parseActorUserId, u as parseSlackChannelReferenceId } from "./actor-BTtLaeWy.js";
|
|
5
5
|
import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, o as conversationReadColumns, s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
|
|
6
|
-
import { _ as juniorConversationEvents, f as juniorConversationParticipants, g as juniorConversationMetrics, h as CONVERSATION_METRICS, p as juniorConversationBindings, t as createJuniorSqlExecutor, y as juniorConversationAnnotations } from "./executor-
|
|
6
|
+
import { _ as juniorConversationEvents, f as juniorConversationParticipants, g as juniorConversationMetrics, h as CONVERSATION_METRICS, p as juniorConversationBindings, t as createJuniorSqlExecutor, y as juniorConversationAnnotations } from "./executor-D8y7v95s.js";
|
|
7
7
|
import { c as newConversationEventSchema, h as usageSchema, l as encodeHistoryPayload, o as decodeStoredConversationEvent, r as conversationEventDataSchema, s as historyReplacementSchema } from "./history-9pO1Zd4Y.js";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
import { and, asc, desc, eq, gt, gte, inArray, isNull, lt, lte, ne, or, sql } from "drizzle-orm";
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { A as resolveSlackChannelIdFromMessage, B as effectiveTaskOutcomes, C as renderBlockText, D as storeAttachment, Ft as createUserTokenStore, It as buildSteeringPiMessage, Lt as withoutSavedSteeringMessages, M as getConversationInfo, N as listThreadReplies, O as parseSlackThreadId, Rt as RetryableDeliveryError, S as renderAttachmentText, Ut as shouldEmitDevAgentTrace, Vt as AuthorizationFlowDisabledError, a as buildAuthPauseResponse, h as latestProgressStatus, j as resolveSlackChannelIdFromThreadId, k as readSlackRawMessageContext, m as PluginCredentialFailureError, n as executeAgentRun, r as createContextCompactor, t as createAgentRunner, z as eventAutomationTriggerAvailable } from "./agent-runner-
|
|
2
|
-
import { f as escapeXml, i as completeText, r as completeObject, v as isProviderRetryError } 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 { c as getSlackClientSecret, i as getChatConfig, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, s as getSlackClientId, v as normalizeSlackEmojiName } from "./config-
|
|
1
|
+
import { A as resolveSlackChannelIdFromMessage, B as effectiveTaskOutcomes, C as renderBlockText, D as storeAttachment, Ft as createUserTokenStore, It as buildSteeringPiMessage, Lt as withoutSavedSteeringMessages, M as getConversationInfo, N as listThreadReplies, O as parseSlackThreadId, Rt as RetryableDeliveryError, S as renderAttachmentText, Ut as shouldEmitDevAgentTrace, Vt as AuthorizationFlowDisabledError, a as buildAuthPauseResponse, h as latestProgressStatus, j as resolveSlackChannelIdFromThreadId, k as readSlackRawMessageContext, m as PluginCredentialFailureError, n as executeAgentRun, r as createContextCompactor, t as createAgentRunner, z as eventAutomationTriggerAvailable } from "./agent-runner-CNiTpIpb.js";
|
|
2
|
+
import { f as escapeXml, i as completeText, r as completeObject, v as isProviderRetryError } from "./client-Q27hki0Y.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-C22RdmU8.js";
|
|
4
|
+
import { c as getSlackClientSecret, i as getChatConfig, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, s as getSlackClientId, v as normalizeSlackEmojiName } from "./config-Cb--Qs-g.js";
|
|
5
5
|
import { o as modelIdForProfile, r as defaultModelId } from "./model-profile-BwU8mqwD.js";
|
|
6
6
|
import { a as isUserActor, g as parseSlackMessageTs, i as isActorUserId, l as parseSlackChannelId, n as createSlackActor, o as parseActorUserId, r as createSlackResumeActor, t as createActor } from "./actor-BTtLaeWy.js";
|
|
7
|
-
import { M as createSlackDestination, P as requireSlackDestination, c as getConversationEventStore, d as getDb, f as getSqlExecutor, u as getConversationStore } from "./viewer-
|
|
7
|
+
import { M as createSlackDestination, P as requireSlackDestination, c as getConversationEventStore, d as getDb, f as getSqlExecutor, u as getConversationStore } from "./viewer-DdzigZQh.js";
|
|
8
8
|
import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers } from "./agent-invocations-D_YoNnAn.js";
|
|
9
|
-
import { c as juniorAutomationExecutions, o as juniorSchedulerTasks, u as juniorEventAutomations } from "./executor-
|
|
9
|
+
import { c as juniorAutomationExecutions, o as juniorSchedulerTasks, u as juniorEventAutomations } from "./executor-D8y7v95s.js";
|
|
10
10
|
import { p as instructionProvenanceFor } from "./history-9pO1Zd4Y.js";
|
|
11
|
-
import { d as credentialContextForActor } from "./registry-
|
|
12
|
-
import { $ as listTurnSummaries, $t as appendThreadContextMessages, At as loadProjection, D as sameDefinitionValue, Et as commitMessages, Gt as hydrateConversationMessages, H as removeReactionFromMessage, I as truncateStatusText, J as saveTurnCheckpoint, Jt as persistConversationMessageSummaries, Kt as persistConversationMessages, L as addReactionToMessage, Lt as recordAuthorizationCompleted, M as formatSlackLink, N as normalizeSlackReplyMarkdown, Ot as loadConversationProjection, P as normalizeSlackStatusText, Q as getTurnRecord, St as trimTrailingAssistantMessages, T as listAutomationVersions, Tt as commitAcceptedReply, V as postSlackMessage, Vt as recordSubscribedReplyRoute, X as completeTurnRecord, Y as abandonTurnRecord, Yt as resolveConversationTitle, Z as failTurnRecord, Zt as fallbackShortTitle, _ as listDeletedEventAutomationsCreatedBy, a as readScheduledAutomation, an as markConversationMessage, cn as turnHasReply, en as buildConversationContext, et as recordTurnSummary, g as getEventAutomation, i as parseScheduledAutomationRow, in as isHumanConversationMessage, j as escapeSlackMrkdwnText, l as withScheduledAutomationLock, ln as upsertConversationMessage, m as eventAutomationBelongsToUser, nn as estimateConversationContextTokens, on as normalizeConversationText, ot as buildTurnErrorResponse, p as deleteEventAutomation, q as loadTurnCheckpoint, rn as getConversationMessageSlackTs, s as saveScheduledAutomationInLock, sn as recordDeliveredAssistantMessage, tn as createConversationMemoryService, tt as persistWithRetry, w as automationDefinition, y as parseEventAutomationRow } from "./tasks-
|
|
13
|
-
import { Bt as getHeaderString, Dt as readAttachmentVisionSummary, Gt as runWithSlackInstallationToken, It as lookupSlackUser, Lt as SlackActionError, Ot as recordSlackAttachment, Rt as downloadPrivateSlackFile, Tt as getSlackFileId, Ut as isDmChannel, V as cancelSubscriptions, Vt as getSlackClient, Wt as normalizeSlackConversationId, at as getDashboardObjectIconLink, it as getDashboardConversationLink, nt as verifyTimerWatchCredentialSubject, o as getPluginSlackConversationLink, rt as JUNIOR_THREAD_STATE_TTL_MS, wt as buildSentryConversationUrl } from "./agent-hooks-
|
|
11
|
+
import { d as credentialContextForActor } from "./registry-BvsLuoLK.js";
|
|
12
|
+
import { $ as listTurnSummaries, $t as appendThreadContextMessages, At as loadProjection, D as sameDefinitionValue, Et as commitMessages, Gt as hydrateConversationMessages, H as removeReactionFromMessage, I as truncateStatusText, J as saveTurnCheckpoint, Jt as persistConversationMessageSummaries, Kt as persistConversationMessages, L as addReactionToMessage, Lt as recordAuthorizationCompleted, M as formatSlackLink, N as normalizeSlackReplyMarkdown, Ot as loadConversationProjection, P as normalizeSlackStatusText, Q as getTurnRecord, St as trimTrailingAssistantMessages, T as listAutomationVersions, Tt as commitAcceptedReply, V as postSlackMessage, Vt as recordSubscribedReplyRoute, X as completeTurnRecord, Y as abandonTurnRecord, Yt as resolveConversationTitle, Z as failTurnRecord, Zt as fallbackShortTitle, _ as listDeletedEventAutomationsCreatedBy, a as readScheduledAutomation, an as markConversationMessage, cn as turnHasReply, en as buildConversationContext, et as recordTurnSummary, g as getEventAutomation, i as parseScheduledAutomationRow, in as isHumanConversationMessage, j as escapeSlackMrkdwnText, l as withScheduledAutomationLock, ln as upsertConversationMessage, m as eventAutomationBelongsToUser, nn as estimateConversationContextTokens, on as normalizeConversationText, ot as buildTurnErrorResponse, p as deleteEventAutomation, q as loadTurnCheckpoint, rn as getConversationMessageSlackTs, s as saveScheduledAutomationInLock, sn as recordDeliveredAssistantMessage, tn as createConversationMemoryService, tt as persistWithRetry, w as automationDefinition, y as parseEventAutomationRow } from "./tasks-B8nH3ND_.js";
|
|
13
|
+
import { Bt as getHeaderString, Dt as readAttachmentVisionSummary, Gt as runWithSlackInstallationToken, It as lookupSlackUser, Lt as SlackActionError, Ot as recordSlackAttachment, Rt as downloadPrivateSlackFile, Tt as getSlackFileId, Ut as isDmChannel, V as cancelSubscriptions, Vt as getSlackClient, Wt as normalizeSlackConversationId, at as getDashboardObjectIconLink, it as getDashboardConversationLink, nt as verifyTimerWatchCredentialSubject, o as getPluginSlackConversationLink, rt as JUNIOR_THREAD_STATE_TTL_MS, wt as buildSentryConversationUrl } from "./agent-hooks-CtZuJPTU.js";
|
|
14
14
|
import { F as readMessageAttachments, R as isVisionImageMediaType } from "./conversation-NutPJ8S8.js";
|
|
15
|
-
import { E as acquireActiveLock, O as withLock, T as MUTATION_LOCK_TTL_MS, w as getStateAdapter } from "./profile-
|
|
16
|
-
import { a as wasPendingAuthStopped, c as getThreadStopDecision, l as buildDeterministicAssistantMessageId, o as decideSubscribedThreadReply, r as clearPendingAuth, s as getSubscribedReplyPreflightDecision, u as buildDeterministicTurnId } from "./pending-auth-
|
|
15
|
+
import { E as acquireActiveLock, O as withLock, T as MUTATION_LOCK_TTL_MS, w as getStateAdapter } from "./profile-DK9umvav.js";
|
|
16
|
+
import { a as wasPendingAuthStopped, c as getThreadStopDecision, l as buildDeterministicAssistantMessageId, o as decideSubscribedThreadReply, r as clearPendingAuth, s as getSubscribedReplyPreflightDecision, u as buildDeterministicTurnId } from "./pending-auth-Bg3A1-pE.js";
|
|
17
17
|
import { a as TurnInputDeferredError, c as isTurnInputCommitLostError, d as markTurnCompleted, f as markTurnFailed, i as TurnInputCommitLostError, l as isTurnInputDeferredError, n as ConversationTurnBoundaryError, o as getConversationTurnBoundaryError, p as startActiveTurn, r as CooperativeTurnYieldError, s as isCooperativeTurnYieldError, u as markTurnClosed } from "./oauth-authorization-BA4Dt6a7.js";
|
|
18
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
19
|
-
import { A as recordFinishedTurnForAutomatedLimit, F as finishedRunReply, P as deliversFinalText, R as runDispatchOutcome, c as timerWatchCredentialSubject, i as skipInputBeforeConversationStop, k as maybePostAutomatedTurnLimitNotice, l as getEventCatalog, s as isEventMailboxMetadata, v as automationEventCatalog } from "./session-stop-
|
|
18
|
+
import { n as getAssistantReplyText } from "./assistant-reply-K5r1pcgJ.js";
|
|
19
|
+
import { A as recordFinishedTurnForAutomatedLimit, F as finishedRunReply, P as deliversFinalText, R as runDispatchOutcome, c as timerWatchCredentialSubject, i as skipInputBeforeConversationStop, k as maybePostAutomatedTurnLimitNotice, l as getEventCatalog, s as isEventMailboxMetadata, v as automationEventCatalog } from "./session-stop-DteRDRCi.js";
|
|
20
20
|
import { a as EVENT_SYSTEM_ACTOR, o as isEventConversationMessage } from "./prompt-kYP1FAX_.js";
|
|
21
|
-
import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline } from "./job-queue-
|
|
22
|
-
import { E as stopConversationWork, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, n as appendAndEnqueueExclusiveInboundMessage, r as appendAndEnqueueInboundMessage, w as requestConversationWork } from "./store-
|
|
21
|
+
import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline } from "./job-queue-uGq6Grnt.js";
|
|
22
|
+
import { E as stopConversationWork, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, n as appendAndEnqueueExclusiveInboundMessage, r as appendAndEnqueueInboundMessage, w as requestConversationWork } from "./store-Dw3eBN9S.js";
|
|
23
23
|
import { l as automationListQuerySchema } from "./automation-gznOMaQ2.js";
|
|
24
24
|
import { r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
|
|
25
25
|
import { c as sumUtcHoursIntoSixHours, m as healthReportSchema, t as webMessageId } from "./web-message-id-xPI_EFSC.js";
|
|
26
|
-
import { C as readAutomationExecutionHours, D as readAutomationExecutions, E as readAutomationExecutionSummaries, O as readAutomationRuns, S as readAutomationExecutionDays, T as readAutomationExecutionStatusHours, _ as markDispatchFailed, a as confirmDispatchMailboxAppend, b as emptyAutomationRunWindows, 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 readAutomationExecutionStatusDays, x as readAutomationExecutionByConversationId } from "./task-runner-
|
|
27
|
-
import { a as withAgentInvocationResultActors, c as resolveMailboxTurnWork, f as joinMailboxText, i as startAgentInvocationsForChildInput, l as sourceFromTurnInput, o as getAuthPausedConversationTurnId, s as getEventBatchDelayMs, t as enqueueAgentInvocationResult, u as turnInputFactsFromConversationMessage } from "./result-
|
|
28
|
-
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
29
|
-
import { i as resolveAgentInvocationId, o as AgentRunError, s as executeTurn, t as createAgentInvocationWorker } from "./work-
|
|
30
|
-
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-
|
|
31
|
-
import {
|
|
32
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-
|
|
33
|
-
import { t as bindMessageAgent } from "./message-
|
|
34
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
35
|
-
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-
|
|
36
|
-
import { r as storeInputImages } from "./images-
|
|
26
|
+
import { C as readAutomationExecutionHours, D as readAutomationExecutions, E as readAutomationExecutionSummaries, O as readAutomationRuns, S as readAutomationExecutionDays, T as readAutomationExecutionStatusHours, _ as markDispatchFailed, a as confirmDispatchMailboxAppend, b as emptyAutomationRunWindows, 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 readAutomationExecutionStatusDays, x as readAutomationExecutionByConversationId } from "./task-runner-BbSyWmOq.js";
|
|
27
|
+
import { a as withAgentInvocationResultActors, c as resolveMailboxTurnWork, f as joinMailboxText, i as startAgentInvocationsForChildInput, l as sourceFromTurnInput, o as getAuthPausedConversationTurnId, s as getEventBatchDelayMs, t as enqueueAgentInvocationResult, u as turnInputFactsFromConversationMessage } from "./result-CcdQ2iau.js";
|
|
28
|
+
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-DSN0xGW7.js";
|
|
29
|
+
import { i as resolveAgentInvocationId, o as AgentRunError, s as executeTurn, t as createAgentInvocationWorker } from "./work-qQEjtmlv.js";
|
|
30
|
+
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-BTOLzCM-.js";
|
|
31
|
+
import { c as deleteWebAuthorization, d as getPausedTurnRequest, m as getTurnAuthorization, p as wakePausedTurn, s as createWebAuthorization, u as createPausedTurns } from "./connections-DZ70JeSN.js";
|
|
32
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-BRKYIn6n.js";
|
|
33
|
+
import { t as bindMessageAgent } from "./message-D0RPetp-.js";
|
|
34
|
+
import { t as bindSpawnAgent } from "./spawn-CA0YYtzr.js";
|
|
35
|
+
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-BwNfO8Xt.js";
|
|
36
|
+
import { r as storeInputImages } from "./images-BkGhqKIK.js";
|
|
37
37
|
import { z } from "zod";
|
|
38
38
|
import { createHash } from "node:crypto";
|
|
39
39
|
import { and, asc, count, desc, eq, exists, inArray, ne, or, sql } from "drizzle-orm";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { $ as getAgentInvocation, G as recordSubagentStarted, H as stopChildAgentsOf, Ht as readBlockedReport, It as buildSteeringPiMessage, J as createAgentInvocation, Lt as withoutSavedSteeringMessages, Q as getActiveAgentInvocationForConversation, Vt as AuthorizationFlowDisabledError, W as recordSubagentEnded, at as getAgentInvocationTurnId, ct as isTerminalAgentInvocation, dt as markAgentInvocationMailboxAppended, gt as reportReplacedAgentInvocation, ht as markAgentInvocationSteered, m as PluginCredentialFailureError, mt as markAgentInvocationRunning, pt as markAgentInvocationPaused, q as completeAgentInvocation, rt as getAgentInvocationMessageId, st as getLatestAgentInvocationForConversation } from "./agent-runner-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-
|
|
2
|
+
import { $ as getAgentInvocation, G as recordSubagentStarted, H as stopChildAgentsOf, Ht as readBlockedReport, It as buildSteeringPiMessage, J as createAgentInvocation, Lt as withoutSavedSteeringMessages, Q as getActiveAgentInvocationForConversation, Vt as AuthorizationFlowDisabledError, W as recordSubagentEnded, at as getAgentInvocationTurnId, ct as isTerminalAgentInvocation, dt as markAgentInvocationMailboxAppended, gt as reportReplacedAgentInvocation, ht as markAgentInvocationSteered, m as PluginCredentialFailureError, mt as markAgentInvocationRunning, pt as markAgentInvocationPaused, q as completeAgentInvocation, rt as getAgentInvocationMessageId, st as getLatestAgentInvocationForConversation } from "./agent-runner-CNiTpIpb.js";
|
|
3
|
+
import { n as botConfig } from "./config-Cb--Qs-g.js";
|
|
4
|
+
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-DdzigZQh.js";
|
|
5
5
|
import { m as sameActorIdentity, u as agentInstructionProvenance } from "./history-9pO1Zd4Y.js";
|
|
6
|
-
import { J as saveTurnCheckpoint, Nt as openConversationProjection, Q as getTurnRecord, Y as abandonTurnRecord, Z as failTurnRecord, ct as isTurnExecutionLimitExceededError, dt as getTerminalAssistantMessages } from "./tasks-
|
|
6
|
+
import { J as saveTurnCheckpoint, Nt as openConversationProjection, Q as getTurnRecord, Y as abandonTurnRecord, Z as failTurnRecord, ct as isTurnExecutionLimitExceededError, dt as getTerminalAssistantMessages } from "./tasks-B8nH3ND_.js";
|
|
7
7
|
import { c as isTurnInputCommitLostError, i as TurnInputCommitLostError, o as getConversationTurnBoundaryError } from "./oauth-authorization-BA4Dt6a7.js";
|
|
8
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
9
|
-
import { A as recordFinishedTurnForAutomatedLimit, j as resetAutomatedTurnLimit, k as maybePostAutomatedTurnLimitNotice } from "./session-stop-
|
|
10
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
11
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
12
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-
|
|
8
|
+
import { n as getAssistantReplyText } from "./assistant-reply-K5r1pcgJ.js";
|
|
9
|
+
import { A as recordFinishedTurnForAutomatedLimit, j as resetAutomatedTurnLimit, k as maybePostAutomatedTurnLimitNotice } from "./session-stop-DteRDRCi.js";
|
|
10
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-Dw3eBN9S.js";
|
|
11
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DSN0xGW7.js";
|
|
12
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-BTOLzCM-.js";
|
|
13
13
|
import { isDeepStrictEqual } from "node:util";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
//#region src/chat/runtime/turn-execution.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { v as isProviderRetryError } from "./client-
|
|
3
|
-
import { C as withLogContext, d as logException, f as logInfo, p as logWarn } from "./logging-
|
|
4
|
-
import { i as getChatConfig } from "./config-
|
|
5
|
-
import { f as getTurnRequestDeadline, m as ConversationQueueMessageRejectedError } from "./job-queue-
|
|
6
|
-
import { C as requestAnotherSlice, M as isInvalidConversationRecordError, T as startConversationWork, b as recordConversationRetry, d as countPendingConversationMessages, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, j as isFinalAttempt, k as hasConversationStop, l as completeConversationStop, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, s as clearConsumedConversationWake, t as ackMessages, u as completeConversationWork, x as releaseConversationWork, y as recordAttemptFailure } from "./store-
|
|
2
|
+
import { v as isProviderRetryError } from "./client-Q27hki0Y.js";
|
|
3
|
+
import { C as withLogContext, d as logException, f as logInfo, p as logWarn } from "./logging-C22RdmU8.js";
|
|
4
|
+
import { i as getChatConfig } from "./config-Cb--Qs-g.js";
|
|
5
|
+
import { f as getTurnRequestDeadline, m as ConversationQueueMessageRejectedError } from "./job-queue-uGq6Grnt.js";
|
|
6
|
+
import { C as requestAnotherSlice, M as isInvalidConversationRecordError, T as startConversationWork, b as recordConversationRetry, d as countPendingConversationMessages, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, j as isFinalAttempt, k as hasConversationStop, l as completeConversationStop, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, s as clearConsumedConversationWake, t as ackMessages, u as completeConversationWork, x as releaseConversationWork, y as recordAttemptFailure } from "./store-Dw3eBN9S.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.250.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"sharp": "^0.35.3",
|
|
89
89
|
"yaml": "^2.9.0",
|
|
90
90
|
"zod": "^4.5.4",
|
|
91
|
-
"@sentry/junior-plugin-api": "0.
|
|
91
|
+
"@sentry/junior-plugin-api": "0.250.0"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@emnapi/core": "^1.10.0",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"typescript": "^6.0.3",
|
|
108
108
|
"vercel": "^54.4.0",
|
|
109
109
|
"vitest": "^4.1.7",
|
|
110
|
-
"@sentry/junior-github": "0.
|
|
111
|
-
"@sentry/junior-memory": "0.
|
|
110
|
+
"@sentry/junior-github": "0.250.0",
|
|
111
|
+
"@sentry/junior-memory": "0.250.0",
|
|
112
112
|
"@sentry/junior-testing": "0.0.0"
|
|
113
113
|
},
|
|
114
114
|
"scripts": {
|