@sentry/junior 0.209.0 → 0.210.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-B_tHeZp6.js → agent-DKboUiLS.js} +34 -25
- package/dist/{agent-hooks-DDJGkqlR.js → agent-hooks-4I-C-LhZ.js} +8 -8
- package/dist/{agent-runner-CPBSl1Xv.js → agent-runner-DgqYKBZm.js} +5 -5
- package/dist/api.js +15 -15
- package/dist/{app-DfNrn_gS.d.ts → app-gyu3D9Gn.d.ts} +2 -0
- package/dist/app.d.ts +1 -1
- package/dist/app.js +64 -31
- package/dist/{auth-pause-state-BZqtr-GX.js → auth-pause-state-3wQ2cGwW.js} +6 -6
- package/dist/{briefs-ZLRkWQQn.js → briefs-DsJVC55W.js} +3 -3
- package/dist/{catalog-runtime-D89PJa84.js → catalog-runtime-D11j6L4T.js} +1 -1
- package/dist/{checkpoint-DBX1KyOb.js → checkpoint-CHdApjyQ.js} +6 -6
- package/dist/cli/chat.js +13 -13
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +2 -2
- 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-7_NmRtoz.js → client-CuyBdpWp.js} +2 -2
- package/dist/{config-BPGL4uP-.js → config-DoMOvr4Z.js} +2 -2
- package/dist/{conversation-privacy-CgtRvwq8.js → conversation-privacy-Dxiz_d9l.js} +1 -1
- package/dist/{credential-sync-DCYT7j8m.js → credential-sync-6WRLsSQy.js} +32 -23
- package/dist/{execution-stats-CyehCrCF.js → execution-stats-D7Q3Mo8Y.js} +4 -4
- package/dist/{executor-ctvBB7kO.js → executor-BR-u7Eiz.js} +277 -21
- package/dist/instrumentation.js +3 -3
- package/dist/{job-queue-C1lIZ7DE.js → job-queue-FcjDDzOt.js} +1 -1
- package/dist/{logging-CHzH6JFD.js → logging-GTB-Z6hs.js} +2 -2
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-DQvCkP93.js → oauth-callback-server-CuLHQpGM.js} +2 -2
- package/dist/{pending-auth-D6c_jWmW.js → pending-auth-DZKNc2-v.js} +2 -2
- package/dist/{profile-DPAFjrER.js → profile-DEoalaoa.js} +4 -4
- package/dist/{prompt-x-0ZtTyb.js → prompt-Calvr7V2.js} +3 -3
- package/dist/{registry-vUqDWPNS.js → registry-wMxSBovn.js} +1 -1
- package/dist/{resolve-CToO52ls.js → resolve-C0ds-bvC.js} +2 -2
- package/dist/{runner-D3KdCdDY.js → runner-BoK9ACgc.js} +9 -9
- package/dist/{sandbox-egress-signals-C_zy8cZG.js → sandbox-egress-signals-CnzazNxY.js} +1 -1
- package/dist/{sentry-CD3SdJl-.js → sentry-CgWZM_kV.js} +3 -2
- package/dist/{skills-BszTHE4F.js → skills-CbGNcUOh.js} +2 -2
- package/dist/{spawn-v7JJowIu.js → spawn-Dm3kRFmC.js} +2 -2
- package/dist/{stats-t0wuykQW.js → stats-DROv84Z6.js} +13 -9
- package/dist/{task-queue-TyHaXCpO.js → task-queue-BUAVtd2X.js} +3 -3
- package/dist/{task-runner-DVDa7fAI.js → task-runner-ByBGnm9Q.js} +7 -7
- package/dist/{thread-state-DB_913ic.js → thread-state-BTFCRXKk.js} +5 -5
- package/dist/{turn-execution-BRd4mQlB.js → turn-execution-BXKiBFtp.js} +3 -3
- package/dist/{turn-lifecycle-CoNJoE-n.js → turn-lifecycle-Bu7HgoE6.js} +1 -1
- package/dist/{usage-D5t1yT3R.js → usage-DJ2WBjfc.js} +2 -2
- package/dist/{validation-sI1EnNoM.js → validation-ZZEOV02h.js} +1 -1
- package/dist/{version-BrgX_LoI.js → version-Cf7Fwr1w.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-BNCTTM5f.js → web-authorization-D74eDSAs.js} +1 -1
- package/dist/{web-input-NEbUfS0Q.js → web-input-c6W_exA0.js} +4 -4
- package/dist/{work-Dv5SHQ4C.js → work-zBMuzR-T.js} +9 -9
- package/dist/{worker-1GzySfPG.js → worker-C-9UqHKm.js} +9 -6
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { w as toOptionalTrimmed } from "./client-
|
|
2
|
-
import { _ as setSpanAttributes, v 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-CuyBdpWp.js";
|
|
2
|
+
import { _ as setSpanAttributes, v as setSpanStatus } from "./logging-GTB-Z6hs.js";
|
|
3
|
+
import { a as getChatConfig } from "./config-DoMOvr4Z.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-D11j6L4T.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";
|
|
@@ -34,7 +34,7 @@ const modelBriefSchema = z.object({
|
|
|
34
34
|
}).strict(),
|
|
35
35
|
decisions: z.array(z.object({
|
|
36
36
|
text: z.string().trim().min(1),
|
|
37
|
-
by: z.string().trim().min(1).
|
|
37
|
+
by: z.string().trim().min(1).nullable(),
|
|
38
38
|
kind: z.enum([
|
|
39
39
|
"stated",
|
|
40
40
|
"confirmed",
|
|
@@ -43,7 +43,7 @@ const modelBriefSchema = z.object({
|
|
|
43
43
|
}).strict()),
|
|
44
44
|
openDecisions: z.array(z.object({
|
|
45
45
|
text: z.string().trim().min(1),
|
|
46
|
-
owner: z.string().trim().min(1).
|
|
46
|
+
owner: z.string().trim().min(1).nullable()
|
|
47
47
|
}).strict()),
|
|
48
48
|
facts: z.array(z.string().trim().min(1)),
|
|
49
49
|
keywords: z.array(z.string().trim().min(1)),
|
|
@@ -542,7 +542,7 @@ Rules:
|
|
|
542
542
|
- Facts are durable one-line facts that help after the transcript expires. Prefer ids, versions, owners, constraints, and numbers. Do not list fields, recap the transcript, or include transient progress.
|
|
543
543
|
- Ignore Junior runtime mechanics, context tags, and markers such as [[NO_REPLY]].
|
|
544
544
|
- Never say that a code change was merged, closed, deployed, or released unless a supplied code change or resource has that status. Say opened for an open code change.
|
|
545
|
-
- Attribute by or owner only to a participant in the supplied record. Junior is also valid.
|
|
545
|
+
- Attribute by or owner only to a participant in the supplied record. Junior is also valid. Set by or owner to null when no supported attribution exists.
|
|
546
546
|
- Choose the outcome status that best describes where the Conversation ended.
|
|
547
547
|
- Follow the supplied size class caps. Keep the first items that matter most.
|
|
548
548
|
- Cite a URL only when its exact full string occurs in an entry, evidence, or the previous Brief. Return cited URLs in urls. Core adds code changes and resources separately.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as setSpanAttributes, d as logInfo, f as logWarn } from "./logging-
|
|
1
|
+
import { _ as setSpanAttributes, d as logInfo, f as logWarn } from "./logging-GTB-Z6hs.js";
|
|
2
2
|
import { i as credentialUserSubjectId } from "./context-Bplcgypl.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 { C as withSpan, _ as setSpanAttributes } from "./logging-
|
|
2
|
-
import { A as sleep, P as SANDBOX_WORKSPACE_ROOT, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-
|
|
1
|
+
import { C as withSpan, _ as setSpanAttributes } from "./logging-GTB-Z6hs.js";
|
|
2
|
+
import { A as sleep, P as SANDBOX_WORKSPACE_ROOT, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-DEoalaoa.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 { p as authorizationId } from "./agent-
|
|
2
|
-
import { S as withLogContext, u as logException, y as setTags } from "./logging-
|
|
1
|
+
import { p as authorizationId } from "./agent-DKboUiLS.js";
|
|
2
|
+
import { S as withLogContext, u as logException, y as setTags } from "./logging-GTB-Z6hs.js";
|
|
3
3
|
import { t as credentialContextForActor } from "./context-Bplcgypl.js";
|
|
4
|
-
import { Ht as getConversationEventStore, Wt as getConversationStore } from "./agent-hooks-
|
|
5
|
-
import { $ as persistConversationMessages, P as commitAcceptedReply, Q as hydrateConversationMessages, R as loadProjection, W as recordAuthorizationCompleted, d as persistWithRetry, dt as recordDeliveredAssistantMessage, it as buildConversationContext, jt as stripRuntimeTurnContext, lt as markConversationMessage, pt as upsertConversationMessage, r as saveTurnCheckpoint, ut as normalizeConversationText } from "./checkpoint-
|
|
6
|
-
import { S as startActiveTurn, s as getAssistantReplyText, x as markTurnFailed } from "./pending-auth-
|
|
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 buildDeliveredTurnStatePatch, r as finalizeFailedTurnReplyWithEvent, t as completeAuthPauseTurn } from "./auth-pause-state-
|
|
4
|
+
import { Ht as getConversationEventStore, Wt as getConversationStore } from "./agent-hooks-4I-C-LhZ.js";
|
|
5
|
+
import { $ as persistConversationMessages, P as commitAcceptedReply, Q as hydrateConversationMessages, R as loadProjection, W as recordAuthorizationCompleted, d as persistWithRetry, dt as recordDeliveredAssistantMessage, it as buildConversationContext, jt as stripRuntimeTurnContext, lt as markConversationMessage, pt as upsertConversationMessage, r as saveTurnCheckpoint, ut as normalizeConversationText } from "./checkpoint-CHdApjyQ.js";
|
|
6
|
+
import { S as startActiveTurn, s as getAssistantReplyText, x as markTurnFailed } from "./pending-auth-DZKNc2-v.js";
|
|
7
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-ByBGnm9Q.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-Bu7HgoE6.js";
|
|
9
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BTFCRXKk.js";
|
|
10
|
+
import { d as buildDeliveredTurnStatePatch, r as finalizeFailedTurnReplyWithEvent, t as completeAuthPauseTurn } from "./auth-pause-state-3wQ2cGwW.js";
|
|
11
11
|
import { randomUUID } from "node:crypto";
|
|
12
12
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
13
13
|
//#region src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Y as sandboxEgressSignalsResponseSchema } from "./agent-DKboUiLS.js";
|
|
2
2
|
//#region src/chat/local/sandbox-egress-signals.ts
|
|
3
3
|
const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
|
|
4
4
|
const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { captureException, captureMessage, continueTrace, flush, getActiveSpan, getClient, getGlobalScope, getTraceData, init, logger, setTag, setUser, spanToJSON, startInactiveSpan, startSpan, vercelAIIntegration, withActiveSpan, withScope, withStreamedSpan } from "@sentry/node";
|
|
2
|
+
import { captureException, captureMessage, continueTrace, flush, getActiveSpan, getClient, getGlobalScope, getTraceData, init, logger, setTag, setUser, spanToJSON, startInactiveSpan, startSpan, startSpanManual, vercelAIIntegration, withActiveSpan, withScope, withStreamedSpan } from "@sentry/node";
|
|
3
3
|
//#region src/chat/sentry.ts
|
|
4
4
|
var sentry_exports = /* @__PURE__ */ __exportAll({
|
|
5
5
|
captureException: () => captureException,
|
|
@@ -17,10 +17,11 @@ var sentry_exports = /* @__PURE__ */ __exportAll({
|
|
|
17
17
|
spanToJSON: () => spanToJSON,
|
|
18
18
|
startInactiveSpan: () => startInactiveSpan,
|
|
19
19
|
startSpan: () => startSpan,
|
|
20
|
+
startSpanManual: () => startSpanManual,
|
|
20
21
|
vercelAIIntegration: () => vercelAIIntegration,
|
|
21
22
|
withActiveSpan: () => withActiveSpan,
|
|
22
23
|
withScope: () => withScope,
|
|
23
24
|
withStreamedSpan: () => withStreamedSpan
|
|
24
25
|
});
|
|
25
26
|
//#endregion
|
|
26
|
-
export {
|
|
27
|
+
export { vercelAIIntegration as _, getClient as a, withStreamedSpan as b, init as c, setTag as d, setUser as f, startSpanManual as g, startSpan as h, getActiveSpan as i, logger as l, startInactiveSpan as m, captureMessage as n, getGlobalScope as o, spanToJSON as p, continueTrace as r, getTraceData as s, captureException as t, sentry_exports as u, withActiveSpan as v, withScope as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { f as logWarn } from "./logging-
|
|
2
|
+
import { f as logWarn } from "./logging-GTB-Z6hs.js";
|
|
3
3
|
import { s as skillRoots } from "./package-discovery-7a9YqLhE.js";
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-D11j6L4T.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { C as toolInvocationDestination, y as actorFromRun } from "./agent-runner-
|
|
3
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { C as toolInvocationDestination, y as actorFromRun } from "./agent-runner-DgqYKBZm.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-zBMuzR-T.js";
|
|
4
4
|
//#region src/chat/agent-invocations/spawn.ts
|
|
5
5
|
var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
|
|
6
6
|
/** Bind a Run's Actor and credentials to new Agent invocations. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { F as isRecord$1, I as toOptionalNumber, L as toOptionalString } from "./logging-
|
|
2
|
-
import { a as getChatConfig } from "./config-
|
|
1
|
+
import { F as isRecord$1, I as toOptionalNumber, L as toOptionalString } from "./logging-GTB-Z6hs.js";
|
|
2
|
+
import { a as getChatConfig } from "./config-DoMOvr4Z.js";
|
|
3
3
|
import { _ as parseSlackMessageTs, d as parseStoredSlackActor, h as parseSlackTeamId, p as parseSlackChannelId } from "./context-Bplcgypl.js";
|
|
4
|
-
import { Gt as getDb, J as withSlackRetries, U as getSlackClient, Wt as getConversationStore, an as parseDestination, pt as JUNIOR_THREAD_STATE_TTL_MS, sn as sameDestination, u as getPlugins } from "./agent-hooks-
|
|
4
|
+
import { Gt as getDb, J as withSlackRetries, U as getSlackClient, Wt as getConversationStore, an as parseDestination, pt as JUNIOR_THREAD_STATE_TTL_MS, sn as sameDestination, u as getPlugins } from "./agent-hooks-4I-C-LhZ.js";
|
|
5
5
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
6
|
-
import { S as juniorAttachments, a as juniorSchedulerRuns, c as juniorStats, l as juniorEventAutomations, o as juniorSchedulerTasks, w as juniorConversations } from "./executor-
|
|
7
|
-
import { o as ToolInputError } from "./usage-
|
|
8
|
-
import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-
|
|
6
|
+
import { S as juniorAttachments, a as juniorSchedulerRuns, c as juniorStats, l as juniorEventAutomations, o as juniorSchedulerTasks, w as juniorConversations } from "./executor-BR-u7Eiz.js";
|
|
7
|
+
import { o as ToolInputError } from "./usage-DJ2WBjfc.js";
|
|
8
|
+
import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-DEoalaoa.js";
|
|
9
9
|
import "./vercel-queue-DIkVcfK4.js";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -1234,8 +1234,9 @@ function hasRunnableConversationWork(conversation) {
|
|
|
1234
1234
|
/**
|
|
1235
1235
|
* Ensure runnable conversation work has one accepted queue wake-up nudge.
|
|
1236
1236
|
*
|
|
1237
|
-
* Ordinary wakes coalesce on a recent accepted marker.
|
|
1238
|
-
*
|
|
1237
|
+
* Ordinary wakes coalesce on a recent accepted marker. A caller can ignore the
|
|
1238
|
+
* marker without replacing an active lease. Replacement is only for consumed
|
|
1239
|
+
* or known-stale deliveries where another queue nudge must exist.
|
|
1239
1240
|
*/
|
|
1240
1241
|
async function ensureConversationWake(args) {
|
|
1241
1242
|
const nowMs = args.nowMs ?? now();
|
|
@@ -1245,7 +1246,7 @@ async function ensureConversationWake(args) {
|
|
|
1245
1246
|
});
|
|
1246
1247
|
if (!conversation || !hasRunnableConversationWork(conversation)) return { status: "no_work" };
|
|
1247
1248
|
if (args.replaceExistingWake !== true && conversation.execution.lease && conversation.execution.lease.expiresAtMs > nowMs) return { status: "lease_active" };
|
|
1248
|
-
if (args.replaceExistingWake !== true && hasRecentEnqueueMarker(conversation, nowMs)) return { status: "already_enqueued" };
|
|
1249
|
+
if (args.ignoreEnqueueMarker !== true && args.replaceExistingWake !== true && hasRecentEnqueueMarker(conversation, nowMs)) return { status: "already_enqueued" };
|
|
1249
1250
|
const queueResult = await args.queue.send({
|
|
1250
1251
|
schemaVersion: 2,
|
|
1251
1252
|
conversationId: args.conversationId
|
|
@@ -1296,9 +1297,12 @@ async function enqueueAfterAppend(args) {
|
|
|
1296
1297
|
const wake = await ensureConversationWake({
|
|
1297
1298
|
conversationId: args.message.conversationId,
|
|
1298
1299
|
conversationStore: args.conversationStore,
|
|
1300
|
+
delayMs: args.queueDelayMs,
|
|
1299
1301
|
idempotencyKey,
|
|
1302
|
+
ignoreEnqueueMarker: args.message.source === "event" ? void 0 : true,
|
|
1300
1303
|
nowMs,
|
|
1301
1304
|
queue: args.queue,
|
|
1305
|
+
replaceExistingWake: args.replaceExistingWake,
|
|
1302
1306
|
state: args.state
|
|
1303
1307
|
});
|
|
1304
1308
|
if (wake.status !== "enqueued") await recordExecutionMetadata({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as logWarn } from "./logging-
|
|
1
|
+
import { f as logWarn } from "./logging-GTB-Z6hs.js";
|
|
2
2
|
import { a as signQueueMessage, i as QUEUE_SIGNATURE_MAX_AGE_MS, o as verifyQueueMessage, s as createVercelQueueClient } from "./vercel-queue-DIkVcfK4.js";
|
|
3
|
-
import { o as runWithTurnRequestDeadline } from "./job-queue-
|
|
3
|
+
import { o as runWithTurnRequestDeadline } from "./job-queue-FcjDDzOt.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
@@ -110,7 +110,7 @@ function pluginTaskCallback() {
|
|
|
110
110
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
111
111
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
112
112
|
run: async (message) => {
|
|
113
|
-
const { processPluginTask } = await import("./task-runner-
|
|
113
|
+
const { processPluginTask } = await import("./task-runner-ByBGnm9Q.js").then((n) => n.r);
|
|
114
114
|
await processPluginTask(message);
|
|
115
115
|
},
|
|
116
116
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
2
|
import { _ as parseSlackMessageTs, r as credentialSubjectSchema } from "./context-Bplcgypl.js";
|
|
3
|
-
import { At as createPluginConversationEvents, Gt as getDb, Q as readActorIdentity, Wt as getConversationStore, _t as createPluginState, bt as createPluginLogger, p as coreTaskRegistrations, pt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, vt as createPluginEmbedder, yt as createPluginModel } from "./agent-hooks-
|
|
3
|
+
import { At as createPluginConversationEvents, Gt as getDb, Q as readActorIdentity, Wt as getConversationStore, _t as createPluginState, bt as createPluginLogger, p as coreTaskRegistrations, pt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, vt as createPluginEmbedder, yt as createPluginModel } from "./agent-hooks-4I-C-LhZ.js";
|
|
4
4
|
import { K as sameActorIdentity } from "./conversation-AA4R1VUn.js";
|
|
5
|
-
import { Dt as isToolResultError, Ot as isToolResultMessage, Q as hydrateConversationMessages, bt as getPiMessageRole, jt as stripRuntimeTurnContext, kt as normalizeToolNameFromResult, s as getTurnRecord, wt as instructionTextForProjection } from "./checkpoint-
|
|
6
|
-
import { w as getStateAdapter } from "./profile-
|
|
7
|
-
import { u as recordAutomationExecution } from "./execution-stats-
|
|
8
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
9
|
-
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-
|
|
5
|
+
import { Dt as isToolResultError, Ot as isToolResultMessage, Q as hydrateConversationMessages, bt as getPiMessageRole, jt as stripRuntimeTurnContext, kt as normalizeToolNameFromResult, s as getTurnRecord, wt as instructionTextForProjection } from "./checkpoint-CHdApjyQ.js";
|
|
6
|
+
import { w as getStateAdapter } from "./profile-DEoalaoa.js";
|
|
7
|
+
import { u as recordAutomationExecution } from "./execution-stats-D7Q3Mo8Y.js";
|
|
8
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BTFCRXKk.js";
|
|
9
|
+
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-BUAVtd2X.js";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { createHash } from "node:crypto";
|
|
12
12
|
import { destinationSchema, destinationVisibilitySchema, isSlackDestination, pluginRunContextSchema, replyAttributionSchema, sourceSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
|
@@ -345,7 +345,7 @@ function slackSourceForDestination(args) {
|
|
|
345
345
|
* Reads parent Conversations when this Conversation has no Destination.
|
|
346
346
|
*/
|
|
347
347
|
async function resolveConversationRouting(args) {
|
|
348
|
-
const conversationStore = args.conversationStore ?? (await import("./agent-hooks-
|
|
348
|
+
const conversationStore = args.conversationStore ?? (await import("./agent-hooks-4I-C-LhZ.js").then((n) => n.Vt)).getConversationStore();
|
|
349
349
|
const chain = await loadConversationChain(args.conversationId, conversationStore);
|
|
350
350
|
let destination;
|
|
351
351
|
let source;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { F as isRecord, I as toOptionalNumber, L as toOptionalString } from "./logging-
|
|
2
|
-
import { Gt as getDb, pt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-
|
|
1
|
+
import { F as isRecord, I as toOptionalNumber, L as toOptionalString } from "./logging-GTB-Z6hs.js";
|
|
2
|
+
import { Gt as getDb, pt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-4I-C-LhZ.js";
|
|
3
3
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
4
|
-
import { u as juniorLocationConfigurations } from "./executor-
|
|
5
|
-
import { $ as persistConversationMessages } from "./checkpoint-
|
|
6
|
-
import { w as getStateAdapter } from "./profile-
|
|
4
|
+
import { u as juniorLocationConfigurations } from "./executor-BR-u7Eiz.js";
|
|
5
|
+
import { $ as persistConversationMessages } from "./checkpoint-CHdApjyQ.js";
|
|
6
|
+
import { w as getStateAdapter } from "./profile-DEoalaoa.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
import { and, eq, sql } from "drizzle-orm";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Ht as getConversationEventStore } from "./agent-hooks-
|
|
2
|
-
import { n as runAgentWithTimeout } from "./agent-runner-
|
|
3
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
1
|
+
import { Ht as getConversationEventStore } from "./agent-hooks-4I-C-LhZ.js";
|
|
2
|
+
import { n as runAgentWithTimeout } from "./agent-runner-DgqYKBZm.js";
|
|
3
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-Bu7HgoE6.js";
|
|
4
4
|
//#region src/chat/runtime/turn-execution.ts
|
|
5
5
|
/** An error thrown while the agent advances a Run. */
|
|
6
6
|
var AgentRunError = class extends Error {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ht as getConversationEventStore } from "./agent-hooks-
|
|
1
|
+
import { Ht as getConversationEventStore } from "./agent-hooks-4I-C-LhZ.js";
|
|
2
2
|
//#region src/chat/conversations/turn-lifecycle.ts
|
|
3
3
|
/** Persist correlated turn lifecycle facts with retry-safe terminal exclusion. */
|
|
4
4
|
var ConversationTurnLifecycleService = class {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as logWarn } from "./logging-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
1
|
+
import { f as logWarn } from "./logging-GTB-Z6hs.js";
|
|
2
|
+
import { n as botConfig } from "./config-DoMOvr4Z.js";
|
|
3
3
|
import { P as usageSchema } from "./conversation-AA4R1VUn.js";
|
|
4
4
|
const TITLE_PROMPTS = {
|
|
5
5
|
conversation: [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-D11j6L4T.js";
|
|
3
3
|
import { isDeepStrictEqual } from "node:util";
|
|
4
4
|
//#region src/chat/plugins/validation.ts
|
|
5
5
|
var validation_exports = /* @__PURE__ */ __exportAll({
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
1
|
+
import { t as JUNIOR_VERSION } from "./version-Cf7Fwr1w.js";
|
|
2
2
|
export { JUNIOR_VERSION };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as getStateAdapter } from "./profile-
|
|
1
|
+
import { w as getStateAdapter } from "./profile-DEoalaoa.js";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
//#region src/chat/conversations/web-authorization.ts
|
|
4
4
|
const WEB_AUTHORIZATION_PREFIX = "junior:web_authorization:v1";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as logWarn } from "./logging-
|
|
2
|
-
import { s as getSlackBotToken } from "./config-
|
|
1
|
+
import { f as logWarn } from "./logging-GTB-Z6hs.js";
|
|
2
|
+
import { s as getSlackBotToken } from "./config-DoMOvr4Z.js";
|
|
3
3
|
import "./context-Bplcgypl.js";
|
|
4
|
-
import { K as normalizeSlackConversationId, Wt as getConversationStore } from "./agent-hooks-
|
|
5
|
-
import { c as parseSlackThreadId, ft as appendAndEnqueueExclusiveInboundMessage, pt as appendAndEnqueueInboundMessage, qt as buildDeterministicTurnId } from "./stats-
|
|
4
|
+
import { K as normalizeSlackConversationId, Wt as getConversationStore } from "./agent-hooks-4I-C-LhZ.js";
|
|
5
|
+
import { c as parseSlackThreadId, ft as appendAndEnqueueExclusiveInboundMessage, pt as appendAndEnqueueInboundMessage, qt as buildDeterministicTurnId } from "./stats-DROv84Z6.js";
|
|
6
6
|
import { t as healthReportSchema } from "./reporting-schema-DosTN__Q.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { A as createAgentInvocationSchema, M as AgentInvocationLimitError, O as agentBindingSchema,
|
|
3
|
-
import { Ht as getConversationEventStore, Kt as getSqlExecutor, Wt as getConversationStore } from "./agent-hooks-
|
|
4
|
-
import { f as juniorAgentBindings, p as juniorAgentInvocations } from "./executor-
|
|
5
|
-
import { B as openConversationProjection, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord, xt as getTerminalAssistantMessages } from "./checkpoint-
|
|
6
|
-
import { pt as appendAndEnqueueInboundMessage } from "./stats-
|
|
7
|
-
import { _ as isTurnInputCommitLostError, h as getConversationTurnBoundaryError, p as TurnInputCommitLostError, s as getAssistantReplyText } from "./pending-auth-
|
|
8
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
9
|
-
import { n as executeTurn, t as AgentRunError } from "./turn-execution-
|
|
10
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-
|
|
2
|
+
import { $ as AuthorizationFlowDisabledError, A as createAgentInvocationSchema, M as AgentInvocationLimitError, O as agentBindingSchema, f as PluginCredentialFailureError, j as AgentInvocationBusyError, k as agentInvocationSchema } from "./agent-DKboUiLS.js";
|
|
3
|
+
import { Ht as getConversationEventStore, Kt as getSqlExecutor, Wt as getConversationStore } from "./agent-hooks-4I-C-LhZ.js";
|
|
4
|
+
import { f as juniorAgentBindings, p as juniorAgentInvocations } from "./executor-BR-u7Eiz.js";
|
|
5
|
+
import { B as openConversationProjection, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord, xt as getTerminalAssistantMessages } from "./checkpoint-CHdApjyQ.js";
|
|
6
|
+
import { pt as appendAndEnqueueInboundMessage } from "./stats-DROv84Z6.js";
|
|
7
|
+
import { _ as isTurnInputCommitLostError, h as getConversationTurnBoundaryError, p as TurnInputCommitLostError, s as getAssistantReplyText } from "./pending-auth-DZKNc2-v.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-Bu7HgoE6.js";
|
|
9
|
+
import { n as executeTurn, t as AgentRunError } from "./turn-execution-BXKiBFtp.js";
|
|
10
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-BTFCRXKk.js";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { createHash } from "node:crypto";
|
|
13
13
|
import { and, asc, count, eq, inArray } from "drizzle-orm";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { b as isProviderRetryError } from "./client-
|
|
3
|
-
import { S as withLogContext, d as logInfo, f as logWarn, u as logException } from "./logging-
|
|
4
|
-
import { a as getChatConfig } from "./config-
|
|
5
|
-
import { At as recordConversationRetry, Ct as drainConversationMailbox, Et as getConversationWorkState, Ft as startConversationWork, Ht as isInvalidConversationRecordError, Nt as requestAnotherSlice, St as deadLetterAttempt, Vt as isFinalAttempt, _t as clearConsumedConversationWake, bt as completeConversationWork, dt as ackMessages, gt as checkInConversationWork, jt as releaseConversationWork, kt as recordAttemptFailure, mt as beginConversationResume, wt as ensureConversationWake, xt as countPendingConversationMessages, yt as completeConversationStop, zt as hasConversationStop } from "./stats-
|
|
2
|
+
import { b as isProviderRetryError } from "./client-CuyBdpWp.js";
|
|
3
|
+
import { S as withLogContext, d as logInfo, f as logWarn, u as logException } from "./logging-GTB-Z6hs.js";
|
|
4
|
+
import { a as getChatConfig } from "./config-DoMOvr4Z.js";
|
|
5
|
+
import { At as recordConversationRetry, Ct as drainConversationMailbox, Et as getConversationWorkState, Ft as startConversationWork, Ht as isInvalidConversationRecordError, Nt as requestAnotherSlice, St as deadLetterAttempt, Vt as isFinalAttempt, _t as clearConsumedConversationWake, bt as completeConversationWork, dt as ackMessages, gt as checkInConversationWork, jt as releaseConversationWork, kt as recordAttemptFailure, mt as beginConversationResume, wt as ensureConversationWake, xt as countPendingConversationMessages, yt as completeConversationStop, zt as hasConversationStop } from "./stats-DROv84Z6.js";
|
|
6
6
|
import { c as ConversationQueueMessageRejectedError } from "./vercel-queue-DIkVcfK4.js";
|
|
7
|
-
import { a as getTurnRequestDeadline } from "./job-queue-
|
|
7
|
+
import { a as getTurnRequestDeadline } from "./job-queue-FcjDDzOt.js";
|
|
8
8
|
//#region 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,
|
|
@@ -26,7 +26,9 @@ function selectAttemptMessages(work) {
|
|
|
26
26
|
const messages = work.messages;
|
|
27
27
|
const interrupts = messages.filter((message) => message.delivery === "interrupt");
|
|
28
28
|
if (interrupts.length > 0) return selectContiguousTurnBatch(interrupts);
|
|
29
|
-
|
|
29
|
+
if (work.execution.status === "paused") return [];
|
|
30
|
+
const nonEventMessages = messages.filter((message) => message.source !== "event");
|
|
31
|
+
return selectContiguousTurnBatch(nonEventMessages.length > 0 ? nonEventMessages : messages);
|
|
30
32
|
}
|
|
31
33
|
function nudgeIdempotencyKey(reason, conversationId, nowMs) {
|
|
32
34
|
return `${reason}:${conversationId}:${nowMs}`;
|
|
@@ -469,6 +471,7 @@ async function processConversationWorkInContext(message, options) {
|
|
|
469
471
|
return (await ensureConversationWake({
|
|
470
472
|
conversationId,
|
|
471
473
|
conversationStore: options.conversationStore,
|
|
474
|
+
delayMs: result.delayMs,
|
|
472
475
|
idempotencyKey: nudgeIdempotencyKey("deferred", conversationId, deferredNowMs),
|
|
473
476
|
nowMs: deferredNowMs,
|
|
474
477
|
queue: options.queue,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.210.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"pg": "^8.16.3",
|
|
86
86
|
"yaml": "^2.9.0",
|
|
87
87
|
"zod": "^4.5.4",
|
|
88
|
-
"@sentry/junior-plugin-api": "0.
|
|
88
|
+
"@sentry/junior-plugin-api": "0.210.0"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@emnapi/core": "^1.10.0",
|
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
"typescript": "^6.0.3",
|
|
105
105
|
"vercel": "^54.4.0",
|
|
106
106
|
"vitest": "^4.1.7",
|
|
107
|
-
"@sentry/junior-
|
|
108
|
-
"@sentry/junior-
|
|
107
|
+
"@sentry/junior-github": "0.210.0",
|
|
108
|
+
"@sentry/junior-memory": "0.210.0",
|
|
109
109
|
"@sentry/junior-testing": "0.0.0"
|
|
110
110
|
},
|
|
111
111
|
"scripts": {
|