@sentry/junior 0.263.0 → 0.264.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-BIacI0Bt.js → adapter-BIbMSKlG.js} +1 -1
- package/dist/{admin-C7vUk7s9.js → admin-D4d0HXax.js} +1 -1
- package/dist/{agent-hooks-CqnZfuCt.js → agent-hooks-D_PbluRX.js} +9 -9
- package/dist/{agent-runner-BUBas7Yy.js → agent-runner-CvRxb09K.js} +59 -66
- package/dist/api/schema.d.ts +1 -1
- package/dist/api.js +25 -25
- package/dist/{app-Bo0kB987.d.ts → app-Buc5gIWz.d.ts} +5 -0
- package/dist/app.d.ts +1 -1
- package/dist/app.js +61 -41
- package/dist/{assistant-reply-BFmjgJjD.js → assistant-reply-BcJj_ORj.js} +1 -1
- package/dist/{briefs-h55v5lX9.js → briefs-BFfIE5N6.js} +2 -2
- package/dist/{catalog-runtime-Suf-aLlh.js → catalog-runtime-R53MWcMi.js} +1 -1
- package/dist/cli/chat.js +15 -15
- 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.js +3 -3
- package/dist/{client-DZBCBj1M.js → client-DpOwh_zX.js} +2 -2
- package/dist/{config-Dnv8KmNs.js → config-BxPrFVJP.js} +2 -2
- package/dist/{connections-Br0_xv27.js → connections-BnTM1nRf.js} +10 -10
- package/dist/{conversation-privacy-FY8yc2q3.js → conversation-privacy-ueJ6i-t9.js} +1 -1
- package/dist/{credential-sync-BvkiyWF5.js → credential-sync-DeDkof_D.js} +14 -14
- package/dist/{executor-J9k2sp9m.js → executor-D3WIS4vl.js} +2 -2
- package/dist/{images-DV2FlEGL.js → images-5VNK_yYC.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-B4yTgklN.js → job-queue-BYHonCAH.js} +1 -1
- package/dist/{logging-Dk_FpF36.js → logging-DNQqsQ57.js} +1 -1
- package/dist/{message-BzseAFH1.js → message-CDTJISxL.js} +4 -4
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-bTspTMCC.js → oauth-callback-server-Bk4rbLOs.js} +2 -2
- package/dist/{profile-Dq5I7TV1.js → profile-ieODOp4u.js} +3 -3
- package/dist/{registry-BFzQFV_y.js → registry-CfdUEk4N.js} +1 -1
- package/dist/{resolve-CnRHib0U.js → resolve-BXShI336.js} +3 -3
- package/dist/{result-DczfmNBa.js → result-R35jcahx.js} +7 -7
- package/dist/{runner-CJd9Wec-.js → runner-IC4Drh3Y.js} +10 -10
- package/dist/{sandbox-egress-signals-DUmVkOx4.js → sandbox-egress-signals-C4RIfjb8.js} +1 -1
- package/dist/{service-account-x2QZXm4X.js → service-account-DJSRo2cL.js} +3 -3
- package/dist/{service-account-BI2kQDrb.js → service-account-DifohWyX.js} +3 -3
- package/dist/{session-stop-CtyJsnEj.js → session-stop-B9RRGC-P.js} +12 -12
- package/dist/{skills-Dbzx9-rS.js → skills-DVJmS_ZP.js} +2 -2
- package/dist/{spawn-D8WU99UV.js → spawn-DkVYGfSY.js} +2 -2
- package/dist/{store-TKg1HVKx.js → store-BvolNnx4.js} +3 -3
- package/dist/{store-UlOrW6JC.js → store-C_mHwAnR.js} +18 -9
- package/dist/{task-queue-BRB49H-J.js → task-queue-BcEyPhtX.js} +3 -3
- package/dist/{task-runner-C575f2Dd.js → task-runner-CiQj5M_9.js} +10 -10
- package/dist/{tasks-LOItiYgL.js → tasks-OgXmReUv.js} +10 -10
- package/dist/{thread-state-IDHdZA7R.js → thread-state-XFvpWXE9.js} +5 -5
- package/dist/{turn-failure-response-h_LSXJ-M.js → turn-failure-response-BjBAtnVt.js} +7 -7
- package/dist/{turn-lifecycle-Cvi6Sb8Y.js → turn-lifecycle-nvKL2rul.js} +1 -1
- package/dist/{turn-session-routing-5Nyv4fso.js → turn-session-routing-DEMxHySb.js} +1 -1
- package/dist/{validation-BeTriWC2.js → validation-XOFldwvE.js} +1 -1
- package/dist/{version-BQX_hLDC.js → version-C9f5hdHD.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-DmNRM88V.js → viewer-BuPwzOC9.js} +3 -3
- package/dist/{web-input-BHcGXSox.js → web-input-4t7TYLsY.js} +26 -26
- package/dist/{work-DLJMV02b.js → work-C_aF6JN5.js} +10 -10
- package/dist/{worker-vfG2ESg1.js → worker-DR633sA-.js} +8 -6
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
-
import { t as disconnectStateAdapter } from "./adapter-
|
|
3
|
-
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-R53MWcMi.js";
|
|
2
|
+
import { t as disconnectStateAdapter } from "./adapter-BIbMSKlG.js";
|
|
3
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-DJSRo2cL.js";
|
|
4
4
|
import { CLI_USAGE } from "./cli/run.js";
|
|
5
5
|
import { createServer } from "node:http";
|
|
6
6
|
// src/cli/service-account.ts
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { $t as isToolResultMessage, Qt as isToolResultError, Xt as isAssistantMessage, en as normalizeToolNameFromResult, qn as postSlackMessage } from "./tasks-
|
|
3
|
-
import { f as logException, m as logWarn, p as logInfo } from "./logging-
|
|
4
|
-
import { n as botConfig } from "./config-
|
|
5
|
-
import { f as getSqlExecutor, u as getConversationStore } from "./viewer-
|
|
2
|
+
import { $t as isToolResultMessage, Qt as isToolResultError, Xt as isAssistantMessage, en as normalizeToolNameFromResult, qn as postSlackMessage } from "./tasks-OgXmReUv.js";
|
|
3
|
+
import { f as logException, m as logWarn, p as logInfo } from "./logging-DNQqsQ57.js";
|
|
4
|
+
import { n as botConfig } from "./config-BxPrFVJP.js";
|
|
5
|
+
import { f as getSqlExecutor, u as getConversationStore } from "./viewer-BuPwzOC9.js";
|
|
6
6
|
import { s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
7
|
-
import "./executor-
|
|
8
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
9
|
-
import { gt as JUNIOR_THREAD_STATE_TTL_MS, rt as verifyTimerWatchCredentialSubject, u as getPlugins, xt as ToolInputError } from "./agent-hooks-
|
|
10
|
-
import { r as getStateAdapter } from "./adapter-
|
|
7
|
+
import "./executor-D3WIS4vl.js";
|
|
8
|
+
import { h as credentialSubjectSchema } from "./registry-CfdUEk4N.js";
|
|
9
|
+
import { gt as JUNIOR_THREAD_STATE_TTL_MS, rt as verifyTimerWatchCredentialSubject, u as getPlugins, xt as ToolInputError } from "./agent-hooks-D_PbluRX.js";
|
|
10
|
+
import { r as getStateAdapter } from "./adapter-BIbMSKlG.js";
|
|
11
11
|
import { r as EVENT_AUTHOR_ID } from "./prompt-CxatQVaj.js";
|
|
12
|
-
import { r as sanitizeAssistantText } from "./assistant-reply-
|
|
13
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
12
|
+
import { r as sanitizeAssistantText } from "./assistant-reply-BcJj_ORj.js";
|
|
13
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-C_mHwAnR.js";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
import { eq, inArray } from "drizzle-orm";
|
|
16
16
|
import { eventMatchFieldsSchema, eventMatchSchema, normalizeEventIdentifier, objectTypeSchema } from "@sentry/junior-plugin-api";
|
|
@@ -524,7 +524,7 @@ function requireEventIdentifier(catalog, input) {
|
|
|
524
524
|
const registration = catalog[input.namespace];
|
|
525
525
|
const identifier = normalizeEventIdentifier(registration, input.identifier);
|
|
526
526
|
const resourceTypes = registration?.resourceTypes ?? [];
|
|
527
|
-
const fits = (resourceType) => resourceType.identifier !== void 0 &&
|
|
527
|
+
const fits = (resourceType) => resourceType.identifier !== void 0 && new RegExp(resourceType.identifier.pattern).test(identifier);
|
|
528
528
|
const resourceType = resourceTypes.find((candidate) => candidate.type === input.resourceType);
|
|
529
529
|
if (!resourceType?.identifier || fits(resourceType)) return identifier;
|
|
530
530
|
const fitting = resourceTypes.filter(fits).map((candidate) => candidate.type);
|
|
@@ -609,7 +609,7 @@ function slackChannelMessageEvents() {
|
|
|
609
609
|
type: CHANNEL_RESOURCE_TYPE,
|
|
610
610
|
identifier: {
|
|
611
611
|
format: `"${SLACK_CURRENT_CHANNEL_IDENTIFIER}" for the channel where the automation is created`,
|
|
612
|
-
pattern:
|
|
612
|
+
pattern: String.raw`^(?:current_channel|[CG][A-Z0-9]{2,})$`
|
|
613
613
|
},
|
|
614
614
|
supportedEvents: [MESSAGE_POSTED_EVENT],
|
|
615
615
|
suggestedEvents: [],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { m as logWarn } from "./logging-
|
|
2
|
+
import { m as logWarn } from "./logging-DNQqsQ57.js";
|
|
3
3
|
import { s as skillRoots } from "./package-discovery-DJBompdd.js";
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-R53MWcMi.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-nwUcYXjP.js";
|
|
2
|
-
import { $ as toolInvocationDestination, Q as actorFromRun } from "./agent-runner-
|
|
3
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { $ as toolInvocationDestination, Q as actorFromRun } from "./agent-runner-CvRxb09K.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-C_aF6JN5.js";
|
|
4
4
|
// 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,8 +1,8 @@
|
|
|
1
1
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema } from "./model-profile-Bg8EoCKD.js";
|
|
2
|
-
import { f as getSqlExecutor, u as getConversationStore } from "./viewer-
|
|
2
|
+
import { f as getSqlExecutor, u as getConversationStore } from "./viewer-BuPwzOC9.js";
|
|
3
3
|
import { a as juniorAgentInvocations, i as juniorAgentBindings, n as AGENT_INVOCATION_PARENT_MAILBOX_STATUSES, t as AGENT_INVOCATION_MAILBOX_STATUSES } from "./agent-invocations-CxKldAeB.js";
|
|
4
|
-
import "./executor-
|
|
5
|
-
import { p as credentialContextSchema } from "./registry-
|
|
4
|
+
import "./executor-D3WIS4vl.js";
|
|
5
|
+
import { p as credentialContextSchema } from "./registry-CfdUEk4N.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
import { and, asc, count, countDistinct, desc, eq, inArray, lt, ne, or, sql } from "drizzle-orm";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as toOptionalNumber, V as toOptionalString, z as isRecord } from "./logging-
|
|
2
|
-
import { i as getChatConfig } from "./config-
|
|
1
|
+
import { B as toOptionalNumber, V as toOptionalString, z as isRecord } from "./logging-DNQqsQ57.js";
|
|
2
|
+
import { i as getChatConfig } from "./config-BxPrFVJP.js";
|
|
3
3
|
import { s as parseStoredSlackActor } from "./actor-tlxzqaRe.js";
|
|
4
|
-
import { B as sameDestination, R as parseDestination, u as getConversationStore } from "./viewer-
|
|
5
|
-
import { gt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-
|
|
6
|
-
import { n as getDefaultRedisStateAdapterFor, r as getStateAdapter } from "./adapter-
|
|
7
|
-
import "./job-queue-
|
|
4
|
+
import { B as sameDestination, R as parseDestination, u as getConversationStore } from "./viewer-BuPwzOC9.js";
|
|
5
|
+
import { gt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-D_PbluRX.js";
|
|
6
|
+
import { n as getDefaultRedisStateAdapterFor, r as getStateAdapter } from "./adapter-BIbMSKlG.js";
|
|
7
|
+
import "./job-queue-BYHonCAH.js";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
10
|
import { destinationSchema } from "@sentry/junior-plugin-api";
|
|
@@ -66,6 +66,11 @@ const agentInputSchema = z.object({
|
|
|
66
66
|
}).strict().refine((input) => input.text.trim() || input.attachments?.length, { message: "agent input requires text or attachments" });
|
|
67
67
|
/** Durable delivery modes for pending inbound mailbox work. */
|
|
68
68
|
const inboundMessageDeliverySchema = z.enum(["defer", "interrupt"]);
|
|
69
|
+
/** Sentry trace propagation headers captured when an inbound message arrives. */
|
|
70
|
+
const inboundMessageTraceContextSchema = z.object({
|
|
71
|
+
baggage: z.string().optional(),
|
|
72
|
+
sentryTrace: z.string().min(1)
|
|
73
|
+
}).optional().catch(void 0);
|
|
69
74
|
/** Redis mailbox shape kept for deployed workers that still require this field. */
|
|
70
75
|
const storedInboundMessageSchema = z.object({
|
|
71
76
|
attemptCount: z.number().finite().optional(),
|
|
@@ -77,7 +82,8 @@ const storedInboundMessageSchema = z.object({
|
|
|
77
82
|
injectedAtMs: z.number().finite().optional(),
|
|
78
83
|
input: agentInputSchema,
|
|
79
84
|
receivedAtMs: z.number().finite(),
|
|
80
|
-
source: inboundMessageSourceSchema
|
|
85
|
+
source: inboundMessageSourceSchema,
|
|
86
|
+
traceContext: inboundMessageTraceContextSchema
|
|
81
87
|
}).strict().extend({ publishExternally: z.boolean() });
|
|
82
88
|
function conversationKey(conversationId) {
|
|
83
89
|
return `${CONVERSATION_PREFIX}:${conversationId}`;
|
|
@@ -139,8 +145,11 @@ function normalizeExecutionStatus(value) {
|
|
|
139
145
|
function normalizeMessage(value) {
|
|
140
146
|
const parsed = storedInboundMessageSchema.safeParse(value);
|
|
141
147
|
if (!parsed.success) return;
|
|
142
|
-
const { publishExternally: _publishExternally, ...message } = parsed.data;
|
|
143
|
-
return
|
|
148
|
+
const { publishExternally: _publishExternally, traceContext, ...message } = parsed.data;
|
|
149
|
+
return traceContext ? {
|
|
150
|
+
...message,
|
|
151
|
+
traceContext
|
|
152
|
+
} : message;
|
|
144
153
|
}
|
|
145
154
|
function storeMessage(message, publishExternally) {
|
|
146
155
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as logWarn } from "./logging-
|
|
2
|
-
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as createVercelQueueClient, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-
|
|
1
|
+
import { m as logWarn } from "./logging-DNQqsQ57.js";
|
|
2
|
+
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as createVercelQueueClient, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-BYHonCAH.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import { handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
@@ -114,7 +114,7 @@ function pluginTaskCallback() {
|
|
|
114
114
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
115
115
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
116
116
|
run: async (message) => {
|
|
117
|
-
const { processPluginTask } = await import("./task-runner-
|
|
117
|
+
const { processPluginTask } = await import("./task-runner-CiQj5M_9.js").then((n) => n.r);
|
|
118
118
|
await processPluginTask(message);
|
|
119
119
|
},
|
|
120
120
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { $t as isToolResultMessage, Gt as getPiMessageRole, Kn as openSlackDirectMessage, Nt as getTurnRecord, Qt as isToolResultError, Rn as escapeSlackMrkdwnText, X as hydrateConversationMessages, Yt as instructionTextForProjection, en as normalizeToolNameFromResult, i as readScheduledAutomation, l as blockEventAutomation, m as getEventAutomation, nn as stripRuntimeTurnContext, nt as fallbackShortTitle, qn as postSlackMessage, zn as formatSlackLink } from "./tasks-
|
|
3
|
-
import { g as runBestEffort, m as logWarn } from "./logging-
|
|
2
|
+
import { $t as isToolResultMessage, Gt as getPiMessageRole, Kn as openSlackDirectMessage, Nt as getTurnRecord, Qt as isToolResultError, Rn as escapeSlackMrkdwnText, X as hydrateConversationMessages, Yt as instructionTextForProjection, en as normalizeToolNameFromResult, i as readScheduledAutomation, l as blockEventAutomation, m as getEventAutomation, nn as stripRuntimeTurnContext, nt as fallbackShortTitle, qn as postSlackMessage, zn as formatSlackLink } from "./tasks-OgXmReUv.js";
|
|
3
|
+
import { g as runBestEffort, m as logWarn } from "./logging-DNQqsQ57.js";
|
|
4
4
|
import { g as parseSlackMessageTs } from "./actor-tlxzqaRe.js";
|
|
5
|
-
import { T as agentTurnTotalTokens, d as getDb, r as readActorIdentity, u as getConversationStore, w as agentTurnCostUsd } from "./viewer-
|
|
5
|
+
import { T as agentTurnTotalTokens, d as getDb, r as readActorIdentity, u as getConversationStore, w as agentTurnCostUsd } from "./viewer-BuPwzOC9.js";
|
|
6
6
|
import { s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
7
|
-
import { a as juniorAutomationRuns, s as juniorAutomations } from "./executor-
|
|
7
|
+
import { a as juniorAutomationRuns, s as juniorAutomations } from "./executor-D3WIS4vl.js";
|
|
8
8
|
import { m as sameActorIdentity } from "./history-AY8rs-FR.js";
|
|
9
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
10
|
-
import { Ct as createPluginState, Et as createPluginLogger, It as createPluginConversationEvents, Qt as createPluginCache, Tt as createPluginModel, gt as JUNIOR_THREAD_STATE_TTL_MS, p as coreTaskRegistrations, u as getPlugins, wt as createPluginEmbedder, yt as getDashboardTaskLink } from "./agent-hooks-
|
|
11
|
-
import { r as getStateAdapter } from "./adapter-
|
|
12
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
13
|
-
import { t as resolveConversationRouting } from "./turn-session-routing-
|
|
14
|
-
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-
|
|
9
|
+
import { h as credentialSubjectSchema } from "./registry-CfdUEk4N.js";
|
|
10
|
+
import { Ct as createPluginState, Et as createPluginLogger, It as createPluginConversationEvents, Qt as createPluginCache, Tt as createPluginModel, gt as JUNIOR_THREAD_STATE_TTL_MS, p as coreTaskRegistrations, u as getPlugins, wt as createPluginEmbedder, yt as getDashboardTaskLink } from "./agent-hooks-D_PbluRX.js";
|
|
11
|
+
import { r as getStateAdapter } from "./adapter-BIbMSKlG.js";
|
|
12
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-XFvpWXE9.js";
|
|
13
|
+
import { t as resolveConversationRouting } from "./turn-session-routing-DEMxHySb.js";
|
|
14
|
+
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-BcEyPhtX.js";
|
|
15
15
|
import { z } from "zod";
|
|
16
16
|
import { createHash } from "node:crypto";
|
|
17
17
|
import { and, asc, count, desc, eq, gte, inArray, isNotNull, lte, max, sql } from "drizzle-orm";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { a as completeText, f as unwrapCurrentInstruction, p as escapeXml, s as resolveGatewayModel, y as isProviderRetryError } from "./client-
|
|
2
|
-
import { V as toOptionalString, f as logException, m as logWarn, o as getActiveTraceId, p as logInfo, s as getLogContextAttributes, t as buildTurnFailureResponse, u as logAudit, y as setSpanAttributes, z as isRecord } from "./logging-
|
|
1
|
+
import { a as completeText, f as unwrapCurrentInstruction, p as escapeXml, s as resolveGatewayModel, y as isProviderRetryError } from "./client-DpOwh_zX.js";
|
|
2
|
+
import { V as toOptionalString, f as logException, m as logWarn, o as getActiveTraceId, p as logInfo, s as getLogContextAttributes, t as buildTurnFailureResponse, u as logAudit, y as setSpanAttributes, z as isRecord } from "./logging-DNQqsQ57.js";
|
|
3
3
|
import { n as captureMessage } from "./sentry-BBUlHih9.js";
|
|
4
|
-
import { n as botConfig, v as normalizeSlackEmojiName } from "./config-
|
|
4
|
+
import { n as botConfig, v as normalizeSlackEmojiName } from "./config-BxPrFVJP.js";
|
|
5
5
|
import { c as toStoredSlackActor, f as parseSlackUserId, g as parseSlackMessageTs } from "./actor-tlxzqaRe.js";
|
|
6
|
-
import { C as addAgentTurnUsage, R as parseDestination, c as getConversationEventStore, d as getDb, f as getSqlExecutor, m as withConversationEventLock, p as createSqlConversationEventStore, u as getConversationStore, x as bindProviderConversation, y as startLocationThread } from "./viewer-
|
|
6
|
+
import { C as addAgentTurnUsage, R as parseDestination, c as getConversationEventStore, d as getDb, f as getSqlExecutor, m as withConversationEventLock, p as createSqlConversationEventStore, u as getConversationStore, x as bindProviderConversation, y as startLocationThread } from "./viewer-BuPwzOC9.js";
|
|
7
7
|
import { d as juniorDestinations } from "./agent-invocations-CxKldAeB.js";
|
|
8
|
-
import { a as juniorAutomationRuns, l as juniorLocationConfigurations, o as juniorAutomationVersions, s as juniorAutomations } from "./executor-
|
|
8
|
+
import { a as juniorAutomationRuns, l as juniorLocationConfigurations, o as juniorAutomationVersions, s as juniorAutomations } from "./executor-D3WIS4vl.js";
|
|
9
9
|
import { d as contextProvenance, f as instructionActors, n as agentHistoryItemSchema, p as instructionProvenanceFor } from "./history-AY8rs-FR.js";
|
|
10
|
-
import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, f as credentialContextForActor, h as credentialSubjectSchema, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-
|
|
11
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
12
|
-
import { Et as createPluginLogger, Qt as createPluginCache, ct as getSlackClient, dt as normalizeSlackConversationId, en as JUNIOR_NATIVE_EVENT_NAMESPACE, it as SlackActionError, n as applyPluginFormatMarkdown, nn as authenticationLinkedEvent, pt as withSlackRetries, rn as authenticationUnlinkedEvent, tn as agentsInstructionsUpdatedEvent, u as getPlugins, ut as isDmChannel, xt as ToolInputError } from "./agent-hooks-
|
|
13
|
-
import { a as acquireActiveLock, i as MUTATION_LOCK_TTL_MS, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-
|
|
10
|
+
import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, f as credentialContextForActor, h as credentialSubjectSchema, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-CfdUEk4N.js";
|
|
11
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-R53MWcMi.js";
|
|
12
|
+
import { Et as createPluginLogger, Qt as createPluginCache, ct as getSlackClient, dt as normalizeSlackConversationId, en as JUNIOR_NATIVE_EVENT_NAMESPACE, it as SlackActionError, n as applyPluginFormatMarkdown, nn as authenticationLinkedEvent, pt as withSlackRetries, rn as authenticationUnlinkedEvent, tn as agentsInstructionsUpdatedEvent, u as getPlugins, ut as isDmChannel, xt as ToolInputError } from "./agent-hooks-D_PbluRX.js";
|
|
13
|
+
import { a as acquireActiveLock, i as MUTATION_LOCK_TTL_MS, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-BIbMSKlG.js";
|
|
14
14
|
import { N as messageCardRef } from "./conversation-B0baEwoA.js";
|
|
15
|
-
import { y as sleep } from "./profile-
|
|
15
|
+
import { y as sleep } from "./profile-ieODOp4u.js";
|
|
16
16
|
import { A as eventAutomationSchema, E as scheduledAutomationSchema, S as automationVersionSchema } from "./automation-CWX0qL8U.js";
|
|
17
17
|
import { isDeepStrictEqual } from "node:util";
|
|
18
18
|
import { z } from "zod";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Z as persistConversationMessages, er as createDurableLocationConfigurationService } from "./tasks-
|
|
2
|
-
import { B as toOptionalNumber, V as toOptionalString, z as isRecord } from "./logging-
|
|
3
|
-
import { d as getDb } from "./viewer-
|
|
4
|
-
import { gt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-
|
|
5
|
-
import { r as getStateAdapter } from "./adapter-
|
|
1
|
+
import { Z as persistConversationMessages, er as createDurableLocationConfigurationService } from "./tasks-OgXmReUv.js";
|
|
2
|
+
import { B as toOptionalNumber, V as toOptionalString, z as isRecord } from "./logging-DNQqsQ57.js";
|
|
3
|
+
import { d as getDb } from "./viewer-BuPwzOC9.js";
|
|
4
|
+
import { gt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-D_PbluRX.js";
|
|
5
|
+
import { r as getStateAdapter } from "./adapter-BIbMSKlG.js";
|
|
6
6
|
// src/chat/state/conversation.ts
|
|
7
7
|
function defaultConversationState() {
|
|
8
8
|
return {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { X as hydrateConversationMessages, cn as buildDeterministicTurnId, ut as markConversationMessage, wt as clearPendingAuth } from "./tasks-
|
|
2
|
-
import { _ as getProviderErrorAttributes, g as findProviderError, m as ProviderError, v as getProviderErrorUserMessage } from "./client-
|
|
3
|
-
import { t as buildTurnFailureResponse, z as isRecord } from "./logging-
|
|
1
|
+
import { X as hydrateConversationMessages, cn as buildDeterministicTurnId, ut as markConversationMessage, wt as clearPendingAuth } from "./tasks-OgXmReUv.js";
|
|
2
|
+
import { _ as getProviderErrorAttributes, g as findProviderError, m as ProviderError, v as getProviderErrorUserMessage } from "./client-DpOwh_zX.js";
|
|
3
|
+
import { t as buildTurnFailureResponse, z as isRecord } from "./logging-DNQqsQ57.js";
|
|
4
4
|
import { g as parseSlackMessageTs } from "./actor-tlxzqaRe.js";
|
|
5
|
-
import { c as getConversationEventStore, d as getDb } from "./viewer-
|
|
6
|
-
import { qt as listConversationAnnotations } from "./agent-hooks-
|
|
5
|
+
import { c as getConversationEventStore, d as getDb } from "./viewer-BuPwzOC9.js";
|
|
6
|
+
import { qt as listConversationAnnotations } from "./agent-hooks-D_PbluRX.js";
|
|
7
7
|
import { F as readMessageCardRefs, I as removedCardSchema, L as resolveMessageCards } from "./conversation-B0baEwoA.js";
|
|
8
|
-
import { D as parseAgentInvocationResultMessageId, J as markTurnClosed, Y as markTurnCompleted, c as getAgentInvocation, m as getAgentInvocationTurnId } from "./store-
|
|
9
|
-
import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
8
|
+
import { D as parseAgentInvocationResultMessageId, J as markTurnClosed, Y as markTurnCompleted, c as getAgentInvocation, m as getAgentInvocationTurnId } from "./store-BvolNnx4.js";
|
|
9
|
+
import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-XFvpWXE9.js";
|
|
10
10
|
// src/chat/conversations/pending-cards.ts
|
|
11
11
|
/**
|
|
12
12
|
* Add the cards that tool results selected since the last visible assistant
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as getConversationEventStore } from "./viewer-
|
|
1
|
+
import { c as getConversationEventStore } from "./viewer-BuPwzOC9.js";
|
|
2
2
|
// src/chat/conversations/turn-lifecycle.ts
|
|
3
3
|
/** Persist correlated turn lifecycle facts with retry-safe terminal exclusion. */
|
|
4
4
|
var ConversationTurnLifecycleService = class {
|
|
@@ -34,7 +34,7 @@ function slackSourceForDestination(args) {
|
|
|
34
34
|
* Reads parent Conversations when this Conversation has no Destination.
|
|
35
35
|
*/
|
|
36
36
|
async function resolveConversationRouting(args) {
|
|
37
|
-
const conversationStore = args.conversationStore ?? (await import("./viewer-
|
|
37
|
+
const conversationStore = args.conversationStore ?? (await import("./viewer-BuPwzOC9.js").then((n) => n.s)).getConversationStore();
|
|
38
38
|
const chain = await loadConversationChain(args.conversationId, conversationStore);
|
|
39
39
|
let destination;
|
|
40
40
|
let source;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-R53MWcMi.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.264.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-C9f5hdHD.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { I as GOOGLE_IDENTITY_PROVIDER, R as normalizeIdentityEmail } from "./logging-
|
|
3
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
+
import { I as GOOGLE_IDENTITY_PROVIDER, R as normalizeIdentityEmail } from "./logging-DNQqsQ57.js";
|
|
3
|
+
import { i as getChatConfig } from "./config-BxPrFVJP.js";
|
|
4
4
|
import { d as parseSlackTeamId, o as parseActorUserId, u as parseSlackChannelReferenceId } from "./actor-tlxzqaRe.js";
|
|
5
5
|
import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, o as conversationReadColumns, s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
6
|
-
import { _ as juniorConversationAnnotations, d as juniorConversationBindings, h as juniorConversationEvents, m as juniorConversationMetrics, p as CONVERSATION_METRICS, t as createJuniorSqlExecutor, u as juniorConversationParticipants } from "./executor-
|
|
6
|
+
import { _ as juniorConversationAnnotations, d as juniorConversationBindings, h as juniorConversationEvents, m as juniorConversationMetrics, p as CONVERSATION_METRICS, t as createJuniorSqlExecutor, u as juniorConversationParticipants } from "./executor-D3WIS4vl.js";
|
|
7
7
|
import { c as newConversationEventSchema, h as usageSchema, l as encodeHistoryPayload, o as decodeStoredConversationEvent, r as conversationEventDataSchema, s as historyReplacementSchema } from "./history-AY8rs-FR.js";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
import { and, asc, desc, eq, gt, gte, inArray, isNull, lt, lte, ne, or, sql } from "drizzle-orm";
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { $ as persistConversationMessageSummaries, A as commitAcceptedReply, At as abandonTurnRecord, Bn as normalizeSlackReplyMarkdown, Bt as buildTurnErrorResponse, E as sameDefinitionValue, Et as wasPendingAuthStopped, F as loadProjection, Ft as recordTurnSummary, H as recordAuthorizationCompleted, Jn as removeReactionFromMessage, K as recordSubscribedReplyRoute, Mt as failTurnRecord, N as loadConversationProjection, Nt as getTurnRecord, Ot as loadTurnCheckpoint, Pt as listTurnSummaries, Rn as escapeSlackMrkdwnText, S as automationDefinition, Un as truncateStatusText, Ut as persistWithRetry, Vn as normalizeSlackStatusText, Wn as addReactionToMessage, X as hydrateConversationMessages, Z as persistConversationMessages, _ as parseEventAutomationRow, _n as isExperimentalFeatureEnabled, at as buildConversationContext, bn as createUserTokenStore, bt as AuthorizationFlowDisabledError, c as withScheduledAutomationLock, cn as buildDeterministicTurnId, ct as getConversationMessageSlackTs, dn as getSubscribedReplyPreflightDecision, dt as normalizeConversationText, et as resolveConversationTitle, f as deleteEventAutomation, fn as getThreadStopDecision, ft as recordDeliveredAssistantMessage, gt as PluginCredentialFailureError, h as listDeletedEventAutomationsCreatedBy, i as readScheduledAutomation, it as appendThreadContextMessages, j as commitMessages, jt as completeTurnRecord, kt as saveTurnCheckpoint, lt as isHumanConversationMessage, mt as upsertConversationMessage, nt as fallbackShortTitle, o as saveScheduledAutomationInLock, ot as createConversationMemoryService, pt as turnHasReply, qn as postSlackMessage, r as parseScheduledAutomationRow, rn as trimTrailingAssistantMessages, sn as buildDeterministicAssistantMessageId, st as estimateConversationContextTokens, tr as configValueSchema, un as decideSubscribedThreadReply, ut as markConversationMessage, w as listAutomationVersions, wt as clearPendingAuth, zn as formatSlackLink } from "./tasks-
|
|
2
|
-
import { a as completeText, p as escapeXml, r as completeDecision, y as isProviderRetryError } from "./client-
|
|
3
|
-
import { B as toOptionalNumber, T as withSpan, V as toOptionalString, d as logError, f as logException, m as logWarn, n as createChatSdkLogger, o as getActiveTraceId, p as logInfo, t as buildTurnFailureResponse, v as setSentryUser, w as withLogContext, x as setTags, y as setSpanAttributes, z as isRecord } from "./logging-
|
|
4
|
-
import { c as getSlackClientSecret, i as getChatConfig, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, s as getSlackClientId, v as normalizeSlackEmojiName } from "./config-
|
|
1
|
+
import { $ as persistConversationMessageSummaries, A as commitAcceptedReply, At as abandonTurnRecord, Bn as normalizeSlackReplyMarkdown, Bt as buildTurnErrorResponse, E as sameDefinitionValue, Et as wasPendingAuthStopped, F as loadProjection, Ft as recordTurnSummary, H as recordAuthorizationCompleted, Jn as removeReactionFromMessage, K as recordSubscribedReplyRoute, Mt as failTurnRecord, N as loadConversationProjection, Nt as getTurnRecord, Ot as loadTurnCheckpoint, Pt as listTurnSummaries, Rn as escapeSlackMrkdwnText, S as automationDefinition, Un as truncateStatusText, Ut as persistWithRetry, Vn as normalizeSlackStatusText, Wn as addReactionToMessage, X as hydrateConversationMessages, Z as persistConversationMessages, _ as parseEventAutomationRow, _n as isExperimentalFeatureEnabled, at as buildConversationContext, bn as createUserTokenStore, bt as AuthorizationFlowDisabledError, c as withScheduledAutomationLock, cn as buildDeterministicTurnId, ct as getConversationMessageSlackTs, dn as getSubscribedReplyPreflightDecision, dt as normalizeConversationText, et as resolveConversationTitle, f as deleteEventAutomation, fn as getThreadStopDecision, ft as recordDeliveredAssistantMessage, gt as PluginCredentialFailureError, h as listDeletedEventAutomationsCreatedBy, i as readScheduledAutomation, it as appendThreadContextMessages, j as commitMessages, jt as completeTurnRecord, kt as saveTurnCheckpoint, lt as isHumanConversationMessage, mt as upsertConversationMessage, nt as fallbackShortTitle, o as saveScheduledAutomationInLock, ot as createConversationMemoryService, pt as turnHasReply, qn as postSlackMessage, r as parseScheduledAutomationRow, rn as trimTrailingAssistantMessages, sn as buildDeterministicAssistantMessageId, st as estimateConversationContextTokens, tr as configValueSchema, un as decideSubscribedThreadReply, ut as markConversationMessage, w as listAutomationVersions, wt as clearPendingAuth, zn as formatSlackLink } from "./tasks-OgXmReUv.js";
|
|
2
|
+
import { a as completeText, p as escapeXml, r as completeDecision, y as isProviderRetryError } from "./client-DpOwh_zX.js";
|
|
3
|
+
import { B as toOptionalNumber, T as withSpan, V as toOptionalString, d as logError, f as logException, m as logWarn, n as createChatSdkLogger, o as getActiveTraceId, p as logInfo, t as buildTurnFailureResponse, v as setSentryUser, w as withLogContext, x as setTags, y as setSpanAttributes, z as isRecord } from "./logging-DNQqsQ57.js";
|
|
4
|
+
import { c as getSlackClientSecret, i as getChatConfig, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, s as getSlackClientId, v as normalizeSlackEmojiName } from "./config-BxPrFVJP.js";
|
|
5
5
|
import { o as modelIdForProfile, r as defaultModelId } from "./model-profile-Bg8EoCKD.js";
|
|
6
6
|
import { a as isUserActor, g as parseSlackMessageTs, i as isActorUserId, l as parseSlackChannelId, n as createSlackActor, o as parseActorUserId, r as createSlackResumeActor, t as createActor } from "./actor-tlxzqaRe.js";
|
|
7
|
-
import { L as createSlackDestination, c as getConversationEventStore, d as getDb, f as getSqlExecutor, u as getConversationStore, z as requireSlackDestination } from "./viewer-
|
|
7
|
+
import { L as createSlackDestination, c as getConversationEventStore, d as getDb, f as getSqlExecutor, u as getConversationStore, z as requireSlackDestination } from "./viewer-BuPwzOC9.js";
|
|
8
8
|
import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers } from "./agent-invocations-CxKldAeB.js";
|
|
9
|
-
import { a as juniorAutomationRuns, s as juniorAutomations } from "./executor-
|
|
9
|
+
import { a as juniorAutomationRuns, s as juniorAutomations } from "./executor-D3WIS4vl.js";
|
|
10
10
|
import { p as instructionProvenanceFor } from "./history-AY8rs-FR.js";
|
|
11
|
-
import { d as actorLogContext, f as credentialContextForActor } from "./registry-
|
|
12
|
-
import { A as listThreadReplies, D as resolveSlackChannelIdFromMessage, E as readSlackRawMessageContext, I as eventAutomationTriggerAvailable, L as effectiveTaskOutcomes, O as resolveSlackChannelIdFromThreadId, T as parseSlackThreadId, X as withoutSavedSteeringMessages, Y as buildSteeringPiMessage, Z as RetryableDeliveryError, b as renderBlockText, i as buildAuthPauseResponse, k as getConversationInfo, n as executeAgentRun, p as latestProgressStatus, r as createContextCompactor, t as createAgentRunner, tt as shouldEmitDevAgentTrace, w as storeAttachment, y as renderAttachmentText } from "./agent-runner-
|
|
13
|
-
import { Bt as getSlackFileId, Ht as readAttachmentVisionSummary, Ut as recordSlackAttachment, V as cancelSubscriptions, Zt as lookupSlackUser, _t as getDashboardConversationLink, at as downloadPrivateSlackFile, ct as getSlackClient, dt as normalizeSlackConversationId, ft as runWithSlackInstallationToken, gt as JUNIOR_THREAD_STATE_TTL_MS, it as SlackActionError, o as getPluginSlackConversationLink, rt as verifyTimerWatchCredentialSubject, st as getHeaderString, ut as isDmChannel, vt as getDashboardObjectIconLink, zt as buildSentryConversationUrl } from "./agent-hooks-
|
|
14
|
-
import { a as acquireActiveLock, i as MUTATION_LOCK_TTL_MS, r as getStateAdapter, s as withLock } from "./adapter-
|
|
11
|
+
import { d as actorLogContext, f as credentialContextForActor } from "./registry-CfdUEk4N.js";
|
|
12
|
+
import { A as listThreadReplies, D as resolveSlackChannelIdFromMessage, E as readSlackRawMessageContext, I as eventAutomationTriggerAvailable, L as effectiveTaskOutcomes, O as resolveSlackChannelIdFromThreadId, T as parseSlackThreadId, X as withoutSavedSteeringMessages, Y as buildSteeringPiMessage, Z as RetryableDeliveryError, b as renderBlockText, i as buildAuthPauseResponse, k as getConversationInfo, n as executeAgentRun, p as latestProgressStatus, r as createContextCompactor, t as createAgentRunner, tt as shouldEmitDevAgentTrace, w as storeAttachment, y as renderAttachmentText } from "./agent-runner-CvRxb09K.js";
|
|
13
|
+
import { Bt as getSlackFileId, Ht as readAttachmentVisionSummary, Ut as recordSlackAttachment, V as cancelSubscriptions, Zt as lookupSlackUser, _t as getDashboardConversationLink, at as downloadPrivateSlackFile, ct as getSlackClient, dt as normalizeSlackConversationId, ft as runWithSlackInstallationToken, gt as JUNIOR_THREAD_STATE_TTL_MS, it as SlackActionError, o as getPluginSlackConversationLink, rt as verifyTimerWatchCredentialSubject, st as getHeaderString, ut as isDmChannel, vt as getDashboardObjectIconLink, zt as buildSentryConversationUrl } from "./agent-hooks-D_PbluRX.js";
|
|
14
|
+
import { a as acquireActiveLock, i as MUTATION_LOCK_TTL_MS, r as getStateAdapter, s as withLock } from "./adapter-BIbMSKlG.js";
|
|
15
15
|
import { B as readMessageAttachments, U as isVisionImageMediaType } from "./conversation-B0baEwoA.js";
|
|
16
16
|
import { a as EVENT_SYSTEM_ACTOR, o as isEventConversationMessage } from "./prompt-CxatQVaj.js";
|
|
17
|
-
import { B as ConversationTurnBoundaryError, G as isCooperativeTurnYieldError, H as TurnInputCommitLostError, J as markTurnClosed, K as isTurnInputCommitLostError, U as TurnInputDeferredError, V as CooperativeTurnYieldError, W as getConversationTurnBoundaryError, X as markTurnFailed, Y as markTurnCompleted, Z as startActiveTurn, q as isTurnInputDeferredError } from "./store-
|
|
18
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
19
|
-
import { H as runDispatchOutcome, N as maybePostAutomatedTurnLimitNotice, P as recordFinishedTurnForAutomatedLimit, R as deliversFinalText, c as isEventMailboxMetadata, d as getEventCatalog, i as skipInputBeforeConversationStop, j as joinMailboxText, l as renderEventBatchText, s as eventBatchMessageEvents, u as timerWatchCredentialSubject, x as automationEventCatalog, z as finishedRunReply } from "./session-stop-
|
|
20
|
-
import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline } from "./job-queue-
|
|
21
|
-
import { E as stopConversationWork, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, n as appendAndEnqueueExclusiveInboundMessage, r as appendAndEnqueueInboundMessage, w as requestConversationWork } from "./store-
|
|
17
|
+
import { B as ConversationTurnBoundaryError, G as isCooperativeTurnYieldError, H as TurnInputCommitLostError, J as markTurnClosed, K as isTurnInputCommitLostError, U as TurnInputDeferredError, V as CooperativeTurnYieldError, W as getConversationTurnBoundaryError, X as markTurnFailed, Y as markTurnCompleted, Z as startActiveTurn, q as isTurnInputDeferredError } from "./store-BvolNnx4.js";
|
|
18
|
+
import { n as getAssistantReplyText } from "./assistant-reply-BcJj_ORj.js";
|
|
19
|
+
import { H as runDispatchOutcome, N as maybePostAutomatedTurnLimitNotice, P as recordFinishedTurnForAutomatedLimit, R as deliversFinalText, c as isEventMailboxMetadata, d as getEventCatalog, i as skipInputBeforeConversationStop, j as joinMailboxText, l as renderEventBatchText, s as eventBatchMessageEvents, u as timerWatchCredentialSubject, x as automationEventCatalog, z as finishedRunReply } from "./session-stop-B9RRGC-P.js";
|
|
20
|
+
import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline } from "./job-queue-BYHonCAH.js";
|
|
21
|
+
import { E as stopConversationWork, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, n as appendAndEnqueueExclusiveInboundMessage, r as appendAndEnqueueInboundMessage, w as requestConversationWork } from "./store-C_mHwAnR.js";
|
|
22
22
|
import { l as automationListQuerySchema } from "./automation-CWX0qL8U.js";
|
|
23
23
|
import { c as sumUtcHoursIntoSixHours, m as healthReportSchema, t as webMessageId } from "./web-message-id-CJSUiksE.js";
|
|
24
|
-
import { A as readAutomationExecutions, D as readAutomationExecutionStatusDays, E as readAutomationExecutionHours, O as readAutomationExecutionStatusHours, S as emptyAutomationRunWindows, T as readAutomationExecutionDays, _ as markDispatchBlocked, a as claimDispatchMailboxAppend, b as markDispatchRunning, c as getDispatchConversationId, d as getDispatchRecord, f as getDispatchTurnId, g as markDispatchAwaitingResume, j as readAutomationRuns, k as readAutomationExecutionSummaries, l as getDispatchIdForConversation, m as isTerminalDispatchStatus, n as scheduleSessionCompletedPluginTasks, o as confirmDispatchMailboxAppend, t as processPluginTask, u as getDispatchInputMessageId, v as markDispatchCompleted, w as readAutomationExecutionByConversationId, y as markDispatchFailed } from "./task-runner-
|
|
25
|
-
import { a as withAgentInvocationResultActors, c as resolveMailboxTurnWork, i as startAgentInvocationsForChildInput, l as sourceFromTurnInput, o as getAuthPausedConversationTurnId, s as getEventBatchDelayMs, t as enqueueAgentInvocationResult, u as turnInputFactsFromConversationMessage } from "./result-
|
|
26
|
-
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
27
|
-
import { i as resolveAgentInvocationId, o as AgentRunError, s as executeTurn, t as createAgentInvocationWorker } from "./work-
|
|
28
|
-
import { a as persistThreadState, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-
|
|
29
|
-
import { c as deleteWebAuthorization, d as createPausedTurns, f as getPausedTurnRequest, h as getTurnAuthorization, m as wakePausedTurn, s as createWebAuthorization } from "./connections-
|
|
30
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-
|
|
31
|
-
import { t as bindMessageAgent } from "./message-
|
|
32
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
33
|
-
import { a as persistAuthPauseTurnState, c as getTurnUserSlackMessageTs, d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, n as getAgentTurnDiagnosticsAttributes, o as getTurnUserMessage, r as requireTurnFailureEventId, s as getTurnUserReplyAttachmentContext, t as finalizeFailedTurnReplyWithEvent, u as getInterruptionMarker } from "./turn-failure-response-
|
|
34
|
-
import { r as storeInputImages } from "./images-
|
|
24
|
+
import { A as readAutomationExecutions, D as readAutomationExecutionStatusDays, E as readAutomationExecutionHours, O as readAutomationExecutionStatusHours, S as emptyAutomationRunWindows, T as readAutomationExecutionDays, _ as markDispatchBlocked, a as claimDispatchMailboxAppend, b as markDispatchRunning, c as getDispatchConversationId, d as getDispatchRecord, f as getDispatchTurnId, g as markDispatchAwaitingResume, j as readAutomationRuns, k as readAutomationExecutionSummaries, l as getDispatchIdForConversation, m as isTerminalDispatchStatus, n as scheduleSessionCompletedPluginTasks, o as confirmDispatchMailboxAppend, t as processPluginTask, u as getDispatchInputMessageId, v as markDispatchCompleted, w as readAutomationExecutionByConversationId, y as markDispatchFailed } from "./task-runner-CiQj5M_9.js";
|
|
25
|
+
import { a as withAgentInvocationResultActors, c as resolveMailboxTurnWork, i as startAgentInvocationsForChildInput, l as sourceFromTurnInput, o as getAuthPausedConversationTurnId, s as getEventBatchDelayMs, t as enqueueAgentInvocationResult, u as turnInputFactsFromConversationMessage } from "./result-R35jcahx.js";
|
|
26
|
+
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-nvKL2rul.js";
|
|
27
|
+
import { i as resolveAgentInvocationId, o as AgentRunError, s as executeTurn, t as createAgentInvocationWorker } from "./work-C_aF6JN5.js";
|
|
28
|
+
import { a as persistThreadState, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-XFvpWXE9.js";
|
|
29
|
+
import { c as deleteWebAuthorization, d as createPausedTurns, f as getPausedTurnRequest, h as getTurnAuthorization, m as wakePausedTurn, s as createWebAuthorization } from "./connections-BnTM1nRf.js";
|
|
30
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-DEMxHySb.js";
|
|
31
|
+
import { t as bindMessageAgent } from "./message-CDTJISxL.js";
|
|
32
|
+
import { t as bindSpawnAgent } from "./spawn-DkVYGfSY.js";
|
|
33
|
+
import { a as persistAuthPauseTurnState, c as getTurnUserSlackMessageTs, d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, n as getAgentTurnDiagnosticsAttributes, o as getTurnUserMessage, r as requireTurnFailureEventId, s as getTurnUserReplyAttachmentContext, t as finalizeFailedTurnReplyWithEvent, u as getInterruptionMarker } from "./turn-failure-response-BjBAtnVt.js";
|
|
34
|
+
import { r as storeInputImages } from "./images-5VNK_yYC.js";
|
|
35
35
|
import { z } from "zod";
|
|
36
36
|
import { createHash } from "node:crypto";
|
|
37
37
|
import { and, asc, count, desc, eq, exists, inArray, ne, or, sql } from "drizzle-orm";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { At as abandonTurnRecord, Ht as isTurnExecutionLimitExceededError, Kt as getTerminalAssistantMessages, Mt as failTurnRecord, Nt as getTurnRecord, R as openConversationProjection, bt as AuthorizationFlowDisabledError, gt as PluginCredentialFailureError, kt as saveTurnCheckpoint } from "./tasks-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-
|
|
2
|
+
import { At as abandonTurnRecord, Ht as isTurnExecutionLimitExceededError, Kt as getTerminalAssistantMessages, Mt as failTurnRecord, Nt as getTurnRecord, R as openConversationProjection, bt as AuthorizationFlowDisabledError, gt as PluginCredentialFailureError, kt as saveTurnCheckpoint } from "./tasks-OgXmReUv.js";
|
|
3
|
+
import { n as botConfig } from "./config-BxPrFVJP.js";
|
|
4
|
+
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-BuPwzOC9.js";
|
|
5
5
|
import { m as sameActorIdentity, u as agentInstructionProvenance } from "./history-AY8rs-FR.js";
|
|
6
|
-
import { H as recordSubagentStarted, V as recordSubagentEnded, X as withoutSavedSteeringMessages, Y as buildSteeringPiMessage, et as readBlockedReport, z as stopChildAgentsOf } from "./agent-runner-
|
|
7
|
-
import { E as markAgentInvocationSteered, H as TurnInputCommitLostError, K as isTurnInputCommitLostError, L as agentTypeInstructions, O as reportReplacedAgentInvocation, R as agentTypeStartsWithParentHistory, S as markAgentInvocationMailboxAppended, T as markAgentInvocationRunning, W as getConversationTurnBoundaryError, _ as getLatestAgentInvocationForConversation, c as getAgentInvocation, f as getAgentInvocationMessageId, m as getAgentInvocationTurnId, n as completeAgentInvocation, r as createAgentInvocation, s as getActiveAgentInvocationForConversation, w as markAgentInvocationPaused, y as isTerminalAgentInvocation } from "./store-
|
|
8
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
9
|
-
import { F as resetAutomatedTurnLimit, N as maybePostAutomatedTurnLimitNotice, P as recordFinishedTurnForAutomatedLimit } from "./session-stop-
|
|
10
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
11
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
12
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-
|
|
6
|
+
import { H as recordSubagentStarted, V as recordSubagentEnded, X as withoutSavedSteeringMessages, Y as buildSteeringPiMessage, et as readBlockedReport, z as stopChildAgentsOf } from "./agent-runner-CvRxb09K.js";
|
|
7
|
+
import { E as markAgentInvocationSteered, H as TurnInputCommitLostError, K as isTurnInputCommitLostError, L as agentTypeInstructions, O as reportReplacedAgentInvocation, R as agentTypeStartsWithParentHistory, S as markAgentInvocationMailboxAppended, T as markAgentInvocationRunning, W as getConversationTurnBoundaryError, _ as getLatestAgentInvocationForConversation, c as getAgentInvocation, f as getAgentInvocationMessageId, m as getAgentInvocationTurnId, n as completeAgentInvocation, r as createAgentInvocation, s as getActiveAgentInvocationForConversation, w as markAgentInvocationPaused, y as isTerminalAgentInvocation } from "./store-BvolNnx4.js";
|
|
8
|
+
import { n as getAssistantReplyText } from "./assistant-reply-BcJj_ORj.js";
|
|
9
|
+
import { F as resetAutomatedTurnLimit, N as maybePostAutomatedTurnLimitNotice, P as recordFinishedTurnForAutomatedLimit } from "./session-stop-B9RRGC-P.js";
|
|
10
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-C_mHwAnR.js";
|
|
11
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-nvKL2rul.js";
|
|
12
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-XFvpWXE9.js";
|
|
13
13
|
import { isDeepStrictEqual } from "node:util";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
// src/chat/runtime/turn-execution.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { y as isProviderRetryError } from "./client-
|
|
3
|
-
import { f as logException, m as logWarn, p as logInfo, w as withLogContext } from "./logging-
|
|
4
|
-
import { i as getChatConfig } from "./config-
|
|
5
|
-
import { f as getTurnRequestDeadline, m as ConversationQueueMessageRejectedError } from "./job-queue-
|
|
6
|
-
import { C as requestAnotherSlice, M as isInvalidConversationRecordError, T as startConversationWork, b as recordConversationRetry, d as countPendingConversationMessages, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, j as isFinalAttempt, k as hasConversationStop, l as completeConversationStop, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, s as clearConsumedConversationWake, t as ackMessages, u as completeConversationWork, x as releaseConversationWork, y as recordAttemptFailure } from "./store-
|
|
2
|
+
import { y as isProviderRetryError } from "./client-DpOwh_zX.js";
|
|
3
|
+
import { f as logException, m as logWarn, p as logInfo, w as withLogContext, y as setSpanAttributes } from "./logging-DNQqsQ57.js";
|
|
4
|
+
import { i as getChatConfig } from "./config-BxPrFVJP.js";
|
|
5
|
+
import { f as getTurnRequestDeadline, m as ConversationQueueMessageRejectedError } from "./job-queue-BYHonCAH.js";
|
|
6
|
+
import { C as requestAnotherSlice, M as isInvalidConversationRecordError, T as startConversationWork, b as recordConversationRetry, d as countPendingConversationMessages, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, j as isFinalAttempt, k as hasConversationStop, l as completeConversationStop, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, s as clearConsumedConversationWake, t as ackMessages, u as completeConversationWork, x as releaseConversationWork, y as recordAttemptFailure } from "./store-C_mHwAnR.js";
|
|
7
7
|
// src/chat/task-execution/worker.ts
|
|
8
8
|
var worker_exports = /* @__PURE__ */ __exportAll({
|
|
9
9
|
CONVERSATION_WORK_DEFER_DELAY_MS: () => CONVERSATION_WORK_DEFER_DELAY_MS,
|
|
@@ -198,7 +198,9 @@ async function processConversationWorkInContext(message, options) {
|
|
|
198
198
|
if (isInvalidConversationRecordError(error)) throw new ConversationQueueMessageRejectedError("invalid_record", `Conversation record failed validation for ${conversationId}`, { conversationId });
|
|
199
199
|
throw error;
|
|
200
200
|
}
|
|
201
|
-
|
|
201
|
+
const pendingCount = initial ? countPendingConversationMessages(initial) : 0;
|
|
202
|
+
setSpanAttributes({ "app.worker.pending_count": pendingCount });
|
|
203
|
+
if (!initial || pendingCount === 0 && initial.execution.status === "idle" && !initial.execution.lease) {
|
|
202
204
|
if (initial) await clearConsumedConversationWake({
|
|
203
205
|
conversationId,
|
|
204
206
|
conversationStore: options.conversationStore,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.264.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"sharp": "^0.35.3",
|
|
90
90
|
"yaml": "^2.9.0",
|
|
91
91
|
"zod": "^4.5.4",
|
|
92
|
-
"@sentry/junior-plugin-api": "0.
|
|
92
|
+
"@sentry/junior-plugin-api": "0.264.0"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@emnapi/core": "^1.10.0",
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
"typescript": "^7.0.2",
|
|
110
110
|
"vercel": "^54.4.0",
|
|
111
111
|
"vitest": "^4.1.12",
|
|
112
|
-
"@sentry/junior-github": "0.263.0",
|
|
113
112
|
"@sentry/junior-testing": "0.0.0",
|
|
114
|
-
"@sentry/junior-
|
|
113
|
+
"@sentry/junior-github": "0.264.0",
|
|
114
|
+
"@sentry/junior-memory": "0.264.0"
|
|
115
115
|
},
|
|
116
116
|
"scripts": {
|
|
117
117
|
"build": "tsdown",
|