@sentry/junior 0.226.0 → 0.227.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-bEwEJhlg.js} +218 -11
- package/dist/{agent-runner-DEF7auSj.js → agent-runner-BGDSjciH.js} +114 -73
- package/dist/api/schema.d.ts +65 -6
- package/dist/api/schema.js +3 -3
- package/dist/api.js +52 -31
- package/dist/{app-TVL42pGL.d.ts → app-CjRIKZb5.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +208 -136
- package/dist/{briefs-Cb4T2BUI.js → briefs-BkM_ZW4B.js} +4 -4
- package/dist/{catalog-runtime-BYGR3Dr4.js → catalog-runtime-Cw9V2jpn.js} +1 -1
- package/dist/{checkpoint-CJe-dZFF.js → checkpoint-oZYD3-Ar.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-Pcxo3lGn.js} +2 -2
- package/dist/{config-Bws6Rpsh.js → config-CYvEow1F.js} +2 -2
- package/dist/{context-Bplcgypl.js → context-0Et9iVSB.js} +1 -1
- package/dist/{conversation-DPbmIwjy.js → conversation-BnhOMfEB.js} +49 -22
- package/dist/{conversation-privacy-pCcW0a5Y.js → conversation-privacy-hQmyZbOC.js} +1 -1
- package/dist/{credential-sync-ibuNsMyl.js → credential-sync-CUGbiiCM.js} +14 -14
- package/dist/{executor-D36FWjcf.js → executor-BXMlFrV6.js} +1 -1
- package/dist/{history-DI9KJT3J.d.ts → history-nukv1YN8.d.ts} +26 -1
- package/dist/images-8siTAUNW.js +82 -0
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-2mFFDMHB.js → job-queue-AI0_QAgc.js} +1 -1
- package/dist/{logging-CvjMHRvg.js → logging-BPBx6WF-.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-authorization-l4O1rXsL.js → oauth-authorization-Cq1GaLIP.js} +1 -1
- package/dist/{oauth-callback-server-Ds8M5FFX.js → oauth-callback-server-CnF03VYh.js} +2 -2
- package/dist/{pending-auth-DLNJbD8H.js → pending-auth-CHUjr_6d.js} +1 -1
- package/dist/{profile-dvV7PB7u.js → profile-upzC-wN1.js} +4 -4
- package/dist/{prompt-DehgjkO5.js → prompt-CZIQcPHy.js} +1 -1
- package/dist/{registry-C6FHctIu.js → registry-DM5aMhjm.js} +2 -2
- package/dist/{resolve-DqwGI9wq.js → resolve-sF6Lg7Ay.js} +2 -2
- package/dist/{runner-CzYEcB73.js → runner-Bu2wYpK8.js} +10 -10
- package/dist/{sandbox-egress-signals-BZOv0fns.js → sandbox-egress-signals-Dgerhizb.js} +1 -1
- package/dist/{schema-BZg-xzfG.js → schema-BSiwcvjm.js} +1 -1
- package/dist/{skills-EhiVbjF4.js → skills-CAI5s___.js} +2 -2
- package/dist/{spawn-Ck3L0rEr.js → spawn-DRK9TBgY.js} +2 -2
- package/dist/{task-queue-TXhAWQwj.js → task-queue-iuDAqfZg.js} +3 -3
- package/dist/{task-runner-axUJS1No.js → task-runner-S3QtH38c.js} +10 -10
- package/dist/{thread-state-CTuWhjru.js → thread-state-C_arVuaN.js} +5 -5
- package/dist/{turn-failure-response-csVoLOzx.js → turn-failure-response-DarwGYgC.js} +9 -9
- package/dist/{turn-lifecycle-C1S6vELh.js → turn-lifecycle-CdiIejXH.js} +1 -1
- package/dist/{turn-session-routing-5RejBvit.js → turn-session-routing-DyLGd_wU.js} +1 -1
- package/dist/{validation-q2PFxkTQ.js → validation-BMig74Zp.js} +1 -1
- package/dist/{version-ByLtIYyy.js → version-lhQSfLjx.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-Biy8nsS7.js → web-authorization-r2lKYKJ2.js} +6 -6
- package/dist/{web-input-DM9LaEdn.js → web-input-BU-Fu7iq.js} +46 -36
- package/dist/{work-QrbHdXTc.js → work-B9koS8sW.js} +7 -7
- package/dist/{worker-r17aopXW.js → worker-C_iJSRgG.js} +5 -5
- package/package.json +5 -4
package/dist/cli/plugins.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { $t as getDb, St as createPluginLogger, d as setPlugins, f as validatePlugins } from "../agent-hooks-bEwEJhlg.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-Cw9V2jpn.js";
|
|
3
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-BMig74Zp.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-egKWjgue.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-BKGOXca2.js";
|
|
6
6
|
import { stderr, stdout } from "node:process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
2
|
-
import { S as disconnectStateAdapter, t as create } from "../profile-
|
|
3
|
-
import { r as resolve } from "../resolve-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-Cw9V2jpn.js";
|
|
2
|
+
import { S as disconnectStateAdapter, t as create } from "../profile-upzC-wN1.js";
|
|
3
|
+
import { r as resolve } from "../resolve-sF6Lg7Ay.js";
|
|
4
4
|
//#region src/cli/snapshot-create.ts
|
|
5
5
|
const DEFAULT_RUNTIME = "node22";
|
|
6
6
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as getChatConfig } from "../config-
|
|
2
|
-
import { t as createJuniorSqlExecutor } from "../executor-
|
|
3
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
1
|
+
import { a as getChatConfig } from "../config-CYvEow1F.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-BXMlFrV6.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-DM5aMhjm.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-egKWjgue.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-BKGOXca2.js";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-
|
|
2
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
1
|
+
import { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-BPBx6WF-.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-hQmyZbOC.js";
|
|
3
3
|
import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
|
|
4
4
|
import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
|
|
5
5
|
import { createGatewayProvider } from "@ai-sdk/gateway";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { o as resolveGatewayModel, w as toOptionalTrimmed } from "./client-
|
|
3
|
-
import { p as logWarn } from "./logging-
|
|
2
|
+
import { o as resolveGatewayModel, w as toOptionalTrimmed } from "./client-Pcxo3lGn.js";
|
|
3
|
+
import { p as logWarn } from "./logging-BPBx6WF-.js";
|
|
4
4
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema, t as DEFAULT_MODEL_PROFILES, u as parseTurnReasoningLevel } from "./model-profile-BwU8mqwD.js";
|
|
5
5
|
//#region src/chat/slack/emoji.ts
|
|
6
6
|
const SLACK_EMOJI_NAME_RE = /^(?:[a-z0-9_+-]+)(?:::(?:skin-tone-[2-6]))?$/;
|
|
@@ -295,4 +295,4 @@ function credentialUserSubjectId(context) {
|
|
|
295
295
|
return "subject" in context ? context.subject?.userId : void 0;
|
|
296
296
|
}
|
|
297
297
|
//#endregion
|
|
298
|
-
export {
|
|
298
|
+
export { slackChannelIdSchema as _, createActor as a, parseSlackMessageTs as b, isActorUserId as c, parseStoredSlackActor as d, toStoredSlackActor as f, parseSlackUserId as g, parseSlackTeamId as h, credentialUserSubjectId as i, isUserActor as l, parseSlackChannelReferenceId as m, credentialContextSchema as n, createSlackActor as o, parseSlackChannelId as p, credentialSubjectSchema as r, createSlackResumeActor as s, credentialContextForActor as t, parseActorUserId as u, slackTeamIdSchema as v, slackMessageTsSchema as x, slackUserIdSchema as y };
|
|
@@ -633,6 +633,41 @@ function parseBriefInput(input) {
|
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
635
|
//#endregion
|
|
636
|
+
//#region src/chat/attachments/media.ts
|
|
637
|
+
const INPUT_IMAGE_TYPES = [
|
|
638
|
+
"image/png",
|
|
639
|
+
"image/jpeg",
|
|
640
|
+
"image/gif",
|
|
641
|
+
"image/webp"
|
|
642
|
+
];
|
|
643
|
+
/** Report whether a media type is a raster image accepted by vision models. */
|
|
644
|
+
function isVisionImageMediaType(mediaType) {
|
|
645
|
+
const normalized = mediaType.split(";", 1)[0]?.trim().toLowerCase();
|
|
646
|
+
return normalized ? INPUT_IMAGE_TYPES.some((type) => type === normalized) : false;
|
|
647
|
+
}
|
|
648
|
+
//#endregion
|
|
649
|
+
//#region src/chat/attachments/input.ts
|
|
650
|
+
/** Bound JSON image input below the hosting platform's request size limit. */
|
|
651
|
+
const MAX_INPUT_IMAGE_BYTES = 3145728;
|
|
652
|
+
const MAX_INPUT_IMAGES = 3;
|
|
653
|
+
/** Image bytes accepted with a web message, never stored in its mailbox row. */
|
|
654
|
+
const inputImageSchema = z.object({
|
|
655
|
+
filename: z.string().trim().min(1).max(255),
|
|
656
|
+
contentType: z.enum(INPUT_IMAGE_TYPES),
|
|
657
|
+
data: z.string().min(4).max(MAX_INPUT_IMAGE_BYTES * 4 / 3).regex(/^[A-Za-z0-9+/]*={0,2}$/).refine((data) => data.length % 4 === 0)
|
|
658
|
+
}).strict();
|
|
659
|
+
/** Safe attachment facts shared by mailbox input and transcript messages. */
|
|
660
|
+
const messageAttachmentSchema = z.object({
|
|
661
|
+
id: z.string().min(1),
|
|
662
|
+
filename: z.string().min(1),
|
|
663
|
+
contentType: z.string().min(1),
|
|
664
|
+
bytes: z.number().int().nonnegative()
|
|
665
|
+
}).strict();
|
|
666
|
+
/** Read attachment metadata without exposing object storage keys or bytes. */
|
|
667
|
+
function readMessageAttachments(value) {
|
|
668
|
+
return messageAttachmentSchema.array().parse(value ?? []);
|
|
669
|
+
}
|
|
670
|
+
//#endregion
|
|
636
671
|
//#region src/chat/automations/card.ts
|
|
637
672
|
/** Saved automation facts shown with a Message, not a live status view. */
|
|
638
673
|
const automationCardSchema = z.object({
|
|
@@ -677,7 +712,6 @@ function messageCardText(card) {
|
|
|
677
712
|
card.description,
|
|
678
713
|
card.status,
|
|
679
714
|
...objectFactFields(card.facts).map((field) => `${field.label}: ${field.value}`),
|
|
680
|
-
card.sourceUpdatedAt ? `Source updated: ${card.sourceUpdatedAt}` : void 0,
|
|
681
715
|
card.trigger,
|
|
682
716
|
card.warning,
|
|
683
717
|
card.url
|
|
@@ -738,16 +772,14 @@ const archiveConversationBodySchema = z.object({
|
|
|
738
772
|
lastSeenAt: z.string().datetime()
|
|
739
773
|
}).strict();
|
|
740
774
|
const archiveConversationResponseSchema = z.object({ archivedAt: z.string().datetime().nullable() }).strict();
|
|
741
|
-
const createConversationBodySchema = z.object({
|
|
742
|
-
idempotencyKey: z.string().trim().min(1).max(200),
|
|
743
|
-
message: z.string().trim().min(1).max(32e3),
|
|
744
|
-
/** New roots default public. Private roots stay participant-only. */
|
|
745
|
-
visibility: z.enum(["private", "public"]).optional()
|
|
746
|
-
}).strict();
|
|
747
775
|
const createConversationMessageBodySchema = z.object({
|
|
748
776
|
idempotencyKey: z.string().trim().min(1).max(200),
|
|
749
|
-
message: z.string().trim().
|
|
750
|
-
|
|
777
|
+
message: z.string().trim().max(32e3),
|
|
778
|
+
images: z.array(inputImageSchema).max(3).optional()
|
|
779
|
+
}).strict().refine((body) => Boolean(body.message || body.images?.length), "Add a message or an image.").refine((body) => (body.images ?? []).reduce((sum, image) => sum + image.data.length, 0) <= MAX_INPUT_IMAGE_BYTES * 4 / 3, "Images must total 3 MB or less.");
|
|
780
|
+
const createConversationBodySchema = createConversationMessageBodySchema.safeExtend({
|
|
781
|
+
/** New roots default public. Private roots stay participant-only. */
|
|
782
|
+
visibility: z.enum(["private", "public"]).optional() });
|
|
751
783
|
const acceptedConversationMessageSchema = z.object({
|
|
752
784
|
conversationId: z.string().min(1),
|
|
753
785
|
messageId: z.string().min(1),
|
|
@@ -772,15 +804,16 @@ const conversationPendingMessageSchema = z.object({
|
|
|
772
804
|
role: z.literal("user"),
|
|
773
805
|
source: z.enum(["slack", "web"]),
|
|
774
806
|
text: z.string().optional(),
|
|
807
|
+
attachments: z.array(messageAttachmentSchema).optional(),
|
|
775
808
|
redacted: z.literal(true).optional()
|
|
776
809
|
}).strict().superRefine((data, context) => {
|
|
777
810
|
if (data.text === void 0 === (data.redacted !== true)) context.addIssue({
|
|
778
811
|
code: "custom",
|
|
779
812
|
message: "pending message content must be text or explicitly redacted"
|
|
780
813
|
});
|
|
781
|
-
if (data.redacted && data.actorIdentity) context.addIssue({
|
|
814
|
+
if (data.redacted && (data.actorIdentity || data.attachments)) context.addIssue({
|
|
782
815
|
code: "custom",
|
|
783
|
-
message: "redacted pending messages must not expose actor identity"
|
|
816
|
+
message: "redacted pending messages must not expose actor identity or attachments"
|
|
784
817
|
});
|
|
785
818
|
});
|
|
786
819
|
/** Participant-only authorization prompt for a parked web turn. */
|
|
@@ -899,15 +932,16 @@ const conversationReportMessageEventDataSchema = z.object({
|
|
|
899
932
|
trustedSummary: z.string().min(1).optional(),
|
|
900
933
|
cards: z.array(messageCardSchema).optional(),
|
|
901
934
|
text: z.string().optional(),
|
|
935
|
+
attachments: z.array(messageAttachmentSchema).optional(),
|
|
902
936
|
redacted: z.literal(true).optional()
|
|
903
937
|
}).strict().superRefine((data, context) => {
|
|
904
938
|
if (data.text === void 0 === (data.redacted !== true)) context.addIssue({
|
|
905
939
|
code: "custom",
|
|
906
940
|
message: "message content must be text or explicitly redacted"
|
|
907
941
|
});
|
|
908
|
-
if (data.redacted && (data.actorIdentity || data.cards)) context.addIssue({
|
|
942
|
+
if (data.redacted && (data.actorIdentity || data.cards || data.attachments)) context.addIssue({
|
|
909
943
|
code: "custom",
|
|
910
|
-
message: "redacted messages must not expose actor identity or
|
|
944
|
+
message: "redacted messages must not expose actor identity, cards, or attachments"
|
|
911
945
|
});
|
|
912
946
|
});
|
|
913
947
|
const conversationReportMessageHandledEventDataSchema = z.object({
|
|
@@ -1045,16 +1079,9 @@ const conversationReportStructuredEventDataSchema = z.object({
|
|
|
1045
1079
|
turnId: z.string().min(1).optional(),
|
|
1046
1080
|
presentation: conversationEventPresentationSchema
|
|
1047
1081
|
}).strict();
|
|
1048
|
-
/** Public attachment metadata on conversation reports and transcript media. */
|
|
1049
|
-
const conversationReportDeliveredAttachmentSchema = z.object({
|
|
1050
|
-
id: z.string().min(1),
|
|
1051
|
-
filename: z.string().min(1),
|
|
1052
|
-
contentType: z.string().min(1),
|
|
1053
|
-
bytes: z.number().int().nonnegative()
|
|
1054
|
-
}).strict();
|
|
1055
1082
|
const conversationReportAttachmentsDeliveredEventDataSchema = z.object({
|
|
1056
1083
|
type: z.literal("attachments_delivered"),
|
|
1057
|
-
attachments: z.array(
|
|
1084
|
+
attachments: z.array(messageAttachmentSchema).min(1)
|
|
1058
1085
|
}).strict();
|
|
1059
1086
|
const conversationReportCompactionEventDataSchema = z.object({
|
|
1060
1087
|
type: z.literal("compaction"),
|
|
@@ -1294,4 +1321,4 @@ const conversationStatsReportSchema = z.object({
|
|
|
1294
1321
|
windowStart: z.string()
|
|
1295
1322
|
}).strict();
|
|
1296
1323
|
//#endregion
|
|
1297
|
-
export { messageCardKey as A,
|
|
1324
|
+
export { contextProvenance as $, messageCardKey as A, briefLinkSchema as B, conversationReportEventSchema as C, createConversationBodySchema as D, conversationSummaryReportSchema as E, MAX_INPUT_IMAGE_BYTES as F, agentHistoryItemSchema as G, conversationBriefSchema as H, readMessageAttachments as I, conversationTurnFailureReasonSchema as J, conversationEventDataSchema as K, INPUT_IMAGE_TYPES as L, messageCardText as M, readMessageCards as N, createConversationMessageBodySchema as O, MAX_INPUT_IMAGES as P, encodeHistoryPayload as Q, isVisionImageMediaType as R, conversationReportEventDataSchema as S, conversationStatsReportSchema as T, parseBriefInput as U, briefOutcomeStatusSchema as V, KNOWN_CONVERSATION_EVENT_TYPES as W, historyReplacementSchema as X, decodeStoredConversationEvent as Y, newConversationEventSchema as Z, conversationParamsSchema as _, cancelConversationPendingMessagesBodySchema as a, conversationPendingMessageSchema as b, conversationAttachmentParamsSchema as c, conversationDetailReportSchema as d, instructionActors as et, conversationEventHistorySchema as f, conversationFeedSchema as g, conversationFeedQuerySchema as h, archiveConversationResponseSchema as i, messageCardRefSchema as j, annotationCard as k, conversationAuxiliaryCostsSchema as l, conversationEventsQuerySchema as m, actorIdentitySchema as n, sameActorIdentity as nt, cancelConversationPendingMessagesResponseSchema as o, conversationEventPageSchema as p, conversationTurnFailureCodeSchema as q, archiveConversationBodySchema as r, usageSchema as rt, conversationActivityPreviewSchema as s, acceptedConversationMessageSchema as t, instructionProvenanceFor as tt, conversationDetailQuerySchema as u, conversationPendingAuthorizationSchema as v, conversationStatsItemSchema as w, conversationPendingMessagesReportSchema as x, conversationPendingMessageDeliverySchema as y, briefCodeChangeSchema as z };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as escapeXml } from "./client-
|
|
3
|
-
import { d as logException, h as runBestEffort, p as logWarn } from "./logging-
|
|
4
|
-
import { n as botConfig, o as getRuntimeMetadata } from "./config-
|
|
5
|
-
import { g as parseSlackUserId } from "./context-
|
|
6
|
-
import {
|
|
1
|
+
import { Cn as createUserTokenStore, T as lookupSlackUserProfile, _ as putMcpStoredOAuthCredentials, d as deleteMcpAuthSession, dn as resolveBaseUrl, ft as getMcpProviderErrorAttributes, g as getMcpStoredOAuthCredentials, h as getMcpAuthSession, ln as formatProviderLabel, u as finalizeMcpAuthorization, un as parseOAuthStatePayload, x as resolvePluginOAuthAccount, yn as postSlackMessage } from "./agent-runner-BGDSjciH.js";
|
|
2
|
+
import { m as escapeXml } from "./client-Pcxo3lGn.js";
|
|
3
|
+
import { d as logException, h as runBestEffort, p as logWarn } from "./logging-BPBx6WF-.js";
|
|
4
|
+
import { n as botConfig, o as getRuntimeMetadata } from "./config-CYvEow1F.js";
|
|
5
|
+
import { g as parseSlackUserId } from "./context-0Et9iVSB.js";
|
|
6
|
+
import { U as getSlackClient, en as getSqlExecutor, hn as upsertLinkedIdentity, mn as upsertIdentity } from "./agent-hooks-bEwEJhlg.js";
|
|
7
7
|
import { i as homeDir } from "./package-discovery-7a9YqLhE.js";
|
|
8
|
-
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
10
|
-
import { t as discoverSkills } from "./skills-
|
|
11
|
-
import { B as recordAuthorizationCompleted, s as getTurnRecord, z as recordAuthenticationLinked } from "./checkpoint-
|
|
12
|
-
import { E as acquireActiveLock, w as getStateAdapter } from "./profile-
|
|
13
|
-
import { i as getConversationPendingAuth } from "./pending-auth-
|
|
14
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
15
|
-
import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-DM5aMhjm.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-Cw9V2jpn.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-CAI5s___.js";
|
|
11
|
+
import { B as recordAuthorizationCompleted, s as getTurnRecord, z as recordAuthenticationLinked } from "./checkpoint-oZYD3-Ar.js";
|
|
12
|
+
import { E as acquireActiveLock, w as getStateAdapter } from "./profile-upzC-wN1.js";
|
|
13
|
+
import { i as getConversationPendingAuth } from "./pending-auth-CHUjr_6d.js";
|
|
14
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-C_arVuaN.js";
|
|
15
|
+
import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-r2lKYKJ2.js";
|
|
16
16
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-CdCnu80W.js";
|
|
17
17
|
import path from "node:path";
|
|
18
18
|
import { z } from "zod";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as startSpanManual } from "./sentry-CgWZM_kV.js";
|
|
2
|
-
import "./config-
|
|
2
|
+
import "./config-CYvEow1F.js";
|
|
3
3
|
import { n as juniorDestinations, r as timestamptz } from "./destinations-BeBiJeEM.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { getTableColumns, sql } from "drizzle-orm";
|
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import "@sentry/junior-plugin-api";
|
|
3
|
+
//#region src/chat/attachments/input.d.ts
|
|
4
|
+
/** Bound JSON image input below the hosting platform's request size limit. */
|
|
5
|
+
declare const MAX_INPUT_IMAGE_BYTES: number;
|
|
6
|
+
declare const MAX_INPUT_IMAGES = 3;
|
|
7
|
+
/** Image bytes accepted with a web message, never stored in its mailbox row. */
|
|
8
|
+
declare const inputImageSchema: z.ZodObject<{
|
|
9
|
+
filename: z.ZodString;
|
|
10
|
+
contentType: z.ZodEnum<{
|
|
11
|
+
"image/png": "image/png";
|
|
12
|
+
"image/jpeg": "image/jpeg";
|
|
13
|
+
"image/gif": "image/gif";
|
|
14
|
+
"image/webp": "image/webp";
|
|
15
|
+
}>;
|
|
16
|
+
data: z.ZodString;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
type InputImage = z.output<typeof inputImageSchema>;
|
|
19
|
+
/** Safe attachment facts shared by mailbox input and transcript messages. */
|
|
20
|
+
declare const messageAttachmentSchema: z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
filename: z.ZodString;
|
|
23
|
+
contentType: z.ZodString;
|
|
24
|
+
bytes: z.ZodNumber;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
type MessageAttachment = z.output<typeof messageAttachmentSchema>;
|
|
27
|
+
//#endregion
|
|
3
28
|
//#region src/chat/conversations/cards.d.ts
|
|
4
29
|
/** Built-in response types accepted by Message storage and delivery. */
|
|
5
30
|
declare const messageCardSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -99,4 +124,4 @@ declare const conversationTurnFailureReasonSchema: z.ZodEnum<{
|
|
|
99
124
|
suppressed_output: "suppressed_output";
|
|
100
125
|
}>;
|
|
101
126
|
//#endregion
|
|
102
|
-
export { messageCardText as i, conversationTurnFailureReasonSchema as n, MessageCard as r, conversationTurnFailureCodeSchema as t };
|
|
127
|
+
export { InputImage as a, MessageAttachment as c, messageCardText as i, conversationTurnFailureReasonSchema as n, MAX_INPUT_IMAGES as o, MessageCard as r, MAX_INPUT_IMAGE_BYTES as s, conversationTurnFailureCodeSchema as t };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
+
import { j as storeAttachment, k as readLiveAttachment } from "./agent-runner-BGDSjciH.js";
|
|
3
|
+
import { en as getSqlExecutor } from "./agent-hooks-bEwEJhlg.js";
|
|
4
|
+
import "./conversation-BnhOMfEB.js";
|
|
5
|
+
//#region src/chat/attachments/images.ts
|
|
6
|
+
var images_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
+
decodeInputImages: () => decodeInputImages,
|
|
8
|
+
loadInputImages: () => loadInputImages,
|
|
9
|
+
storeInputImages: () => storeInputImages
|
|
10
|
+
});
|
|
11
|
+
function matchesImageType(data, contentType) {
|
|
12
|
+
switch (contentType) {
|
|
13
|
+
case "image/png": return data.subarray(0, 8).equals(Buffer.from([
|
|
14
|
+
137,
|
|
15
|
+
80,
|
|
16
|
+
78,
|
|
17
|
+
71,
|
|
18
|
+
13,
|
|
19
|
+
10,
|
|
20
|
+
26,
|
|
21
|
+
10
|
|
22
|
+
]));
|
|
23
|
+
case "image/jpeg": return data[0] === 255 && data[1] === 216 && data[2] === 255;
|
|
24
|
+
case "image/gif": return ["GIF87a", "GIF89a"].includes(data.toString("ascii", 0, 6));
|
|
25
|
+
case "image/webp": return data.toString("ascii", 0, 4) === "RIFF" && data.toString("ascii", 8, 12) === "WEBP";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/** Check declared image types against file signatures before storing uploads. */
|
|
29
|
+
function decodeInputImages(images) {
|
|
30
|
+
const files = images.map((image) => {
|
|
31
|
+
const data = Buffer.from(image.data, "base64");
|
|
32
|
+
if (!matchesImageType(data, image.contentType) || data.toString("base64") !== image.data) throw new Error("Use PNG, JPEG, GIF, or WebP image files.");
|
|
33
|
+
return {
|
|
34
|
+
data,
|
|
35
|
+
bytes: data.byteLength,
|
|
36
|
+
filename: image.filename,
|
|
37
|
+
mimeType: image.contentType,
|
|
38
|
+
path: image.filename
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
if (files.reduce((sum, file) => sum + file.bytes, 0) > 3145728) throw new Error("Images must total 3 MB or less.");
|
|
42
|
+
return files;
|
|
43
|
+
}
|
|
44
|
+
/** Store image bytes before accepting a message into the mailbox. */
|
|
45
|
+
async function storeInputImages(args) {
|
|
46
|
+
return await Promise.all(args.files.map(async (file) => {
|
|
47
|
+
return {
|
|
48
|
+
id: (await storeAttachment({
|
|
49
|
+
conversationId: args.conversationId,
|
|
50
|
+
db: getSqlExecutor(),
|
|
51
|
+
file,
|
|
52
|
+
storage: args.storage
|
|
53
|
+
})).id,
|
|
54
|
+
filename: file.filename,
|
|
55
|
+
contentType: file.mimeType,
|
|
56
|
+
bytes: file.bytes
|
|
57
|
+
};
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
/** Load stored images for model input. */
|
|
61
|
+
async function loadInputImages(args) {
|
|
62
|
+
return await Promise.all(args.attachments.map(async (ref) => {
|
|
63
|
+
const attachment = await readLiveAttachment({
|
|
64
|
+
attachmentId: ref.id,
|
|
65
|
+
conversationId: args.conversationId,
|
|
66
|
+
db: getSqlExecutor()
|
|
67
|
+
});
|
|
68
|
+
if (!attachment || attachment.storageProvider !== args.storage.provider) throw new Error("Input image is no longer available.");
|
|
69
|
+
const body = await args.storage.get(attachment.storageKey);
|
|
70
|
+
if (!body) throw new Error("Input image contents are unavailable.");
|
|
71
|
+
const data = Buffer.from(await new Response(body).arrayBuffer());
|
|
72
|
+
if (data.byteLength !== attachment.bytes) throw new Error("Input image size does not match stored metadata.");
|
|
73
|
+
return {
|
|
74
|
+
attachmentId: ref.id,
|
|
75
|
+
filename: attachment.filename,
|
|
76
|
+
mediaType: attachment.contentType,
|
|
77
|
+
data
|
|
78
|
+
};
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { images_exports as n, storeInputImages as r, decodeInputImages as t };
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-
|
|
1
|
+
import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-BPBx6WF-.js";
|
|
2
2
|
import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-CgWZM_kV.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-hQmyZbOC.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-BLvBjy_e.js";
|
|
5
5
|
//#region src/chat/sentry-payload-filter.ts
|
|
6
6
|
const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getChatConfig } from "./config-
|
|
1
|
+
import { a as getChatConfig } from "./config-CYvEow1F.js";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException, y as withScope } from "./sentry-CgWZM_kV.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-lhQSfLjx.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { styleText } from "node:util";
|
|
5
5
|
import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { n as JuniorDashboardOptions } from "./app-CjRIKZb5.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-BT2l4We3.js";
|
|
3
3
|
//#region src/nitro.d.ts
|
|
4
4
|
export type JuniorNitroDashboardOptions = JuniorDashboardOptions;
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-BPBx6WF-.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-7a9YqLhE.js";
|
|
3
|
-
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-
|
|
3
|
+
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-AI0_QAgc.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-egKWjgue.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-iuDAqfZg.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-BKGOXca2.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as extractAssistantText } from "./checkpoint-
|
|
1
|
+
import { h as extractAssistantText } from "./checkpoint-oZYD3-Ar.js";
|
|
2
2
|
//#region src/chat/runtime/turn.ts
|
|
3
3
|
/** Classified Slack turn failure carrying the owning Sentry capture outward. */
|
|
4
4
|
var ConversationTurnBoundaryError = class extends Error {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { Cn as createUserTokenStore } from "./agent-runner-BGDSjciH.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-CUGbiiCM.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
//#region src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as abandonTurnRecord } from "./checkpoint-
|
|
1
|
+
import { i as abandonTurnRecord } from "./checkpoint-oZYD3-Ar.js";
|
|
2
2
|
//#region src/chat/state/turn-id.ts
|
|
3
3
|
/** Build a stable turn identifier from a message ID. */
|
|
4
4
|
function buildDeterministicTurnId(messageId) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { w as toOptionalTrimmed } from "./client-
|
|
2
|
-
import { v as setSpanAttributes, y as setSpanStatus } from "./logging-
|
|
3
|
-
import { a as getChatConfig } from "./config-
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
1
|
+
import { w as toOptionalTrimmed } from "./client-Pcxo3lGn.js";
|
|
2
|
+
import { v as setSpanAttributes, y as setSpanStatus } from "./logging-BPBx6WF-.js";
|
|
3
|
+
import { a as getChatConfig } from "./config-CYvEow1F.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-Cw9V2jpn.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { createMemoryState } from "@chat-adapter/state-memory";
|
|
7
7
|
import { createRedisState } from "@chat-adapter/state-redis";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as conversationBriefSchema, U as parseBriefInput, V as briefOutcomeStatusSchema } from "./conversation-BnhOMfEB.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/chat/briefs/generate.ts
|
|
4
4
|
const MAX_INPUT_CHARS = 6e4;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-
|
|
2
|
-
import { i as credentialUserSubjectId } from "./context-
|
|
1
|
+
import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-BPBx6WF-.js";
|
|
2
|
+
import { i as credentialUserSubjectId } from "./context-0Et9iVSB.js";
|
|
3
3
|
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-7a9YqLhE.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { z } from "zod";
|
|
@@ -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-BPBx6WF-.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-upzC-wN1.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { FileSystem, Sandbox } from "@vercel/sandbox";
|
|
5
5
|
//#region src/chat/sandbox/resources.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { C as withLogContext, b as setTags, d as logException } from "./logging-
|
|
2
|
-
import { t as credentialContextForActor } from "./context-
|
|
3
|
-
import {
|
|
4
|
-
import { M as messageCardText } from "./conversation-
|
|
5
|
-
import { A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, P as loadProjection, Y as persistConversationMessages, ct as markConversationMessage, ft as upsertConversationMessage, lt as normalizeConversationText, r as saveTurnCheckpoint, rt as buildConversationContext, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-
|
|
6
|
-
import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-
|
|
7
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
8
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
9
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
10
|
-
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-
|
|
1
|
+
import { C as withLogContext, b as setTags, d as logException } from "./logging-BPBx6WF-.js";
|
|
2
|
+
import { t as credentialContextForActor } from "./context-0Et9iVSB.js";
|
|
3
|
+
import { Qt as getConversationStore, Xt as getConversationEventStore } from "./agent-hooks-bEwEJhlg.js";
|
|
4
|
+
import { M as messageCardText } from "./conversation-BnhOMfEB.js";
|
|
5
|
+
import { A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, P as loadProjection, Y as persistConversationMessages, ct as markConversationMessage, ft as upsertConversationMessage, lt as normalizeConversationText, r as saveTurnCheckpoint, rt as buildConversationContext, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-oZYD3-Ar.js";
|
|
6
|
+
import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-Cq1GaLIP.js";
|
|
7
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-S3QtH38c.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-CdiIejXH.js";
|
|
9
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-C_arVuaN.js";
|
|
10
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-DarwGYgC.js";
|
|
11
11
|
import { randomUUID } from "node:crypto";
|
|
12
12
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
13
13
|
//#region src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cn as sandboxEgressSignalsResponseSchema } from "./agent-runner-BGDSjciH.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-BnhOMfEB.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-BPBx6WF-.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-Cw9V2jpn.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-BGDSjciH.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-B9koS8sW.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-BPBx6WF-.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-AI0_QAgc.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-S3QtH38c.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-BPBx6WF-.js";
|
|
3
|
+
import { b as parseSlackMessageTs, r as credentialSubjectSchema } from "./context-0Et9iVSB.js";
|
|
4
|
+
import { $t as getDb, Mt as createPluginConversationEvents, Q as readActorIdentity, Qt as getConversationStore, St as createPluginLogger, bt as createPluginEmbedder, cn as agentTurnCostUsd, ht as JUNIOR_THREAD_STATE_TTL_MS, ln as agentTurnTotalTokens, p as coreTaskRegistrations, u as getPlugins, xt as createPluginModel, yt as createPluginState } from "./agent-hooks-bEwEJhlg.js";
|
|
5
|
+
import { E as juniorConversations, s as juniorAutomationExecutions } from "./executor-BXMlFrV6.js";
|
|
6
|
+
import { nt as sameActorIdentity } from "./conversation-BnhOMfEB.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-oZYD3-Ar.js";
|
|
8
|
+
import { w as getStateAdapter } from "./profile-upzC-wN1.js";
|
|
9
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-C_arVuaN.js";
|
|
10
|
+
import { t as resolveConversationRouting } from "./turn-session-routing-DyLGd_wU.js";
|
|
11
|
+
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-iuDAqfZg.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";
|