@sentry/junior 0.226.0 → 0.228.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-hooks-FUetyyLe.js → agent-hooks-DUQ3ASdp.js} +227 -12
- package/dist/{agent-runner-DEF7auSj.js → agent-runner-CIesujf5.js} +123 -77
- package/dist/api/schema.d.ts +203 -32
- package/dist/api/schema.js +3 -3
- package/dist/api.js +105 -67
- package/dist/{app-TVL42pGL.d.ts → app-BRZB3MuD.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +275 -137
- package/dist/{briefs-Cb4T2BUI.js → briefs-BTrVMqUg.js} +4 -4
- package/dist/{catalog-runtime-BYGR3Dr4.js → catalog-runtime-NOBDOyJi.js} +1 -1
- package/dist/{checkpoint-CJe-dZFF.js → checkpoint-CzN3gXoB.js} +7 -7
- package/dist/cli/chat.js +13 -13
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +1 -1
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-C2WBBx7m.js → client-C6VUBzL_.js} +2 -2
- package/dist/{config-Bws6Rpsh.js → config-BLPaWN1Q.js} +2 -2
- package/dist/{context-Bplcgypl.js → context-0Et9iVSB.js} +1 -1
- package/dist/{conversation-DPbmIwjy.js → conversation-DOI6Y60M.js} +52 -24
- package/dist/{conversation-privacy-pCcW0a5Y.js → conversation-privacy-DJ88ECSq.js} +1 -1
- package/dist/{credential-sync-ibuNsMyl.js → credential-sync-OKs419AB.js} +14 -14
- package/dist/{executor-D36FWjcf.js → executor-DZVZBfmX.js} +1 -1
- package/dist/{history-DI9KJT3J.d.ts → history-H-SI5Dej.d.ts} +27 -1
- package/dist/images-D3x6EemU.js +82 -0
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-2mFFDMHB.js → job-queue-BuSPM0cX.js} +1 -1
- package/dist/{logging-CvjMHRvg.js → logging-Blgn76r3.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-authorization-l4O1rXsL.js → oauth-authorization-t-NPqTNB.js} +1 -1
- package/dist/{oauth-callback-server-Ds8M5FFX.js → oauth-callback-server-BP7SgTcu.js} +2 -2
- package/dist/{pending-auth-DLNJbD8H.js → pending-auth-CXLwmDaG.js} +1 -1
- package/dist/{profile-dvV7PB7u.js → profile-a5xmeUHf.js} +4 -4
- package/dist/{prompt-DehgjkO5.js → prompt-9C-wUwwx.js} +1 -1
- package/dist/{registry-C6FHctIu.js → registry-BUbczT2k.js} +2 -2
- package/dist/{resolve-DqwGI9wq.js → resolve-3PhWSiEF.js} +2 -2
- package/dist/{runner-CzYEcB73.js → runner-CsnuKcsq.js} +10 -10
- package/dist/{sandbox-egress-signals-BZOv0fns.js → sandbox-egress-signals-D34sI4J6.js} +1 -1
- package/dist/{schema-BZg-xzfG.js → schema-CXmCvVLn.js} +1 -1
- package/dist/{skills-EhiVbjF4.js → skills-CLgyYrgF.js} +2 -2
- package/dist/{spawn-Ck3L0rEr.js → spawn-CS56i7Nm.js} +2 -2
- package/dist/{task-queue-TXhAWQwj.js → task-queue-C2sTDXqQ.js} +3 -3
- package/dist/{task-runner-axUJS1No.js → task-runner-uSodiP4v.js} +10 -10
- package/dist/{thread-state-CTuWhjru.js → thread-state-BurqeqMv.js} +5 -5
- package/dist/{turn-failure-response-csVoLOzx.js → turn-failure-response-Bshcqa0a.js} +9 -9
- package/dist/{turn-lifecycle-C1S6vELh.js → turn-lifecycle-foKlVl_T.js} +1 -1
- package/dist/{turn-session-routing-5RejBvit.js → turn-session-routing-DDUMJ2GY.js} +1 -1
- package/dist/{validation-q2PFxkTQ.js → validation-DZc56dXw.js} +1 -1
- package/dist/{version-ByLtIYyy.js → version-y4cRp5Y2.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-Biy8nsS7.js → web-authorization-BfVYx0t1.js} +6 -6
- package/dist/{web-input-DM9LaEdn.js → web-input-B6FZlrgg.js} +73 -41
- package/dist/{work-QrbHdXTc.js → work-Dy8sW9MZ.js} +7 -7
- package/dist/{worker-r17aopXW.js → worker-BH0RP7Hj.js} +5 -5
- package/package.json +5 -4
package/dist/cli/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as executeAgentRun, t as createAgentRunner } from "../agent-runner-
|
|
1
|
+
import { s as executeAgentRun, t as createAgentRunner } from "../agent-runner-CIesujf5.js";
|
|
2
2
|
import { t as loadAppPluginSet } from "../plugin-module-BKGOXca2.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -100,10 +100,10 @@ async function loadLocalPluginSet() {
|
|
|
100
100
|
async function configureLocalChatPlugins(pluginSet) {
|
|
101
101
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
102
102
|
import("../plugins-egKWjgue.js").then((n) => n.o),
|
|
103
|
-
import("../agent-hooks-
|
|
104
|
-
import("../catalog-runtime-
|
|
105
|
-
import("../validation-
|
|
106
|
-
import("../agent-hooks-
|
|
103
|
+
import("../agent-hooks-DUQ3ASdp.js").then((n) => n.t),
|
|
104
|
+
import("../catalog-runtime-NOBDOyJi.js").then((n) => n.t),
|
|
105
|
+
import("../validation-DZc56dXw.js").then((n) => n.r),
|
|
106
|
+
import("../agent-hooks-DUQ3ASdp.js").then((n) => n.Xt)
|
|
107
107
|
]);
|
|
108
108
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
109
109
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -153,18 +153,18 @@ function localDevServerUrl() {
|
|
|
153
153
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
154
154
|
defaultStateAdapterForLocalChat();
|
|
155
155
|
await configureLocalChatPlugins(pluginSet);
|
|
156
|
-
const { setExperimentalFeatures } = await import("../agent-runner-
|
|
156
|
+
const { setExperimentalFeatures } = await import("../agent-runner-CIesujf5.js").then((n) => n.r);
|
|
157
157
|
setExperimentalFeatures({ subagents: true });
|
|
158
|
-
const { setBriefsConfig } = await import("../agent-hooks-
|
|
158
|
+
const { setBriefsConfig } = await import("../agent-hooks-DUQ3ASdp.js").then((n) => n.m);
|
|
159
159
|
setBriefsConfig({ enabled: true });
|
|
160
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
161
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
160
|
+
const { runLocalAgentTurn } = await import("../runner-CsnuKcsq.js");
|
|
161
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BP7SgTcu.js");
|
|
162
162
|
const { createLocalOAuthState } = await import("../oauth-relay-CdCnu80W.js").then((n) => n.t);
|
|
163
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
164
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
165
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
163
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-D34sI4J6.js");
|
|
164
|
+
const { bindSpawnAgent } = await import("../spawn-CS56i7Nm.js").then((n) => n.n);
|
|
165
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-Dy8sW9MZ.js").then((n) => n.a);
|
|
166
166
|
const { createLocalConversationWork } = await import("../conversation-work-C6y3T5Hx.js");
|
|
167
|
-
const { processConversationWork } = await import("../worker-
|
|
167
|
+
const { processConversationWork } = await import("../worker-BH0RP7Hj.js").then((n) => n.n);
|
|
168
168
|
let agentRunner;
|
|
169
169
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
170
170
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-
|
|
2
|
-
import { f as parseInlinePluginManifest, p as parsePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-Blgn76r3.js";
|
|
2
|
+
import { f as parseInlinePluginManifest, p as parsePluginManifest } from "../registry-BUbczT2k.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-CLgyYrgF.js";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import fs from "node:fs/promises";
|
package/dist/cli/main.js
CHANGED
|
@@ -25,7 +25,7 @@ async function runChat(argv, pluginSet) {
|
|
|
25
25
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
26
26
|
}
|
|
27
27
|
async function runBriefs(argv) {
|
|
28
|
-
return await (await import("../briefs-
|
|
28
|
+
return await (await import("../briefs-BTrVMqUg.js")).runBriefs(argv);
|
|
29
29
|
}
|
|
30
30
|
function topLevelCommand(argv) {
|
|
31
31
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
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 { Ct as createPluginLogger, d as setPlugins, en as getDb, f as validatePlugins } from "../agent-hooks-DUQ3ASdp.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-NOBDOyJi.js";
|
|
3
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DZc56dXw.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-NOBDOyJi.js";
|
|
2
|
+
import { S as disconnectStateAdapter, t as create } from "../profile-a5xmeUHf.js";
|
|
3
|
+
import { r as resolve } from "../resolve-3PhWSiEF.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-BLPaWN1Q.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-DZVZBfmX.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-BUbczT2k.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-Blgn76r3.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-DJ88ECSq.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-C6VUBzL_.js";
|
|
3
|
+
import { p as logWarn } from "./logging-Blgn76r3.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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema } from "./model-profile-BwU8mqwD.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { actorSchema, codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, objectFactFields, ownedObjectAnnotationSchema } from "@sentry/junior-plugin-api";
|
|
3
|
+
import { actorSchema, codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, objectFactFields, objectTypeSchema, ownedObjectAnnotationSchema } from "@sentry/junior-plugin-api";
|
|
4
4
|
//#region src/usage-schema.ts
|
|
5
5
|
const usageCostSchema = z.object({
|
|
6
6
|
input: z.number().finite().nonnegative().optional(),
|
|
@@ -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
|
|
@@ -700,7 +734,7 @@ function annotationCard(annotation) {
|
|
|
700
734
|
return value.kind === "object" ? value : {
|
|
701
735
|
...value,
|
|
702
736
|
kind: "object",
|
|
703
|
-
objectType: "item",
|
|
737
|
+
objectType: value.objectType ?? "item",
|
|
704
738
|
title: value.label
|
|
705
739
|
};
|
|
706
740
|
}
|
|
@@ -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. */
|
|
@@ -895,19 +928,21 @@ const conversationReportMessageEventDataSchema = z.object({
|
|
|
895
928
|
source: z.enum(["slack", "web"]).optional(),
|
|
896
929
|
actorIdentity: actorIdentitySchema.optional(),
|
|
897
930
|
eventType: z.string().min(1).optional(),
|
|
931
|
+
eventObjectType: objectTypeSchema.optional(),
|
|
898
932
|
explicitMention: z.boolean().optional(),
|
|
899
933
|
trustedSummary: z.string().min(1).optional(),
|
|
900
934
|
cards: z.array(messageCardSchema).optional(),
|
|
901
935
|
text: z.string().optional(),
|
|
936
|
+
attachments: z.array(messageAttachmentSchema).optional(),
|
|
902
937
|
redacted: z.literal(true).optional()
|
|
903
938
|
}).strict().superRefine((data, context) => {
|
|
904
939
|
if (data.text === void 0 === (data.redacted !== true)) context.addIssue({
|
|
905
940
|
code: "custom",
|
|
906
941
|
message: "message content must be text or explicitly redacted"
|
|
907
942
|
});
|
|
908
|
-
if (data.redacted && (data.actorIdentity || data.cards)) context.addIssue({
|
|
943
|
+
if (data.redacted && (data.actorIdentity || data.cards || data.attachments)) context.addIssue({
|
|
909
944
|
code: "custom",
|
|
910
|
-
message: "redacted messages must not expose actor identity or
|
|
945
|
+
message: "redacted messages must not expose actor identity, cards, or attachments"
|
|
911
946
|
});
|
|
912
947
|
});
|
|
913
948
|
const conversationReportMessageHandledEventDataSchema = z.object({
|
|
@@ -1045,16 +1080,9 @@ const conversationReportStructuredEventDataSchema = z.object({
|
|
|
1045
1080
|
turnId: z.string().min(1).optional(),
|
|
1046
1081
|
presentation: conversationEventPresentationSchema
|
|
1047
1082
|
}).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
1083
|
const conversationReportAttachmentsDeliveredEventDataSchema = z.object({
|
|
1056
1084
|
type: z.literal("attachments_delivered"),
|
|
1057
|
-
attachments: z.array(
|
|
1085
|
+
attachments: z.array(messageAttachmentSchema).min(1)
|
|
1058
1086
|
}).strict();
|
|
1059
1087
|
const conversationReportCompactionEventDataSchema = z.object({
|
|
1060
1088
|
type: z.literal("compaction"),
|
|
@@ -1294,4 +1322,4 @@ const conversationStatsReportSchema = z.object({
|
|
|
1294
1322
|
windowStart: z.string()
|
|
1295
1323
|
}).strict();
|
|
1296
1324
|
//#endregion
|
|
1297
|
-
export { messageCardKey as A,
|
|
1325
|
+
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-CIesujf5.js";
|
|
2
|
+
import { m as escapeXml } from "./client-C6VUBzL_.js";
|
|
3
|
+
import { d as logException, h as runBestEffort, p as logWarn } from "./logging-Blgn76r3.js";
|
|
4
|
+
import { n as botConfig, o as getRuntimeMetadata } from "./config-BLPaWN1Q.js";
|
|
5
|
+
import { g as parseSlackUserId } from "./context-0Et9iVSB.js";
|
|
6
|
+
import { U as getSlackClient, gn as upsertLinkedIdentity, hn as upsertIdentity, tn as getSqlExecutor } from "./agent-hooks-DUQ3ASdp.js";
|
|
7
7
|
import { i as homeDir } from "./package-discovery-7a9YqLhE.js";
|
|
8
|
-
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
10
|
-
import { t as discoverSkills } from "./skills-
|
|
11
|
-
import { B as recordAuthorizationCompleted, s as getTurnRecord, z as recordAuthenticationLinked } from "./checkpoint-
|
|
12
|
-
import { E as acquireActiveLock, w as getStateAdapter } from "./profile-
|
|
13
|
-
import { i as getConversationPendingAuth } from "./pending-auth-
|
|
14
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
15
|
-
import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-BUbczT2k.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-NOBDOyJi.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-CLgyYrgF.js";
|
|
11
|
+
import { B as recordAuthorizationCompleted, s as getTurnRecord, z as recordAuthenticationLinked } from "./checkpoint-CzN3gXoB.js";
|
|
12
|
+
import { E as acquireActiveLock, w as getStateAdapter } from "./profile-a5xmeUHf.js";
|
|
13
|
+
import { i as getConversationPendingAuth } from "./pending-auth-CXLwmDaG.js";
|
|
14
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BurqeqMv.js";
|
|
15
|
+
import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-BfVYx0t1.js";
|
|
16
16
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-CdCnu80W.js";
|
|
17
17
|
import path from "node:path";
|
|
18
18
|
import { z } from "zod";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as startSpanManual } from "./sentry-CgWZM_kV.js";
|
|
2
|
-
import "./config-
|
|
2
|
+
import "./config-BLPaWN1Q.js";
|
|
3
3
|
import { n as juniorDestinations, r as timestamptz } from "./destinations-BeBiJeEM.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { getTableColumns, sql } from "drizzle-orm";
|
|
@@ -1,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<{
|
|
@@ -17,6 +42,7 @@ declare const messageCardSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
17
42
|
objectType: z.ZodEnum<{
|
|
18
43
|
code_change: "code_change";
|
|
19
44
|
task: "task";
|
|
45
|
+
deployment: "deployment";
|
|
20
46
|
automation: "automation";
|
|
21
47
|
item: "item";
|
|
22
48
|
}>;
|
|
@@ -99,4 +125,4 @@ declare const conversationTurnFailureReasonSchema: z.ZodEnum<{
|
|
|
99
125
|
suppressed_output: "suppressed_output";
|
|
100
126
|
}>;
|
|
101
127
|
//#endregion
|
|
102
|
-
export { messageCardText as i, conversationTurnFailureReasonSchema as n, MessageCard as r, conversationTurnFailureCodeSchema as t };
|
|
128
|
+
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-CIesujf5.js";
|
|
3
|
+
import { tn as getSqlExecutor } from "./agent-hooks-DUQ3ASdp.js";
|
|
4
|
+
import "./conversation-DOI6Y60M.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-Blgn76r3.js";
|
|
2
2
|
import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-CgWZM_kV.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-DJ88ECSq.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-BLvBjy_e.js";
|
|
5
5
|
//#region src/chat/sentry-payload-filter.ts
|
|
6
6
|
const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getChatConfig } from "./config-
|
|
1
|
+
import { a as getChatConfig } from "./config-BLPaWN1Q.js";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException, y as withScope } from "./sentry-CgWZM_kV.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-y4cRp5Y2.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { styleText } from "node:util";
|
|
5
5
|
import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { n as JuniorDashboardOptions } from "./app-BRZB3MuD.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-BT2l4We3.js";
|
|
3
3
|
//#region src/nitro.d.ts
|
|
4
4
|
export type JuniorNitroDashboardOptions = JuniorDashboardOptions;
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-Blgn76r3.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-7a9YqLhE.js";
|
|
3
|
-
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-
|
|
3
|
+
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-BuSPM0cX.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-egKWjgue.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-C2sTDXqQ.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-BKGOXca2.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as extractAssistantText } from "./checkpoint-
|
|
1
|
+
import { h as extractAssistantText } from "./checkpoint-CzN3gXoB.js";
|
|
2
2
|
//#region src/chat/runtime/turn.ts
|
|
3
3
|
/** Classified Slack turn failure carrying the owning Sentry capture outward. */
|
|
4
4
|
var ConversationTurnBoundaryError = class extends Error {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { Cn as createUserTokenStore } from "./agent-runner-CIesujf5.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-OKs419AB.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
//#region src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as abandonTurnRecord } from "./checkpoint-
|
|
1
|
+
import { i as abandonTurnRecord } from "./checkpoint-CzN3gXoB.js";
|
|
2
2
|
//#region src/chat/state/turn-id.ts
|
|
3
3
|
/** Build a stable turn identifier from a message ID. */
|
|
4
4
|
function buildDeterministicTurnId(messageId) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { w as toOptionalTrimmed } from "./client-
|
|
2
|
-
import { v as setSpanAttributes, y as setSpanStatus } from "./logging-
|
|
3
|
-
import { a as getChatConfig } from "./config-
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
1
|
+
import { w as toOptionalTrimmed } from "./client-C6VUBzL_.js";
|
|
2
|
+
import { v as setSpanAttributes, y as setSpanStatus } from "./logging-Blgn76r3.js";
|
|
3
|
+
import { a as getChatConfig } from "./config-BLPaWN1Q.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-NOBDOyJi.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { createMemoryState } from "@chat-adapter/state-memory";
|
|
7
7
|
import { createRedisState } from "@chat-adapter/state-redis";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as conversationBriefSchema, U as parseBriefInput, V as briefOutcomeStatusSchema } from "./conversation-DOI6Y60M.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/chat/briefs/generate.ts
|
|
4
4
|
const MAX_INPUT_CHARS = 6e4;
|
|
@@ -1,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-Blgn76r3.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-Blgn76r3.js";
|
|
2
|
+
import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-a5xmeUHf.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { FileSystem, Sandbox } from "@vercel/sandbox";
|
|
5
5
|
//#region src/chat/sandbox/resources.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { C as withLogContext, b as setTags, d as logException } from "./logging-
|
|
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-Blgn76r3.js";
|
|
2
|
+
import { t as credentialContextForActor } from "./context-0Et9iVSB.js";
|
|
3
|
+
import { $t as getConversationStore, Zt as getConversationEventStore } from "./agent-hooks-DUQ3ASdp.js";
|
|
4
|
+
import { M as messageCardText } from "./conversation-DOI6Y60M.js";
|
|
5
|
+
import { A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, P as loadProjection, Y as persistConversationMessages, ct as markConversationMessage, ft as upsertConversationMessage, lt as normalizeConversationText, r as saveTurnCheckpoint, rt as buildConversationContext, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-CzN3gXoB.js";
|
|
6
|
+
import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-t-NPqTNB.js";
|
|
7
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-uSodiP4v.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-foKlVl_T.js";
|
|
9
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BurqeqMv.js";
|
|
10
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-Bshcqa0a.js";
|
|
11
11
|
import { randomUUID } from "node:crypto";
|
|
12
12
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
13
13
|
//#region src/chat/local/runner.ts
|