@sentry/junior 0.289.0 → 0.290.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/{adapter-tE1wnl0T.js → adapter-CHMVy-j0.js} +1 -1
- package/dist/{admin-BmsPbmO_.js → admin-C45Ap5Tn.js} +2 -2
- package/dist/{agent-runner-bvl8U5uH.js → agent-runner-CZjf6MOQ.js} +21 -21
- package/dist/api.d.ts +1 -1
- package/dist/api.js +22 -22
- package/dist/{app-Cu454FXq.d.ts → app-BB1j2krL.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +26 -26
- package/dist/{assistant-reply-1N9oxyyb.js → assistant-reply-BtIV0hq6.js} +1 -1
- package/dist/{background-compaction-queue-D36oCldp.js → background-compaction-queue-2gKhjRD3.js} +4 -4
- package/dist/{briefs-CV-1qkXa.js → briefs-BGke_Cz5.js} +2 -2
- package/dist/{catalog-runtime-BNK4uJVZ.js → catalog-runtime-BSOlVfXi.js} +1 -1
- package/dist/cli/chat.js +14 -14
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +4 -4
- package/dist/{config-DHAy7XlP.js → config-DHDub41t.js} +2 -2
- package/dist/{connections-C3VmH3cf.js → connections-BAb0fedk.js} +6 -6
- package/dist/{conversation-privacy-Bky_veSp.js → conversation-privacy-QRdLPH-9.js} +1 -1
- package/dist/{credential-sync-dY9o0YSj.js → credential-sync-YIMGiRk7.js} +13 -13
- package/dist/{db-BS2Kql3j.js → db-DBHig2sI.js} +3 -3
- package/dist/{db-BebRmhsH.d.ts → db-DCSmv9tz.d.ts} +1 -1
- package/dist/{executor-cc4nH86C.js → executor-DKrtH0k_.js} +29 -6
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-CtCJmt9p.js → logging-f24cZPEj.js} +1 -1
- package/dist/{message-C5VuRcP9.js → message-BbBOajiX.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-KRrYUZ35.js → oauth-callback-server-rHJYjFoz.js} +2 -2
- package/dist/{projection-BFJG58TG.js → projection-D-9aVaHj.js} +10 -10
- package/dist/{prompt-D15oftoL.js → prompt-C7SZhNDy.js} +3 -3
- package/dist/{registry-C_JrgqUz.js → registry-CwA-kSjW.js} +1 -1
- package/dist/{resolve-Cn_7JfP-.js → resolve-B5WJgt9k.js} +3 -3
- package/dist/{result-CIbQFLp6.js → result-B2sCVIwl.js} +8 -8
- package/dist/{runner-BwmaMJVO.js → runner-CZq7wyIh.js} +7 -7
- package/dist/{sandbox-egress-signals-BOQ8gn7i.js → sandbox-egress-signals-C4d6Pa9a.js} +1 -1
- package/dist/{service-account-AGw_pANb.js → service-account-B6OJtplS.js} +3 -3
- package/dist/{service-account-CLZfF8O1.js → service-account-BC73M8rj.js} +3 -3
- package/dist/{session-stop-CbzKf7UI.js → session-stop-1cku9Vm3.js} +11 -11
- package/dist/{skills-CcAJBquq.js → skills-BFopj5ID.js} +2 -2
- package/dist/{spawn-BvAk2vTI.js → spawn-B-1JlJwH.js} +5 -5
- package/dist/{stop-BQU4u7la.js → stop-CJweYiOH.js} +22 -22
- package/dist/{store-DE7NJOvQ.js → store-CK869JpC.js} +3 -3
- package/dist/{task-runner-Q_7duP_T.js → task-runner-XmXL9E-k.js} +10 -10
- package/dist/{turn-failure-response-aWZLfUM8.js → turn-failure-response-hhpek6Fn.js} +7 -7
- package/dist/{validation-BOoPeIJR.js → validation-DHQjCRFx.js} +1 -1
- package/dist/{version-Db0MFy61.js → version-DQgCf4FE.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-FFEFu9In.js → viewer-DG97nzP4.js} +3 -3
- package/dist/{warmup-DDzrA9Gv.js → warmup-C00-jOoN.js} +20 -26
- package/dist/{work-BBJK458E.js → work-Ch3EWO6u.js} +11 -11
- package/dist/{worker-2iU5RFyq.js → worker-B8kyM1fB.js} +6 -6
- package/package.json +4 -4
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { Fa as createPluginEmbedder, Gi as openSlackDirectMessage, Hn as coreTaskRegistrations, Ia as createPluginModel, Ii as escapeSlackMrkdwnText, Ja as createPluginModelCostRecorder, Ji as postSlackMessage, Li as formatSlackLink, Mo as createDurableLocationConfigurationService, Ya as createPluginLogger, an as instructionTextForProjection, b as persistConversationMessages, dn as normalizeToolNameFromResult, en as getPiMessageRole, jo as createPluginCache, li as ToolInputError, ln as isToolResultError, oi as getDashboardTaskLink, oo as createPluginConversationEvents, ot as getTurnRecord, pn as stripRuntimeTurnContext, ti as JUNIOR_THREAD_STATE_TTL_MS, ui as createPluginState, un as isToolResultMessage, v as hydrateConversationMessages, w as fallbackShortTitle, zn as getPlugins } from "./projection-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { E as withSpan, G as isRecord$1, K as toOptionalNumber, _ as runBestEffort, h as logWarn, q as toOptionalString } from "./logging-
|
|
2
|
+
import { Fa as createPluginEmbedder, Gi as openSlackDirectMessage, Hn as coreTaskRegistrations, Ia as createPluginModel, Ii as escapeSlackMrkdwnText, Ja as createPluginModelCostRecorder, Ji as postSlackMessage, Li as formatSlackLink, Mo as createDurableLocationConfigurationService, Ya as createPluginLogger, an as instructionTextForProjection, b as persistConversationMessages, dn as normalizeToolNameFromResult, en as getPiMessageRole, jo as createPluginCache, li as ToolInputError, ln as isToolResultError, oi as getDashboardTaskLink, oo as createPluginConversationEvents, ot as getTurnRecord, pn as stripRuntimeTurnContext, ti as JUNIOR_THREAD_STATE_TTL_MS, ui as createPluginState, un as isToolResultMessage, v as hydrateConversationMessages, w as fallbackShortTitle, zn as getPlugins } from "./projection-D-9aVaHj.js";
|
|
3
|
+
import { n as botConfig } from "./config-DHDub41t.js";
|
|
4
|
+
import { E as withSpan, G as isRecord$1, K as toOptionalNumber, _ as runBestEffort, h as logWarn, q as toOptionalString } from "./logging-f24cZPEj.js";
|
|
5
5
|
import { h as parseSlackMessageTs } from "./actor-6jsm_v96.js";
|
|
6
|
-
import { H as agentTurnTotalTokens, V as agentTurnCostUsd, a as getConversationStore, o as getDb } from "./db-
|
|
7
|
-
import { A as juniorConversations, d as juniorAutomationVersions, f as juniorAutomations, u as juniorAutomationRuns } from "./executor-
|
|
6
|
+
import { H as agentTurnTotalTokens, V as agentTurnCostUsd, a as getConversationStore, o as getDb } from "./db-DBHig2sI.js";
|
|
7
|
+
import { A as juniorConversations, d as juniorAutomationVersions, f as juniorAutomations, u as juniorAutomationRuns } from "./executor-DKrtH0k_.js";
|
|
8
8
|
import { v as sameActorIdentity } from "./media-BepyEUNm.js";
|
|
9
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
10
|
-
import { i as readActorIdentity } from "./viewer-
|
|
11
|
-
import { r as getStateAdapter } from "./adapter-
|
|
12
|
-
import { c as pluginTaskParamsSchema, d as sendVercelPluginTask, s as pluginTaskId } from "./background-compaction-queue-
|
|
9
|
+
import { h as credentialSubjectSchema } from "./registry-CwA-kSjW.js";
|
|
10
|
+
import { i as readActorIdentity } from "./viewer-DG97nzP4.js";
|
|
11
|
+
import { r as getStateAdapter } from "./adapter-CHMVy-j0.js";
|
|
12
|
+
import { c as pluginTaskParamsSchema, d as sendVercelPluginTask, s as pluginTaskId } from "./background-compaction-queue-2gKhjRD3.js";
|
|
13
13
|
import { O as eventAutomationSchema, S as automationVersionSchema, j as scheduledAutomationSchema } from "./automation-DWbjJltM.js";
|
|
14
14
|
import { createHash } from "node:crypto";
|
|
15
15
|
import * as z from "zod";
|
|
@@ -349,7 +349,7 @@ function slackSourceForDestination(args) {
|
|
|
349
349
|
* Reads parent Conversations when this Conversation has no Destination.
|
|
350
350
|
*/
|
|
351
351
|
async function resolveConversationRouting(args) {
|
|
352
|
-
const conversationStore = args.conversationStore ?? (await import("./db-
|
|
352
|
+
const conversationStore = args.conversationStore ?? (await import("./db-DBHig2sI.js").then((n) => n.n)).getConversationStore();
|
|
353
353
|
const chain = await loadConversationChain(args.conversationId, conversationStore);
|
|
354
354
|
let destination;
|
|
355
355
|
let source;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { E as buildConversationContext, To as listConversationAnnotations, X as clearPendingAuth, j as markConversationMessage, v as hydrateConversationMessages } from "./projection-
|
|
2
|
-
import { H as getProviderErrorAttributes, U as getProviderErrorUserMessage, V as findProviderError, g as TURN_REASONING_LEVELS, z as ProviderError } from "./config-
|
|
3
|
-
import { G as isRecord, b as setSpanAttributes, t as buildTurnFailureResponse } from "./logging-
|
|
1
|
+
import { E as buildConversationContext, To as listConversationAnnotations, X as clearPendingAuth, j as markConversationMessage, v as hydrateConversationMessages } from "./projection-D-9aVaHj.js";
|
|
2
|
+
import { H as getProviderErrorAttributes, U as getProviderErrorUserMessage, V as findProviderError, g as TURN_REASONING_LEVELS, z as ProviderError } from "./config-DHDub41t.js";
|
|
3
|
+
import { G as isRecord, b as setSpanAttributes, t as buildTurnFailureResponse } from "./logging-f24cZPEj.js";
|
|
4
4
|
import { h as parseSlackMessageTs } from "./actor-6jsm_v96.js";
|
|
5
|
-
import { o as getDb, r as getConversationEventStore, s as getSqlExecutor } from "./db-
|
|
6
|
-
import { g as juniorAgentInvocations } from "./executor-
|
|
7
|
-
import { p as credentialContextSchema } from "./registry-
|
|
5
|
+
import { o as getDb, r as getConversationEventStore, s as getSqlExecutor } from "./db-DBHig2sI.js";
|
|
6
|
+
import { g as juniorAgentInvocations } from "./executor-DKrtH0k_.js";
|
|
7
|
+
import { p as credentialContextSchema } from "./registry-CwA-kSjW.js";
|
|
8
8
|
import { B as resolveMessageCards, R as readMessageCardRefs, z as removedCardSchema } from "./conversation-CwC8K3RZ.js";
|
|
9
9
|
import { C as AGENT_INVOCATION_PARENT_MAILBOX_STATUSES, S as AGENT_INVOCATION_MAILBOX_STATUSES } from "./reporting-window-B3Ze-Qnt.js";
|
|
10
|
-
import { _t as persistThreadStateById, ht as getPersistedThreadState, vt as coerceThreadConversationState } from "./task-runner-
|
|
10
|
+
import { _t as persistThreadStateById, ht as getPersistedThreadState, vt as coerceThreadConversationState } from "./task-runner-XmXL9E-k.js";
|
|
11
11
|
import { createHash } from "node:crypto";
|
|
12
12
|
import * as z from "zod";
|
|
13
13
|
import { and, asc, desc, eq, inArray, or, sql } from "drizzle-orm";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BSOlVfXi.js";
|
|
3
3
|
import { isDeepStrictEqual } from "node:util";
|
|
4
4
|
// src/chat/plugins/validation.ts
|
|
5
5
|
var validation_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "0.
|
|
2
|
+
var version = "0.290.0";
|
|
3
3
|
// src/version.ts
|
|
4
4
|
/** Installed Junior package version, or `unknown` when package metadata is unavailable. */
|
|
5
5
|
const JUNIOR_VERSION = typeof version === "string" && version.trim() ? version : "unknown";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as JUNIOR_VERSION } from "./version-
|
|
1
|
+
export { t as JUNIOR_VERSION } from "./version-DQgCf4FE.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as GOOGLE_IDENTITY_PROVIDER, W as normalizeIdentityEmail, h as logWarn } from "./logging-
|
|
2
|
-
import { E as findActorIdentityId, o as getDb } from "./db-
|
|
3
|
-
import { M as juniorUsers, j as juniorIdentities } from "./executor-
|
|
1
|
+
import { H as GOOGLE_IDENTITY_PROVIDER, W as normalizeIdentityEmail, h as logWarn } from "./logging-f24cZPEj.js";
|
|
2
|
+
import { E as findActorIdentityId, o as getDb } from "./db-DBHig2sI.js";
|
|
3
|
+
import { M as juniorUsers, j as juniorIdentities } from "./executor-DKrtH0k_.js";
|
|
4
4
|
import { r as detectImageMediaType } from "./media-BepyEUNm.js";
|
|
5
5
|
import { a as withLock } from "./locks-D-0h111u.js";
|
|
6
6
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as captureMessage, v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { Ya as createPluginLogger, jo as createPluginCache, zn as getPlugins } from "./projection-
|
|
3
|
-
import { E as resolveGatewayModel, W as isProviderRetryError, i as getChatConfig } from "./config-
|
|
4
|
-
import { E as withSpan, h as logWarn, m as logInfo, x as setSpanStatus } from "./logging-
|
|
5
|
-
import { K as rootConversationIsArchived, a as getConversationStore, o as getDb, s as getSqlExecutor } from "./db-
|
|
6
|
-
import { A as juniorConversations, C as isUserInstruction, j as juniorIdentities, w as juniorConversationEvents } from "./executor-
|
|
7
|
-
import { u as completeText } from "./prompt-
|
|
8
|
-
import { r as getStateAdapter } from "./adapter-
|
|
9
|
-
import { E as sendCacheWarmup } from "./background-compaction-queue-
|
|
2
|
+
import { Ya as createPluginLogger, jo as createPluginCache, zn as getPlugins } from "./projection-D-9aVaHj.js";
|
|
3
|
+
import { E as resolveGatewayModel, W as isProviderRetryError, i as getChatConfig } from "./config-DHDub41t.js";
|
|
4
|
+
import { E as withSpan, h as logWarn, m as logInfo, x as setSpanStatus } from "./logging-f24cZPEj.js";
|
|
5
|
+
import { K as rootConversationIsArchived, a as getConversationStore, o as getDb, s as getSqlExecutor } from "./db-DBHig2sI.js";
|
|
6
|
+
import { A as juniorConversations, C as isUserInstruction, j as juniorIdentities, w as juniorConversationEvents } from "./executor-DKrtH0k_.js";
|
|
7
|
+
import { u as completeText } from "./prompt-C7SZhNDy.js";
|
|
8
|
+
import { r as getStateAdapter } from "./adapter-CHMVy-j0.js";
|
|
9
|
+
import { E as sendCacheWarmup } from "./background-compaction-queue-2gKhjRD3.js";
|
|
10
10
|
import { streamSimple } from "@earendil-works/pi-ai/compat";
|
|
11
11
|
import { promisify } from "node:util";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
@@ -81,9 +81,6 @@ function warmupFailureCountsAsMiss(error) {
|
|
|
81
81
|
}
|
|
82
82
|
/** Gap that Junior records for an idle period with no reply in the horizon. */
|
|
83
83
|
const NO_REPLY_GAP_MS = 1440 * MINUTE_MS;
|
|
84
|
-
const BASE_WARMUP_MARGIN_MS = 45e3;
|
|
85
|
-
const MARGIN_PER_PREFIX_TOKEN_MS = .27;
|
|
86
|
-
const MAX_SIZE_MARGIN_MS = 9e4;
|
|
87
84
|
function binIndex(gapMs) {
|
|
88
85
|
return GAP_BIN_EDGES_MS.findIndex((edge) => gapMs < edge);
|
|
89
86
|
}
|
|
@@ -119,15 +116,12 @@ function returnProbability(histogram, idleMs, windowMs) {
|
|
|
119
116
|
return Math.max(0, (now - survival(histogram, idleMs + windowMs)) / now);
|
|
120
117
|
}
|
|
121
118
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
* to a fixed cap.
|
|
119
|
+
* How long before cache expiry Junior sends a warmup. A warmup reads each
|
|
120
|
+
* cache block of the prefix in one request, so the provider refreshes all
|
|
121
|
+
* blocks together. A margin that grows with the prefix size gains nothing.
|
|
122
|
+
* The margin covers only the queue delay and the time of the warmup request.
|
|
127
123
|
*/
|
|
128
|
-
|
|
129
|
-
return BASE_WARMUP_MARGIN_MS + Math.min(Math.max(0, prefixTokens) * MARGIN_PER_PREFIX_TOKEN_MS, MAX_SIZE_MARGIN_MS);
|
|
130
|
-
}
|
|
124
|
+
const WARMUP_MARGIN_MS = 45e3;
|
|
131
125
|
/**
|
|
132
126
|
* Pick the gap histogram for an idle period. Return chances differ most by
|
|
133
127
|
* who started the Turn and by how many Turns the Conversation had before it.
|
|
@@ -166,7 +160,7 @@ function decideWarmup(input) {
|
|
|
166
160
|
const global = histogramOf(input.globalGapsMs);
|
|
167
161
|
const histogram = blendHistograms(conversation, global);
|
|
168
162
|
const probability = returnProbability(histogram, input.idleMs, Math.min(input.cacheTtlMs, IDLE_HORIZON_MS - input.idleMs));
|
|
169
|
-
const perWarmup = returnsPerWarmup(histogram, input.idleMs, input.cacheExpiryIdleMs, input.cacheTtlMs
|
|
163
|
+
const perWarmup = returnsPerWarmup(histogram, input.idleMs, input.cacheExpiryIdleMs, input.cacheTtlMs);
|
|
170
164
|
const decision = (reason) => ({
|
|
171
165
|
warm: reason === "warm",
|
|
172
166
|
reason,
|
|
@@ -180,9 +174,9 @@ function decideWarmup(input) {
|
|
|
180
174
|
if (conversation.total + global.total < MIN_GAP_SAMPLES) return decision("few_gaps");
|
|
181
175
|
return decision(perWarmup >= threshold ? "warm" : "unlikely_return");
|
|
182
176
|
}
|
|
183
|
-
function returnsPerWarmup(histogram, idleMs, cacheExpiryIdleMs, ttlMs
|
|
177
|
+
function returnsPerWarmup(histogram, idleMs, cacheExpiryIdleMs, ttlMs) {
|
|
184
178
|
const now = survival(histogram, idleMs);
|
|
185
|
-
const intervalMs = ttlMs -
|
|
179
|
+
const intervalMs = ttlMs - WARMUP_MARGIN_MS;
|
|
186
180
|
if (now < .001 || intervalMs <= 0) return 0;
|
|
187
181
|
const leftAtExpiry = survival(histogram, Math.min(cacheExpiryIdleMs, IDLE_HORIZON_MS));
|
|
188
182
|
let best = 0;
|
|
@@ -241,11 +235,11 @@ function cachedPrefixTokens(message) {
|
|
|
241
235
|
* Return when the cache that a request at `requestStartedAtMs` read or wrote
|
|
242
236
|
* expires, and the delay until the warmup that refreshes it.
|
|
243
237
|
*/
|
|
244
|
-
function warmupTiming(requestStartedAtMs,
|
|
238
|
+
function warmupTiming(requestStartedAtMs, ttlMs) {
|
|
245
239
|
const cacheExpiresAtMs = requestStartedAtMs + ttlMs;
|
|
246
240
|
return {
|
|
247
241
|
cacheExpiresAtMs,
|
|
248
|
-
delayMs: cacheExpiresAtMs -
|
|
242
|
+
delayMs: cacheExpiresAtMs - WARMUP_MARGIN_MS - Date.now()
|
|
249
243
|
};
|
|
250
244
|
}
|
|
251
245
|
const LATE_WARMUP_MS = 1e4;
|
|
@@ -338,7 +332,7 @@ function createToolWaitWarmer(conversationId) {
|
|
|
338
332
|
let generation = 0;
|
|
339
333
|
const schedule = (cache, refreshedAtMs, cycle) => {
|
|
340
334
|
const current = generation;
|
|
341
|
-
const { cacheExpiresAtMs, delayMs } = warmupTiming(refreshedAtMs, cache.
|
|
335
|
+
const { cacheExpiresAtMs, delayMs } = warmupTiming(refreshedAtMs, cache.ttlMs);
|
|
342
336
|
timer = setTimeout(() => {
|
|
343
337
|
timer = void 0;
|
|
344
338
|
warm(cache, cacheExpiresAtMs, cycle, current);
|
|
@@ -687,7 +681,7 @@ const segmentAttributes = (warm) => ({
|
|
|
687
681
|
"app.cache_warming.archived": warm.archived
|
|
688
682
|
});
|
|
689
683
|
async function scheduleWarmup(message, requestStartedAtMs, warm) {
|
|
690
|
-
const { cacheExpiresAtMs, delayMs } = warmupTiming(requestStartedAtMs, warm.
|
|
684
|
+
const { cacheExpiresAtMs, delayMs } = warmupTiming(requestStartedAtMs, warm.cacheTtlMs);
|
|
691
685
|
await sendCacheWarmup({
|
|
692
686
|
...message,
|
|
693
687
|
cacheExpiresAtMs
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { H as PluginCredentialFailureError, K as AuthorizationFlowDisabledError, Sn as renderTag, Xt as isTurnExecutionLimitExceededError, at as failTurnRecord, et as lostWorkerBeforeFirstSave, ho as loadForkHistory, nt as saveTurnCheckpoint, ot as getTurnRecord, rt as abandonTurnRecord, s as openConversationProjection, tn as getTerminalAssistantMessages, tt as pauseLostWorkerTurn, v as hydrateConversationMessages, vn as escapeClosingTags } from "./projection-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, r as getConversationEventStore, s as getSqlExecutor } from "./db-
|
|
4
|
-
import { g as juniorAgentInvocations, h as juniorAgentBindings } from "./executor-
|
|
1
|
+
import { H as PluginCredentialFailureError, K as AuthorizationFlowDisabledError, Sn as renderTag, Xt as isTurnExecutionLimitExceededError, at as failTurnRecord, et as lostWorkerBeforeFirstSave, ho as loadForkHistory, nt as saveTurnCheckpoint, ot as getTurnRecord, rt as abandonTurnRecord, s as openConversationProjection, tn as getTerminalAssistantMessages, tt as pauseLostWorkerTurn, v as hydrateConversationMessages, vn as escapeClosingTags } from "./projection-D-9aVaHj.js";
|
|
2
|
+
import { n as botConfig } from "./config-DHDub41t.js";
|
|
3
|
+
import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, r as getConversationEventStore, s as getSqlExecutor } from "./db-DBHig2sI.js";
|
|
4
|
+
import { g as juniorAgentInvocations, h as juniorAgentBindings } from "./executor-DKrtH0k_.js";
|
|
5
5
|
import { h as contextProvenance, m as agentInstructionProvenance, v as sameActorIdentity } from "./media-BepyEUNm.js";
|
|
6
|
-
import { Dt as stopChildAgentsOf, Gt as finishTurn, Mt as supersedeOpenMailboxTurns, Ot as recordSubagentEnded, Ut as AgentRunError, Wt as executeTurn, an as AgentNameInUseError, kt as recordSubagentStarted, rn as AgentMessageQueueFullError, tn as AgentInvocationLimitError } from "./agent-runner-
|
|
7
|
-
import { k as getTurnRequestDeadline } from "./background-compaction-queue-
|
|
8
|
-
import { $ as getUnnamedAgentConversationId, A as markAgentInvocationPaused, C as isTerminalAgentInvocation, H as agentTypeStartsWithParentHistory, J as getAgentInvocationMessageId, L as agentBindingSchema, M as markAgentInvocationSteered, N as reportReplacedAgentInvocation, O as markAgentInvocationMailboxAppended, Q as getNamedAgentConversationId, T as listOpenAgentInvocations, V as agentTypeInstructions, W as getAgentInvocationId, X as getAgentInvocationTurnId, Z as getChildAgentLockName, _ as completeAgentInvocation, at as getConversationTurnBoundaryError, f as ConversationTurnLifecycleService, g as NON_TERMINAL_AGENT_INVOCATION_STATUSES, h as ACTIVE_AGENT_INVOCATION_STATUSES, j as markAgentInvocationRunning, rt as TurnInputCommitLostError, st as isTurnInputCommitLostError, v as getActiveAgentInvocationForConversation, w as listAgentInvocationsForConversation, x as getLatestAgentInvocationForConversation, y as getAgentInvocation, z as createAgentInvocationSchema } from "./turn-failure-response-
|
|
9
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
10
|
-
import { $ as withoutSavedSteeringMessages, B as maybePostAutomatedTurnLimitNotice, K as recordFinishedTurnForAutomatedLimit, X as buildSteeringPiMessage, Z as instructionForInputs, ct as readBlockedReport, h as parseWebMessages, i as resumeStoppedConversationTree, p as listActiveMailboxTurns, q as resetAutomatedTurnLimit, u as getActiveConversationTurnId } from "./session-stop-
|
|
11
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
12
|
-
import { _t as persistThreadStateById, ht as getPersistedThreadState, mt as getPersistedSandboxState, vt as coerceThreadConversationState } from "./task-runner-
|
|
6
|
+
import { Dt as stopChildAgentsOf, Gt as finishTurn, Mt as supersedeOpenMailboxTurns, Ot as recordSubagentEnded, Ut as AgentRunError, Wt as executeTurn, an as AgentNameInUseError, kt as recordSubagentStarted, rn as AgentMessageQueueFullError, tn as AgentInvocationLimitError } from "./agent-runner-CZjf6MOQ.js";
|
|
7
|
+
import { k as getTurnRequestDeadline } from "./background-compaction-queue-2gKhjRD3.js";
|
|
8
|
+
import { $ as getUnnamedAgentConversationId, A as markAgentInvocationPaused, C as isTerminalAgentInvocation, H as agentTypeStartsWithParentHistory, J as getAgentInvocationMessageId, L as agentBindingSchema, M as markAgentInvocationSteered, N as reportReplacedAgentInvocation, O as markAgentInvocationMailboxAppended, Q as getNamedAgentConversationId, T as listOpenAgentInvocations, V as agentTypeInstructions, W as getAgentInvocationId, X as getAgentInvocationTurnId, Z as getChildAgentLockName, _ as completeAgentInvocation, at as getConversationTurnBoundaryError, f as ConversationTurnLifecycleService, g as NON_TERMINAL_AGENT_INVOCATION_STATUSES, h as ACTIVE_AGENT_INVOCATION_STATUSES, j as markAgentInvocationRunning, rt as TurnInputCommitLostError, st as isTurnInputCommitLostError, v as getActiveAgentInvocationForConversation, w as listAgentInvocationsForConversation, x as getLatestAgentInvocationForConversation, y as getAgentInvocation, z as createAgentInvocationSchema } from "./turn-failure-response-hhpek6Fn.js";
|
|
9
|
+
import { n as getAssistantReplyText } from "./assistant-reply-BtIV0hq6.js";
|
|
10
|
+
import { $ as withoutSavedSteeringMessages, B as maybePostAutomatedTurnLimitNotice, K as recordFinishedTurnForAutomatedLimit, X as buildSteeringPiMessage, Z as instructionForInputs, ct as readBlockedReport, h as parseWebMessages, i as resumeStoppedConversationTree, p as listActiveMailboxTurns, q as resetAutomatedTurnLimit, u as getActiveConversationTurnId } from "./session-stop-1cku9Vm3.js";
|
|
11
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-CK869JpC.js";
|
|
12
|
+
import { _t as persistThreadStateById, ht as getPersistedThreadState, mt as getPersistedSandboxState, vt as coerceThreadConversationState } from "./task-runner-XmXL9E-k.js";
|
|
13
13
|
import { isDeepStrictEqual } from "node:util";
|
|
14
14
|
import * as z from "zod";
|
|
15
15
|
import { and, eq } from "drizzle-orm";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { At as isInvalidConversationRecordError, Dt as hasConversationStop, St as countPendingConversationMessages, kt as isFinalAttempt } from "./projection-
|
|
3
|
-
import { W as isProviderRetryError, i as getChatConfig } from "./config-
|
|
4
|
-
import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-
|
|
5
|
-
import { Ht as selectAttemptMessages, Vt as isAttemptInterrupt } from "./agent-runner-
|
|
6
|
-
import { k as getTurnRequestDeadline, y as ConversationQueueMessageRejectedError } from "./background-compaction-queue-
|
|
7
|
-
import { C as startConversationWork, b as releaseConversationWork, c as clearConsumedConversationWake, d as completeConversationWork, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, t as ackMessages, u as completeConversationStop, v as recordAttemptFailure, x as requestAnotherSlice, y as recordConversationRetry } from "./store-
|
|
2
|
+
import { At as isInvalidConversationRecordError, Dt as hasConversationStop, St as countPendingConversationMessages, kt as isFinalAttempt } from "./projection-D-9aVaHj.js";
|
|
3
|
+
import { W as isProviderRetryError, i as getChatConfig } from "./config-DHDub41t.js";
|
|
4
|
+
import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-f24cZPEj.js";
|
|
5
|
+
import { Ht as selectAttemptMessages, Vt as isAttemptInterrupt } from "./agent-runner-CZjf6MOQ.js";
|
|
6
|
+
import { k as getTurnRequestDeadline, y as ConversationQueueMessageRejectedError } from "./background-compaction-queue-2gKhjRD3.js";
|
|
7
|
+
import { C as startConversationWork, b as releaseConversationWork, c as clearConsumedConversationWake, d as completeConversationWork, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, t as ackMessages, u as completeConversationStop, v as recordAttemptFailure, x as requestAnotherSlice, y as recordConversationRetry } from "./store-CK869JpC.js";
|
|
8
8
|
// src/chat/task-execution/worker.ts
|
|
9
9
|
var worker_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
CONVERSATION_WORK_DEFER_DELAY_MS: () => CONVERSATION_WORK_DEFER_DELAY_MS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.290.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"web-push": "^3.6.7",
|
|
95
95
|
"yaml": "^2.9.0",
|
|
96
96
|
"zod": "^4.5.4",
|
|
97
|
-
"@sentry/junior-plugin-api": "0.
|
|
97
|
+
"@sentry/junior-plugin-api": "0.290.0"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
100
100
|
"bullmq": "^6.5.0",
|
|
@@ -130,9 +130,9 @@
|
|
|
130
130
|
"typescript": "^7.0.2",
|
|
131
131
|
"vercel": "^54.4.0",
|
|
132
132
|
"vitest": "^4.1.12",
|
|
133
|
+
"@sentry/junior-github": "0.290.0",
|
|
133
134
|
"@sentry/junior-testing": "0.0.0",
|
|
134
|
-
"@sentry/junior-
|
|
135
|
-
"@sentry/junior-memory": "0.289.0"
|
|
135
|
+
"@sentry/junior-memory": "0.290.0"
|
|
136
136
|
},
|
|
137
137
|
"scripts": {
|
|
138
138
|
"build": "tsdown",
|