@sentry/junior 0.229.0 → 0.231.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-BfjhfMIy.js → agent-hooks-BxL23rrY.js} +10 -10
- package/dist/{agent-runner-DtrpkWV5.js → agent-runner-mpzfRAEr.js} +120 -115
- package/dist/api/schema.d.ts +18 -267
- package/dist/api/schema.js +3 -3
- package/dist/api.js +18 -18
- package/dist/{app-BRZB3MuD.d.ts → app-xk2-Id1T.d.ts} +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +22 -21
- package/dist/{briefs-B6KfFLRA.js → briefs-CTIZORAN.js} +4 -4
- package/dist/{catalog-runtime-Byr3trKF.js → catalog-runtime-RSgQS4lp.js} +1 -1
- package/dist/{checkpoint-DEYb3Fqm.js → checkpoint-Q4FG2BQc.js} +7 -9
- 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-BN5U3CGw.js → client-Mj9HEEKf.js} +3 -2
- package/dist/{config-C4xZrx7G.js → config-CkmcoWGB.js} +2 -2
- package/dist/{conversation-DOI6Y60M.js → conversation-DsuDtoYR.js} +96 -74
- package/dist/{conversation-privacy-CB7wx_tP.js → conversation-privacy-DGj6F9tc.js} +1 -1
- package/dist/{credential-sync-CuEwdxwY.js → credential-sync-CHL297BH.js} +13 -13
- package/dist/{executor-DUqeOd8y.js → executor-_eMyydh0.js} +1 -1
- package/dist/history-DvqWZlYX.d.ts +86 -0
- package/dist/{images-B5JLFwJR.js → images-D9gA15-3.js} +3 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-C1AJ5uJt.js → job-queue-Dl1lTGqq.js} +1 -1
- package/dist/{logging-Muw6EXro.js → logging-9VpmxvdL.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-authorization-CrD-xb8a.js → oauth-authorization-DYZeyL50.js} +1 -1
- package/dist/{oauth-callback-server-DfQos1K1.js → oauth-callback-server-BcVrxzcd.js} +2 -2
- package/dist/{pending-auth-pYQpJmtu.js → pending-auth-mB93uu9V.js} +1 -1
- package/dist/{profile-25NkcK4S.js → profile-CK1KKKfj.js} +4 -4
- package/dist/{prompt-9C-wUwwx.js → prompt-D5RPLy92.js} +1 -1
- package/dist/{registry-DrcbAs8o.js → registry-BzD2Rftl.js} +1 -1
- package/dist/{resolve-D9kl_rkl.js → resolve-C3UI1gHN.js} +2 -2
- package/dist/{runner-D3rf-_hT.js → runner-BETWa1Bq.js} +9 -9
- package/dist/{sandbox-egress-signals-BfQQz6cs.js → sandbox-egress-signals-pjWtc_9b.js} +1 -1
- package/dist/{schema-CXmCvVLn.js → schema-B-Taar1W.js} +1 -1
- package/dist/{skills-rwWf3XjQ.js → skills-B5o4x78h.js} +2 -2
- package/dist/{spawn-z0fRvZH9.js → spawn-pwMuB53X.js} +2 -2
- package/dist/{task-queue-BGo6K-BX.js → task-queue-Bb71mssX.js} +3 -3
- package/dist/{task-runner-DH8M0m7l.js → task-runner-DkaEXCEP.js} +9 -9
- package/dist/{thread-state-CS67FjfN.js → thread-state-HHHiwpYG.js} +5 -5
- package/dist/{turn-failure-response-DcaALKfm.js → turn-failure-response-CtWGQ0fz.js} +17 -15
- package/dist/{turn-lifecycle-DHcpS20C.js → turn-lifecycle-Cosdai_3.js} +1 -1
- package/dist/{turn-session-routing-DlaCHHlu.js → turn-session-routing-DDo6JGTB.js} +1 -1
- package/dist/{validation-CNUPIKMW.js → validation-DoceK2VV.js} +1 -1
- package/dist/{version-B0eXuHqw.js → version-wZ8kdUu1.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-DrXlSd3Y.js → web-authorization-C1coqBWn.js} +6 -6
- package/dist/{web-input-WFoSdz8L.js → web-input-clQr4P53.js} +49 -31
- package/dist/{work-B0cAo7nv.js → work-BW27hKZB.js} +7 -7
- package/dist/{worker-DNklqmhH.js → worker-DQ-0LzAC.js} +5 -5
- package/package.json +5 -4
- package/dist/history-H-SI5Dej.d.ts +0 -128
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-mpzfRAEr.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-BxL23rrY.js").then((n) => n.t),
|
|
104
|
+
import("../catalog-runtime-RSgQS4lp.js").then((n) => n.t),
|
|
105
|
+
import("../validation-DoceK2VV.js").then((n) => n.r),
|
|
106
|
+
import("../agent-hooks-BxL23rrY.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-mpzfRAEr.js").then((n) => n.r);
|
|
157
157
|
setExperimentalFeatures({ subagents: true });
|
|
158
|
-
const { setBriefsConfig } = await import("../agent-hooks-
|
|
158
|
+
const { setBriefsConfig } = await import("../agent-hooks-BxL23rrY.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-BETWa1Bq.js");
|
|
161
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BcVrxzcd.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-pjWtc_9b.js");
|
|
164
|
+
const { bindSpawnAgent } = await import("../spawn-pwMuB53X.js").then((n) => n.n);
|
|
165
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-BW27hKZB.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-DQ-0LzAC.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-9VpmxvdL.js";
|
|
2
|
+
import { f as parseInlinePluginManifest, p as parsePluginManifest } from "../registry-BzD2Rftl.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-B5o4x78h.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-CTIZORAN.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 { Ct as createPluginLogger, d as setPlugins, en as getDb, f as validatePlugins } from "../agent-hooks-
|
|
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-BxL23rrY.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-RSgQS4lp.js";
|
|
3
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DoceK2VV.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-RSgQS4lp.js";
|
|
2
|
+
import { S as disconnectStateAdapter, t as create } from "../profile-CK1KKKfj.js";
|
|
3
|
+
import { r as resolve } from "../resolve-C3UI1gHN.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-CkmcoWGB.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-_eMyydh0.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-BzD2Rftl.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-9VpmxvdL.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-DGj6F9tc.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";
|
|
@@ -476,6 +476,7 @@ async function completeText(params) {
|
|
|
476
476
|
temperature: params.temperature,
|
|
477
477
|
maxTokens: params.maxTokens,
|
|
478
478
|
reasoning: params.thinkingLevel,
|
|
479
|
+
cacheRetention: params.cacheRetention,
|
|
479
480
|
signal: params.signal,
|
|
480
481
|
metadata: params.metadata
|
|
481
482
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-
|
|
3
|
-
import { p as logWarn } from "./logging-
|
|
2
|
+
import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-Mj9HEEKf.js";
|
|
3
|
+
import { p as logWarn } from "./logging-9VpmxvdL.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]))?$/;
|
|
@@ -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, objectTypeSchema
|
|
3
|
+
import { actorSchema, codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, objectFactFields, objectTypeSchema } 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(),
|
|
@@ -515,6 +515,99 @@ const newConversationEventSchema = z.object({
|
|
|
515
515
|
createdAtMs: z.number().finite()
|
|
516
516
|
}).strict();
|
|
517
517
|
//#endregion
|
|
518
|
+
//#region src/chat/automations/card.ts
|
|
519
|
+
/** Saved automation facts shown with a Message, not a live status view. */
|
|
520
|
+
const automationCardSchema = z.object({
|
|
521
|
+
kind: z.literal("automation"),
|
|
522
|
+
id: z.string().min(1),
|
|
523
|
+
title: z.string().min(1).max(160),
|
|
524
|
+
url: z.string().url().nullable(),
|
|
525
|
+
instruction: z.string().max(4e3),
|
|
526
|
+
trigger: z.string().min(1),
|
|
527
|
+
warning: z.string().nullable()
|
|
528
|
+
}).strict();
|
|
529
|
+
/** Render saved card facts for text-only delivery and accessible fallbacks. */
|
|
530
|
+
function automationCardText(card) {
|
|
531
|
+
return [
|
|
532
|
+
card.title,
|
|
533
|
+
card.warning,
|
|
534
|
+
card.trigger,
|
|
535
|
+
card.instruction,
|
|
536
|
+
card.url,
|
|
537
|
+
`Automation ID: ${card.id}`
|
|
538
|
+
].filter(Boolean).join("\n");
|
|
539
|
+
}
|
|
540
|
+
//#endregion
|
|
541
|
+
//#region src/chat/conversations/cards.ts
|
|
542
|
+
const storedCardSchema = automationCardSchema.extend({ operation: z.enum([
|
|
543
|
+
"created",
|
|
544
|
+
"updated",
|
|
545
|
+
"deleted"
|
|
546
|
+
]).optional() });
|
|
547
|
+
/** Render each built-in card with its own text format. */
|
|
548
|
+
function messageCardText(card) {
|
|
549
|
+
switch (card.kind) {
|
|
550
|
+
case "object": return [
|
|
551
|
+
card.title,
|
|
552
|
+
card.label !== card.title ? card.label : void 0,
|
|
553
|
+
card.description,
|
|
554
|
+
card.status,
|
|
555
|
+
...objectFactFields(card.facts).map((field) => `${field.label}: ${field.value}`),
|
|
556
|
+
card.trigger,
|
|
557
|
+
card.warning,
|
|
558
|
+
card.url
|
|
559
|
+
].filter(Boolean).join("\n");
|
|
560
|
+
case "automation": return automationCardText(card);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
/** Identify a deleted object whose pending card must be omitted. */
|
|
564
|
+
const removedCardSchema = z.object({
|
|
565
|
+
plugin: z.string().min(1),
|
|
566
|
+
key: z.string().min(1)
|
|
567
|
+
}).strict();
|
|
568
|
+
/** Store only the annotation identity with a Message. */
|
|
569
|
+
const messageCardRefSchema = removedCardSchema.extend({ kind: z.literal("object") });
|
|
570
|
+
/** Remove display facts before saving or reporting a Message card. */
|
|
571
|
+
function messageCardRef(card) {
|
|
572
|
+
return card.kind === "object" ? {
|
|
573
|
+
kind: "object",
|
|
574
|
+
plugin: card.plugin,
|
|
575
|
+
key: card.key
|
|
576
|
+
} : {
|
|
577
|
+
kind: "object",
|
|
578
|
+
plugin: "junior",
|
|
579
|
+
key: card.id
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
/** Read references, including identities from older saved card snapshots. */
|
|
583
|
+
function readMessageCardRefs(value) {
|
|
584
|
+
return [...storedCardSchema.array().parse(value.cards ?? []).flatMap(({ operation, ...card }) => operation === "deleted" ? [] : [messageCardRef(card)]), ...messageCardRefSchema.strip().array().parse(value.objectCards ?? [])];
|
|
585
|
+
}
|
|
586
|
+
/** Resolve current saved facts without fetching providers or changing history. */
|
|
587
|
+
function resolveMessageCards(refs, annotations) {
|
|
588
|
+
return refs.map((ref) => {
|
|
589
|
+
const annotation = annotations.find((item) => item.kind === ref.kind && item.plugin === ref.plugin && item.key === ref.key);
|
|
590
|
+
return annotation ? annotationCard(annotation) : {
|
|
591
|
+
...ref,
|
|
592
|
+
objectType: "item",
|
|
593
|
+
title: ref.key,
|
|
594
|
+
label: ref.key,
|
|
595
|
+
url: null,
|
|
596
|
+
warning: "Saved annotation is unavailable."
|
|
597
|
+
};
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
/** Copy saved annotation facts without storage timestamps for Message delivery. */
|
|
601
|
+
function annotationCard(annotation) {
|
|
602
|
+
const { createdAt: _createdAt, updatedAt: _updatedAt, ...value } = annotation;
|
|
603
|
+
return value.kind === "object" ? value : {
|
|
604
|
+
...value,
|
|
605
|
+
kind: "object",
|
|
606
|
+
objectType: value.objectType ?? "item",
|
|
607
|
+
title: value.label
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
//#endregion
|
|
518
611
|
//#region src/chat/briefs/schema.ts
|
|
519
612
|
/**
|
|
520
613
|
* Runtime schemas for the Brief record and the generator input. Both cross a
|
|
@@ -668,77 +761,6 @@ function readMessageAttachments(value) {
|
|
|
668
761
|
return messageAttachmentSchema.array().parse(value ?? []);
|
|
669
762
|
}
|
|
670
763
|
//#endregion
|
|
671
|
-
//#region src/chat/automations/card.ts
|
|
672
|
-
/** Saved automation facts shown with a Message, not a live status view. */
|
|
673
|
-
const automationCardSchema = z.object({
|
|
674
|
-
kind: z.literal("automation"),
|
|
675
|
-
id: z.string().min(1),
|
|
676
|
-
title: z.string().min(1).max(160),
|
|
677
|
-
url: z.string().url().nullable(),
|
|
678
|
-
instruction: z.string().max(4e3),
|
|
679
|
-
trigger: z.string().min(1),
|
|
680
|
-
warning: z.string().nullable()
|
|
681
|
-
}).strict();
|
|
682
|
-
/** Render saved card facts for text-only delivery and accessible fallbacks. */
|
|
683
|
-
function automationCardText(card) {
|
|
684
|
-
return [
|
|
685
|
-
card.title,
|
|
686
|
-
card.warning,
|
|
687
|
-
card.trigger,
|
|
688
|
-
card.instruction,
|
|
689
|
-
card.url,
|
|
690
|
-
`Automation ID: ${card.id}`
|
|
691
|
-
].filter(Boolean).join("\n");
|
|
692
|
-
}
|
|
693
|
-
//#endregion
|
|
694
|
-
//#region src/chat/conversations/cards.ts
|
|
695
|
-
/** Built-in response types accepted by Message storage and delivery. */
|
|
696
|
-
const messageCardSchema = z.discriminatedUnion("kind", [automationCardSchema, ownedObjectAnnotationSchema]);
|
|
697
|
-
const storedCardSchema = automationCardSchema.extend({ operation: z.enum([
|
|
698
|
-
"created",
|
|
699
|
-
"updated",
|
|
700
|
-
"deleted"
|
|
701
|
-
]).optional() });
|
|
702
|
-
/** Read both stored formats while keeping new objects out of the legacy field. */
|
|
703
|
-
function readMessageCards(value) {
|
|
704
|
-
return [...storedCardSchema.array().parse(value.cards ?? []).flatMap(({ operation, ...card }) => operation === "deleted" ? [] : [card]), ...ownedObjectAnnotationSchema.array().parse(value.objectCards ?? [])];
|
|
705
|
-
}
|
|
706
|
-
/** Render each built-in card with its own text format. */
|
|
707
|
-
function messageCardText(card) {
|
|
708
|
-
switch (card.kind) {
|
|
709
|
-
case "object": return [
|
|
710
|
-
card.title,
|
|
711
|
-
card.label !== card.title ? card.label : void 0,
|
|
712
|
-
card.description,
|
|
713
|
-
card.status,
|
|
714
|
-
...objectFactFields(card.facts).map((field) => `${field.label}: ${field.value}`),
|
|
715
|
-
card.trigger,
|
|
716
|
-
card.warning,
|
|
717
|
-
card.url
|
|
718
|
-
].filter(Boolean).join("\n");
|
|
719
|
-
case "automation": return automationCardText(card);
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
/** Deduplicate object cards across successful tool results. */
|
|
723
|
-
function messageCardKey(card) {
|
|
724
|
-
return card.kind === "object" ? JSON.stringify([card.plugin, card.key]) : JSON.stringify(["junior", card.id]);
|
|
725
|
-
}
|
|
726
|
-
/** Identify a deleted object whose pending card must be omitted. */
|
|
727
|
-
const messageCardRefSchema = z.object({
|
|
728
|
-
plugin: z.string().min(1),
|
|
729
|
-
key: z.string().min(1)
|
|
730
|
-
}).strict();
|
|
731
|
-
/** Copy saved annotation facts without storage timestamps for Message delivery. */
|
|
732
|
-
function annotationCard(annotation) {
|
|
733
|
-
const { createdAt: _createdAt, updatedAt: _updatedAt, ...value } = annotation;
|
|
734
|
-
return value.kind === "object" ? value : {
|
|
735
|
-
...value,
|
|
736
|
-
kind: "object",
|
|
737
|
-
objectType: value.objectType ?? "item",
|
|
738
|
-
title: value.label
|
|
739
|
-
};
|
|
740
|
-
}
|
|
741
|
-
//#endregion
|
|
742
764
|
//#region src/api/schema/conversation.ts
|
|
743
765
|
const conversationReportStatusSchema = z.enum([
|
|
744
766
|
"active",
|
|
@@ -931,7 +953,7 @@ const conversationReportMessageEventDataSchema = z.object({
|
|
|
931
953
|
eventObjectType: objectTypeSchema.optional(),
|
|
932
954
|
explicitMention: z.boolean().optional(),
|
|
933
955
|
trustedSummary: z.string().min(1).optional(),
|
|
934
|
-
cards: z.array(
|
|
956
|
+
cards: z.array(messageCardRefSchema).optional(),
|
|
935
957
|
text: z.string().optional(),
|
|
936
958
|
attachments: z.array(messageAttachmentSchema).optional(),
|
|
937
959
|
redacted: z.literal(true).optional()
|
|
@@ -1322,4 +1344,4 @@ const conversationStatsReportSchema = z.object({
|
|
|
1322
1344
|
windowStart: z.string()
|
|
1323
1345
|
}).strict();
|
|
1324
1346
|
//#endregion
|
|
1325
|
-
export {
|
|
1347
|
+
export { encodeHistoryPayload as $, MAX_INPUT_IMAGE_BYTES as A, messageCardRef as B, conversationReportEventSchema as C, createConversationBodySchema as D, conversationSummaryReportSchema as E, briefLinkSchema as F, KNOWN_CONVERSATION_EVENT_TYPES as G, readMessageCardRefs as H, briefOutcomeStatusSchema as I, conversationTurnFailureCodeSchema as J, agentHistoryItemSchema as K, conversationBriefSchema as L, INPUT_IMAGE_TYPES as M, isVisionImageMediaType as N, createConversationMessageBodySchema as O, briefCodeChangeSchema as P, newConversationEventSchema as Q, parseBriefInput as R, conversationReportEventDataSchema as S, conversationStatsReportSchema as T, removedCardSchema as U, messageCardText as V, resolveMessageCards as W, decodeStoredConversationEvent as X, conversationTurnFailureReasonSchema as Y, historyReplacementSchema as Z, conversationParamsSchema as _, cancelConversationPendingMessagesBodySchema as a, conversationPendingMessageSchema as b, conversationAttachmentParamsSchema as c, conversationDetailReportSchema as d, contextProvenance as et, conversationEventHistorySchema as f, conversationFeedSchema as g, conversationFeedQuerySchema as h, archiveConversationResponseSchema as i, usageSchema as it, readMessageAttachments as j, MAX_INPUT_IMAGES as k, conversationAuxiliaryCostsSchema as l, conversationEventsQuerySchema as m, actorIdentitySchema as n, instructionProvenanceFor as nt, cancelConversationPendingMessagesResponseSchema as o, conversationEventPageSchema as p, conversationEventDataSchema as q, archiveConversationBodySchema as r, sameActorIdentity as rt, conversationActivityPreviewSchema as s, acceptedConversationMessageSchema as t, instructionActors as tt, conversationDetailQuerySchema as u, conversationPendingAuthorizationSchema as v, conversationStatsItemSchema as w, conversationPendingMessagesReportSchema as x, conversationPendingMessageDeliverySchema as y, annotationCard as z };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Cn as createUserTokenStore, T as lookupSlackUserProfile, _ as putMcpStoredOAuthCredentials, d as deleteMcpAuthSession, dn as resolveBaseUrl, ft as getMcpProviderErrorAttributes, g as getMcpStoredOAuthCredentials, h as getMcpAuthSession, ln as formatProviderLabel, u as finalizeMcpAuthorization, un as parseOAuthStatePayload, x as resolvePluginOAuthAccount, yn as postSlackMessage } from "./agent-runner-
|
|
2
|
-
import { f as escapeXml } from "./client-
|
|
3
|
-
import { d as logException, h as runBestEffort, p as logWarn } from "./logging-
|
|
4
|
-
import { n as botConfig, o as getRuntimeMetadata } from "./config-
|
|
1
|
+
import { Cn as createUserTokenStore, T as lookupSlackUserProfile, _ as putMcpStoredOAuthCredentials, d as deleteMcpAuthSession, dn as resolveBaseUrl, ft as getMcpProviderErrorAttributes, g as getMcpStoredOAuthCredentials, h as getMcpAuthSession, ln as formatProviderLabel, u as finalizeMcpAuthorization, un as parseOAuthStatePayload, x as resolvePluginOAuthAccount, yn as postSlackMessage } from "./agent-runner-mpzfRAEr.js";
|
|
2
|
+
import { f as escapeXml } from "./client-Mj9HEEKf.js";
|
|
3
|
+
import { d as logException, h as runBestEffort, p as logWarn } from "./logging-9VpmxvdL.js";
|
|
4
|
+
import { n as botConfig, o as getRuntimeMetadata } from "./config-CkmcoWGB.js";
|
|
5
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-
|
|
6
|
+
import { U as getSlackClient, gn as upsertLinkedIdentity, hn as upsertIdentity, tn as getSqlExecutor } from "./agent-hooks-BxL23rrY.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-BzD2Rftl.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-RSgQS4lp.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-B5o4x78h.js";
|
|
11
|
+
import { B as recordAuthorizationCompleted, s as getTurnRecord, z as recordAuthenticationLinked } from "./checkpoint-Q4FG2BQc.js";
|
|
12
|
+
import { E as acquireActiveLock, w as getStateAdapter } from "./profile-CK1KKKfj.js";
|
|
13
|
+
import { i as getConversationPendingAuth } from "./pending-auth-mB93uu9V.js";
|
|
14
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-HHHiwpYG.js";
|
|
15
|
+
import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-C1coqBWn.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-CkmcoWGB.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";
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ConversationAnnotation, OwnedObjectAnnotation } from "@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
|
|
28
|
+
//#region src/chat/automations/card.d.ts
|
|
29
|
+
/** Saved automation facts shown with a Message, not a live status view. */
|
|
30
|
+
declare const automationCardSchema: z.ZodObject<{
|
|
31
|
+
kind: z.ZodLiteral<"automation">;
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
title: z.ZodString;
|
|
34
|
+
url: z.ZodNullable<z.ZodString>;
|
|
35
|
+
instruction: z.ZodString;
|
|
36
|
+
trigger: z.ZodString;
|
|
37
|
+
warning: z.ZodNullable<z.ZodString>;
|
|
38
|
+
}, z.core.$strict>;
|
|
39
|
+
type AutomationCard = z.output<typeof automationCardSchema>;
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/chat/conversations/cards.d.ts
|
|
42
|
+
/** Facts for delivery and display. Messages store only references. */
|
|
43
|
+
type MessageCard = OwnedObjectAnnotation | AutomationCard;
|
|
44
|
+
/** Render each built-in card with its own text format. */
|
|
45
|
+
declare function messageCardText(card: MessageCard): string;
|
|
46
|
+
/** Store only the annotation identity with a Message. */
|
|
47
|
+
declare const messageCardRefSchema: z.ZodObject<{
|
|
48
|
+
plugin: z.ZodString;
|
|
49
|
+
key: z.ZodString;
|
|
50
|
+
kind: z.ZodLiteral<"object">;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
type MessageCardRef = z.output<typeof messageCardRefSchema>;
|
|
53
|
+
/** Resolve current saved facts without fetching providers or changing history. */
|
|
54
|
+
declare function resolveMessageCards(refs: readonly MessageCardRef[], annotations: readonly ConversationAnnotation[]): OwnedObjectAnnotation[];
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/chat/conversations/history.d.ts
|
|
57
|
+
/** Where a failed turn stopped. */
|
|
58
|
+
declare const conversationTurnFailureCodeSchema: z.ZodEnum<{
|
|
59
|
+
agent_run_failed: "agent_run_failed";
|
|
60
|
+
delivery_failed: "delivery_failed";
|
|
61
|
+
model_execution_failed: "model_execution_failed";
|
|
62
|
+
persistence_failed: "persistence_failed";
|
|
63
|
+
}>;
|
|
64
|
+
/**
|
|
65
|
+
* Why a failed turn stopped.
|
|
66
|
+
* Values are fixed labels only. Do not store raw exception text.
|
|
67
|
+
*/
|
|
68
|
+
declare const conversationTurnFailureReasonSchema: z.ZodEnum<{
|
|
69
|
+
unknown: "unknown";
|
|
70
|
+
capacity: "capacity";
|
|
71
|
+
auth: "auth";
|
|
72
|
+
permission: "permission";
|
|
73
|
+
rate_limit: "rate_limit";
|
|
74
|
+
timeout: "timeout";
|
|
75
|
+
network: "network";
|
|
76
|
+
server: "server";
|
|
77
|
+
invalid_request: "invalid_request";
|
|
78
|
+
invalid_response: "invalid_response";
|
|
79
|
+
quota: "quota";
|
|
80
|
+
content_policy: "content_policy";
|
|
81
|
+
empty_output: "empty_output";
|
|
82
|
+
tool_errors: "tool_errors";
|
|
83
|
+
suppressed_output: "suppressed_output";
|
|
84
|
+
}>;
|
|
85
|
+
//#endregion
|
|
86
|
+
export { resolveMessageCards as a, MAX_INPUT_IMAGES as c, messageCardText as i, MAX_INPUT_IMAGE_BYTES as l, conversationTurnFailureReasonSchema as n, AutomationCard as o, MessageCard as r, InputImage as s, conversationTurnFailureCodeSchema as t, MessageAttachment as u };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { j as storeAttachment, k as readLiveAttachment } from "./agent-runner-
|
|
3
|
-
import { tn as getSqlExecutor } from "./agent-hooks-
|
|
4
|
-
import "./conversation-
|
|
2
|
+
import { j as storeAttachment, k as readLiveAttachment } from "./agent-runner-mpzfRAEr.js";
|
|
3
|
+
import { tn as getSqlExecutor } from "./agent-hooks-BxL23rrY.js";
|
|
4
|
+
import "./conversation-DsuDtoYR.js";
|
|
5
5
|
//#region src/chat/attachments/images.ts
|
|
6
6
|
var images_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
decodeInputImages: () => decodeInputImages,
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-
|
|
1
|
+
import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-9VpmxvdL.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-DGj6F9tc.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-CkmcoWGB.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-wZ8kdUu1.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-xk2-Id1T.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-9VpmxvdL.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-Dl1lTGqq.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-Bb71mssX.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-Q4FG2BQc.js";
|
|
2
2
|
//#region src/chat/runtime/turn.ts
|
|
3
3
|
/** Classified Slack turn failure carrying the owning Sentry capture outward. */
|
|
4
4
|
var ConversationTurnBoundaryError = class extends Error {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Cn as createUserTokenStore } from "./agent-runner-
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { Cn as createUserTokenStore } from "./agent-runner-mpzfRAEr.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-CHL297BH.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-Q4FG2BQc.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 { S 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 { S as toOptionalTrimmed } from "./client-Mj9HEEKf.js";
|
|
2
|
+
import { v as setSpanAttributes, y as setSpanStatus } from "./logging-9VpmxvdL.js";
|
|
3
|
+
import { a as getChatConfig } from "./config-CkmcoWGB.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-RSgQS4lp.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 { I as briefOutcomeStatusSchema, L as conversationBriefSchema, R as parseBriefInput } from "./conversation-DsuDtoYR.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/chat/briefs/generate.ts
|
|
4
4
|
const MAX_INPUT_CHARS = 6e4;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-
|
|
1
|
+
import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-9VpmxvdL.js";
|
|
2
2
|
import { i as credentialUserSubjectId } from "./context-0Et9iVSB.js";
|
|
3
3
|
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-7a9YqLhE.js";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { v as setSpanAttributes, w as withSpan } from "./logging-
|
|
2
|
-
import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-
|
|
1
|
+
import { v as setSpanAttributes, w as withSpan } from "./logging-9VpmxvdL.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-CK1KKKfj.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { FileSystem, Sandbox } from "@vercel/sandbox";
|
|
5
5
|
//#region src/chat/sandbox/resources.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { C as withLogContext, b as setTags, d as logException } from "./logging-
|
|
1
|
+
import { C as withLogContext, b as setTags, d as logException } from "./logging-9VpmxvdL.js";
|
|
2
2
|
import { t as credentialContextForActor } from "./context-0Et9iVSB.js";
|
|
3
|
-
import { $t as getConversationStore, Zt as getConversationEventStore } from "./agent-hooks-
|
|
4
|
-
import {
|
|
5
|
-
import { A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, P as loadProjection, Y as persistConversationMessages, ct as markConversationMessage, ft as upsertConversationMessage, lt as normalizeConversationText, r as saveTurnCheckpoint, rt as buildConversationContext, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-
|
|
6
|
-
import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-
|
|
7
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
8
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
9
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
10
|
-
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-
|
|
3
|
+
import { $t as getConversationStore, Zt as getConversationEventStore } from "./agent-hooks-BxL23rrY.js";
|
|
4
|
+
import { V as messageCardText } from "./conversation-DsuDtoYR.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-Q4FG2BQc.js";
|
|
6
|
+
import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-DYZeyL50.js";
|
|
7
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-DkaEXCEP.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-Cosdai_3.js";
|
|
9
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-HHHiwpYG.js";
|
|
10
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-CtWGQ0fz.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
|