@sentry/junior 0.211.0 → 0.213.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-XXC-9m0B.js → agent-I74ocTD9.js} +19 -19
- package/dist/{agent-hooks-7vR8uZw2.js → agent-hooks-CdRPMAIE.js} +207 -47
- package/dist/{agent-runner-CqXaUvvQ.js → agent-runner-B81eojZx.js} +5 -5
- package/dist/api/schema.js +2 -2
- package/dist/api.d.ts +1 -1
- package/dist/api.js +72 -33
- package/dist/{app-gyu3D9Gn.d.ts → app-D4nNdzPG.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +31 -31
- package/dist/{auth-pause-state-r-1vEoSX.js → auth-pause-state-BeY0ljFA.js} +6 -6
- package/dist/{briefs-DIj_YgLE.js → briefs-BVIBIvY1.js} +4 -4
- package/dist/{catalog-runtime-BMMLIpxX.js → catalog-runtime-nNOUcF0O.js} +1 -1
- package/dist/{checkpoint-B6jEtGHN.js → checkpoint-BBfOHMai.js} +7 -7
- package/dist/cli/chat.js +13 -13
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +1 -1
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-BBPo9KiG.js → client-HV5MI31k.js} +2 -2
- package/dist/{config-DMq-uJAV.js → config-DFAtlLoY.js} +2 -2
- package/dist/{conversation-AA4R1VUn.js → conversation-CRWntH-A.js} +19 -19
- package/dist/{conversation-privacy-D99FrYrV.js → conversation-privacy-cpqWNIJp.js} +1 -1
- package/dist/{credential-sync-Cz1T9Ws-.js → credential-sync--5BV3QNF.js} +20 -20
- package/dist/{db-D74z7BZH.d.ts → db-Ca9Nt5ci.d.ts} +1 -1
- package/dist/{execution-stats-BkCnuVBv.js → execution-stats-BjUUUOM8.js} +3 -4
- package/dist/{executor-B5VURdwg.js → executor-BTrFBTlg.js} +39 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-DUs_jnBa.js → job-queue-CEKc-Fos.js} +1 -1
- package/dist/{logging-CXQcqM-W.js → logging-BBIO8nx4.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-B0KXcd24.js → oauth-callback-server-BDbi0GuG.js} +2 -2
- package/dist/{pending-auth-CxZjizu_.js → pending-auth-YFna7Jtg.js} +2 -2
- package/dist/{profile-8K6D5LHD.js → profile-JxMky6PH.js} +4 -4
- package/dist/{prompt-C1IA4qkj.js → prompt-kRlibHYT.js} +1 -1
- package/dist/{registry-DUa5NdZP.js → registry-BpzPQJAy.js} +1 -1
- package/dist/{resolve-E_-QQ8pM.js → resolve-CygYPkMg.js} +2 -2
- package/dist/{runner-Bf0HnWqY.js → runner-NyIU3zAg.js} +9 -9
- package/dist/{sandbox-egress-signals-BW9FzWoQ.js → sandbox-egress-signals-3UbZEFoN.js} +1 -1
- package/dist/{schema-CwTeb-BF.js → schema-xHUgeh46.js} +1 -1
- package/dist/short-title-CCAI4K8n.js +65 -0
- package/dist/{skills-B1f5Ku_s.js → skills-DqgB34uh.js} +2 -2
- package/dist/{spawn-BsOCLy8T.js → spawn-BUerJdfD.js} +2 -2
- package/dist/{stats-CrITkCy5.js → stats-CAV_taik.js} +5 -5
- package/dist/{store-Det8MQ9g.d.ts → store-DoewL5mG.d.ts} +3 -2
- package/dist/{task-queue-CcqJCAUd.js → task-queue-CcODaB31.js} +3 -3
- package/dist/{task-runner-7IOXx_Uo.js → task-runner-BY358TR3.js} +8 -8
- package/dist/{thread-state-Y3PGLZQa.js → thread-state-DsLsunrt.js} +5 -5
- package/dist/{turn-execution-Bm6Xbaoi.js → turn-execution-CFdT_jiq.js} +3 -3
- package/dist/{turn-lifecycle-Czzk8ila.js → turn-lifecycle-ofsiIkCp.js} +1 -1
- package/dist/{validation-A2SMrAkJ.js → validation-DyZEuf_c.js} +1 -1
- package/dist/{version-CfRx6f_C.js → version-Rvkbcp_Z.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-DN3cJuLB.js → web-authorization-BRFPi8xN.js} +1 -1
- package/dist/{web-input-lJH42B_R.js → web-input-PmIax5-U.js} +4 -4
- package/dist/{work-CRHJu3hb.js → work-xudMvrk2.js} +9 -9
- package/dist/{worker-D6oTNemM.js → worker-EwmMphqi.js} +5 -5
- package/migrations/0042_conversation_metrics.sql +26 -0
- package/migrations/meta/0042_snapshot.json +3610 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +5 -5
- package/dist/usage-DHJ3ng2s.js +0 -166
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { N as getMcpProviderErrorAttributes, X as createUserTokenStore, a as deleteMcpAuthSession, d as putMcpStoredOAuthCredentials, h as resolvePluginOAuthAccount, i as finalizeMcpAuthorization, l as getMcpAuthSession, u as getMcpStoredOAuthCredentials, y as lookupSlackUserProfile } from "./agent-
|
|
2
|
-
import { m as escapeXml } from "./client-
|
|
3
|
-
import { L as toOptionalString, S as withLogContext, d as logInfo, f as logWarn, m as runBestEffort, u as logException, y as setTags } from "./logging-
|
|
4
|
-
import { a as getChatConfig, h as normalizeSlackEmojiName, n as botConfig, o as getRuntimeMetadata } from "./config-
|
|
1
|
+
import { N as getMcpProviderErrorAttributes, X as createUserTokenStore, a as deleteMcpAuthSession, d as putMcpStoredOAuthCredentials, h as resolvePluginOAuthAccount, i as finalizeMcpAuthorization, l as getMcpAuthSession, u as getMcpStoredOAuthCredentials, y as lookupSlackUserProfile } from "./agent-I74ocTD9.js";
|
|
2
|
+
import { m as escapeXml } from "./client-HV5MI31k.js";
|
|
3
|
+
import { L as toOptionalString, S as withLogContext, d as logInfo, f as logWarn, m as runBestEffort, u as logException, y as setTags } from "./logging-BBIO8nx4.js";
|
|
4
|
+
import { a as getChatConfig, h as normalizeSlackEmojiName, n as botConfig, o as getRuntimeMetadata } from "./config-DFAtlLoY.js";
|
|
5
5
|
import { n as defaultModelId } from "./model-profile-CZmVoGdX.js";
|
|
6
6
|
import { _ as parseSlackMessageTs, g as parseSlackUserId, l as isUserActor, s as createSlackResumeActor } from "./context-Bplcgypl.js";
|
|
7
|
-
import { G as isDmChannel, H as getHeaderString, K as normalizeSlackConversationId, Kt as getSqlExecutor, Nt as buildSentryConversationUrl, U as getSlackClient, Wt as getConversationStore,
|
|
7
|
+
import { G as isDmChannel, H as getHeaderString, K as normalizeSlackConversationId, Kt as getSqlExecutor, Nt as buildSentryConversationUrl, U as getSlackClient, Wt as getConversationStore, cn as upsertLinkedIdentity, dn as requireSlackDestination, mt as getDashboardConversationLink, o as getPluginSlackConversationLink, sn as upsertIdentity, z as SlackActionError } from "./agent-hooks-CdRPMAIE.js";
|
|
8
8
|
import { i as homeDir } from "./package-discovery-7a9YqLhE.js";
|
|
9
|
-
import { l as hasRequiredOAuthScope, n as buildOAuthTokenRequest, r as parseOAuthTokenResponse } from "./registry-
|
|
10
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
11
|
-
import { t as discoverSkills } from "./skills-
|
|
12
|
-
import { B as recordAuthenticationLinked, F as loadProjection, V as recordAuthorizationCompleted, Y as hydrateConversationMessages, ct as recordDeliveredAssistantMessage, d as persistWithRetry, i as abandonTurnRecord, j as commitAcceptedReply, lt as turnHasReply, m as buildTurnErrorResponse, n as loadTurnCheckpoint, o as failTurnRecord, ot as markConversationMessage, r as saveTurnCheckpoint, s as getTurnRecord, tt as buildConversationContext, u as recordTurnSummary } from "./checkpoint-
|
|
13
|
-
import { E as acquireActiveLock, w as getStateAdapter } from "./profile-
|
|
14
|
-
import { Pt as requestConversationWork, c as parseSlackThreadId, d as resolveSlackChannelIdFromThreadId, l as readSlackRawMessageContext, u as resolveSlackChannelIdFromMessage, wt as ensureConversationWake } from "./stats-
|
|
15
|
-
import { a as isPendingAuthLatestRequest, f as CooperativeTurnYieldError, g as isCooperativeTurnYieldError, i as getConversationPendingAuth, r as clearPendingAuth, s as getAssistantReplyText, x as markTurnFailed } from "./pending-auth-
|
|
16
|
-
import { a as parseOAuthStatePayload, c as escapeSlackMrkdwnText, d as normalizeSlackStatusText, f as truncateStatusText, g as removeReactionFromMessage, h as postSlackMessage, i as formatProviderLabel, l as formatSlackLink, o as resolveBaseUrl, p as addReactionToMessage, u as normalizeSlackReplyMarkdown, v as RetryableDeliveryError } from "./agent-runner-
|
|
9
|
+
import { l as hasRequiredOAuthScope, n as buildOAuthTokenRequest, r as parseOAuthTokenResponse } from "./registry-BpzPQJAy.js";
|
|
10
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-nNOUcF0O.js";
|
|
11
|
+
import { t as discoverSkills } from "./skills-DqgB34uh.js";
|
|
12
|
+
import { B as recordAuthenticationLinked, F as loadProjection, V as recordAuthorizationCompleted, Y as hydrateConversationMessages, ct as recordDeliveredAssistantMessage, d as persistWithRetry, i as abandonTurnRecord, j as commitAcceptedReply, lt as turnHasReply, m as buildTurnErrorResponse, n as loadTurnCheckpoint, o as failTurnRecord, ot as markConversationMessage, r as saveTurnCheckpoint, s as getTurnRecord, tt as buildConversationContext, u as recordTurnSummary } from "./checkpoint-BBfOHMai.js";
|
|
13
|
+
import { E as acquireActiveLock, w as getStateAdapter } from "./profile-JxMky6PH.js";
|
|
14
|
+
import { Pt as requestConversationWork, c as parseSlackThreadId, d as resolveSlackChannelIdFromThreadId, l as readSlackRawMessageContext, u as resolveSlackChannelIdFromMessage, wt as ensureConversationWake } from "./stats-CAV_taik.js";
|
|
15
|
+
import { a as isPendingAuthLatestRequest, f as CooperativeTurnYieldError, g as isCooperativeTurnYieldError, i as getConversationPendingAuth, r as clearPendingAuth, s as getAssistantReplyText, x as markTurnFailed } from "./pending-auth-YFna7Jtg.js";
|
|
16
|
+
import { a as parseOAuthStatePayload, c as escapeSlackMrkdwnText, d as normalizeSlackStatusText, f as truncateStatusText, g as removeReactionFromMessage, h as postSlackMessage, i as formatProviderLabel, l as formatSlackLink, o as resolveBaseUrl, p as addReactionToMessage, u as normalizeSlackReplyMarkdown, v as RetryableDeliveryError } from "./agent-runner-B81eojZx.js";
|
|
17
17
|
import { t as getVercelConversationWorkQueue } from "./vercel-queue-DIkVcfK4.js";
|
|
18
|
-
import { a as getTurnRequestDeadline } from "./job-queue-
|
|
19
|
-
import { i as resolveTurnSessionRouting, n as scheduleSessionCompletedPluginTasks } from "./task-runner-
|
|
20
|
-
import { n as getTurnLifecycle } from "./turn-lifecycle-
|
|
21
|
-
import { n as executeTurn, t as AgentRunError } from "./turn-execution-
|
|
22
|
-
import { c as configValueSchema, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-
|
|
23
|
-
import { a as requireTurnFailureEventId, c as getTurnUserMessageId, d as buildDeliveredTurnStatePatch, l as getTurnUserReplyAttachmentContext, n as persistAuthPauseTurnState, o as getInterruptionMarker, r as finalizeFailedTurnReplyWithEvent, s as getTurnUserMessage, u as getTurnUserSlackMessageTs } from "./auth-pause-state-
|
|
18
|
+
import { a as getTurnRequestDeadline } from "./job-queue-CEKc-Fos.js";
|
|
19
|
+
import { i as resolveTurnSessionRouting, n as scheduleSessionCompletedPluginTasks } from "./task-runner-BY358TR3.js";
|
|
20
|
+
import { n as getTurnLifecycle } from "./turn-lifecycle-ofsiIkCp.js";
|
|
21
|
+
import { n as executeTurn, t as AgentRunError } from "./turn-execution-CFdT_jiq.js";
|
|
22
|
+
import { c as configValueSchema, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-DsLsunrt.js";
|
|
23
|
+
import { a as requireTurnFailureEventId, c as getTurnUserMessageId, d as buildDeliveredTurnStatePatch, l as getTurnUserReplyAttachmentContext, n as persistAuthPauseTurnState, o as getInterruptionMarker, r as finalizeFailedTurnReplyWithEvent, s as getTurnUserMessage, u as getTurnUserSlackMessageTs } from "./auth-pause-state-BeY0ljFA.js";
|
|
24
24
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-CdCnu80W.js";
|
|
25
|
-
import { n as deleteWebAuthorization } from "./web-authorization-
|
|
25
|
+
import { n as deleteWebAuthorization } from "./web-authorization-BRFPi8xN.js";
|
|
26
26
|
import path from "node:path";
|
|
27
27
|
import { z } from "zod";
|
|
28
28
|
import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { f as logWarn } from "./logging-
|
|
2
|
-
import { Gt as getDb } from "./agent-hooks-
|
|
3
|
-
import {
|
|
4
|
-
import { n as agentTurnCostUsd, r as agentTurnTotalTokens } from "./usage-DHJ3ng2s.js";
|
|
1
|
+
import { f as logWarn } from "./logging-BBIO8nx4.js";
|
|
2
|
+
import { Gt as getDb, nn as agentTurnTotalTokens, tn as agentTurnCostUsd } from "./agent-hooks-CdRPMAIE.js";
|
|
3
|
+
import { E as juniorConversations, s as juniorAutomationExecutions } from "./executor-BTrFBTlg.js";
|
|
5
4
|
import { and, asc, count, desc, eq, gte, inArray, lte, max, or, sql } from "drizzle-orm";
|
|
6
5
|
//#region src/api/conversations/aggregate.ts
|
|
7
6
|
function usageTokenValue(source, field) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as startSpanManual } from "./sentry-CgWZM_kV.js";
|
|
2
|
-
import "./config-
|
|
2
|
+
import "./config-DFAtlLoY.js";
|
|
3
3
|
import { n as juniorDestinations, r as timestamptz } from "./destinations-BeBiJeEM.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { getTableColumns, sql } from "drizzle-orm";
|
|
@@ -249,6 +249,42 @@ const juniorConversationEvents = pgTable("junior_conversation_events", {
|
|
|
249
249
|
uniqueIndex("junior_conversation_events_idempotency_idx").on(table.conversationId, table.idempotencyKey)
|
|
250
250
|
]);
|
|
251
251
|
//#endregion
|
|
252
|
+
//#region src/db/schema/conversation-metrics.ts
|
|
253
|
+
const CONVERSATION_METRICS = [
|
|
254
|
+
"duration_ms",
|
|
255
|
+
"total_tokens",
|
|
256
|
+
"input_tokens",
|
|
257
|
+
"output_tokens",
|
|
258
|
+
"cached_input_tokens",
|
|
259
|
+
"cache_creation_tokens",
|
|
260
|
+
"reasoning_tokens",
|
|
261
|
+
"cost_usd"
|
|
262
|
+
];
|
|
263
|
+
/** One metric value for one Conversation Run. */
|
|
264
|
+
const juniorConversationMetrics = pgTable("junior_conversation_metrics", {
|
|
265
|
+
conversationId: text("conversation_id").notNull(),
|
|
266
|
+
runId: text("run_id").notNull(),
|
|
267
|
+
metric: text("metric").$type().notNull(),
|
|
268
|
+
value: doublePrecision("value").notNull(),
|
|
269
|
+
occurredAt: timestamptz("occurred_at").notNull(),
|
|
270
|
+
updatedAt: timestamptz("updated_at").notNull()
|
|
271
|
+
}, (table) => [
|
|
272
|
+
primaryKey({
|
|
273
|
+
name: "junior_conversation_metrics_conversation_id_run_id_metric_pk",
|
|
274
|
+
columns: [
|
|
275
|
+
table.conversationId,
|
|
276
|
+
table.runId,
|
|
277
|
+
table.metric
|
|
278
|
+
]
|
|
279
|
+
}),
|
|
280
|
+
foreignKey({
|
|
281
|
+
name: "junior_conversation_metrics_conversation_id_junior_conversations_conversation_id_fk",
|
|
282
|
+
columns: [table.conversationId],
|
|
283
|
+
foreignColumns: [juniorConversations.conversationId]
|
|
284
|
+
}),
|
|
285
|
+
index("junior_conversation_metrics_occurred_at_metric_idx").on(table.occurredAt, table.metric)
|
|
286
|
+
]);
|
|
287
|
+
//#endregion
|
|
252
288
|
//#region src/db/schema/conversation-briefs.ts
|
|
253
289
|
/** Append-only Brief versions produced for completed Conversation turns. */
|
|
254
290
|
const juniorConversationBriefs = pgTable("junior_conversation_briefs", {
|
|
@@ -516,6 +552,7 @@ const juniorSqlSchema = {
|
|
|
516
552
|
juniorAgentBindings,
|
|
517
553
|
juniorAgentInvocations,
|
|
518
554
|
juniorConversationEvents,
|
|
555
|
+
juniorConversationMetrics,
|
|
519
556
|
juniorConversationBriefs,
|
|
520
557
|
juniorConversationBindings,
|
|
521
558
|
juniorConversationParticipants,
|
|
@@ -1031,4 +1068,4 @@ function createJuniorSqlExecutor(args) {
|
|
|
1031
1068
|
});
|
|
1032
1069
|
}
|
|
1033
1070
|
//#endregion
|
|
1034
|
-
export {
|
|
1071
|
+
export { juniorCodeRepositories as C, juniorIdentities as D, juniorConversations as E, juniorUsers as O, juniorCodeChanges as S, conversationReadColumns as T, CONVERSATION_METRICS as _, juniorSchedulerRuns as a, juniorApiTokens as b, juniorStats as c, AGENT_INVOCATION_MAILBOX_STATUSES as d, juniorAgentBindings as f, juniorConversationBriefs as g, juniorConversationBindings as h, juniorWorkspaces as i, juniorArtifacts as k, juniorEventAutomations as l, juniorConversationParticipants as m, juniorSnapshots as n, juniorSchedulerTasks as o, juniorAgentInvocations as p, juniorWorkspaceRepos as r, juniorAutomationExecutions as s, createJuniorSqlExecutor as t, juniorLocationConfigurations as u, juniorConversationMetrics as v, juniorAttachments as w, juniorConversationAnnotations as x, juniorConversationEvents as y };
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as getDeploymentServiceVersion, N as getDeploymentTelemetryAttributes } from "./logging-
|
|
1
|
+
import { M as getDeploymentServiceVersion, N as getDeploymentTelemetryAttributes } from "./logging-BBIO8nx4.js";
|
|
2
2
|
import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-CgWZM_kV.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-cpqWNIJp.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-BLvBjy_e.js";
|
|
5
5
|
//#region src/chat/sentry-payload-filter.ts
|
|
6
6
|
const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getChatConfig } from "./config-
|
|
1
|
+
import { a as getChatConfig } from "./config-DFAtlLoY.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
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { z } from "zod";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException, y as withScope } from "./sentry-CgWZM_kV.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-Rvkbcp_Z.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { styleText } from "node:util";
|
|
5
5
|
import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { n as JuniorDashboardOptions } from "./app-D4nNdzPG.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-BI9A1vKA.js";
|
|
3
3
|
//#region src/nitro.d.ts
|
|
4
4
|
export type JuniorNitroDashboardOptions = JuniorDashboardOptions;
|
package/dist/nitro.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, D as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, E as JUNIOR_HEARTBEAT_ROUTE, O as JUNIOR_RETENTION_CRON_SCHEDULE, T as JUNIOR_HEARTBEAT_CRON_SCHEDULE, k as JUNIOR_RETENTION_ROUTE, w as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, D as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, E as JUNIOR_HEARTBEAT_ROUTE, O as JUNIOR_RETENTION_CRON_SCHEDULE, T as JUNIOR_HEARTBEAT_CRON_SCHEDULE, k as JUNIOR_RETENTION_ROUTE, w as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "./logging-BBIO8nx4.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-7a9YqLhE.js";
|
|
3
3
|
import { n as resolveConversationWorkQueueTopic } from "./vercel-queue-DIkVcfK4.js";
|
|
4
|
-
import { t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-
|
|
4
|
+
import { t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-CEKc-Fos.js";
|
|
5
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-egKWjgue.js";
|
|
6
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
6
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-CcODaB31.js";
|
|
7
7
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-BKGOXca2.js";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { X as createUserTokenStore } from "./agent-
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync
|
|
1
|
+
import { X as createUserTokenStore } from "./agent-I74ocTD9.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync--5BV3QNF.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
//#region src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as extractAssistantText, i as abandonTurnRecord } from "./checkpoint-
|
|
2
|
-
import { qt as buildDeterministicTurnId } from "./stats-
|
|
1
|
+
import { g as extractAssistantText, i as abandonTurnRecord } from "./checkpoint-BBfOHMai.js";
|
|
2
|
+
import { qt as buildDeterministicTurnId } from "./stats-CAV_taik.js";
|
|
3
3
|
//#region src/chat/runtime/turn.ts
|
|
4
4
|
/** Classified Slack turn failure carrying the owning Sentry capture outward. */
|
|
5
5
|
var ConversationTurnBoundaryError = class extends Error {
|
|
@@ -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-HV5MI31k.js";
|
|
2
|
+
import { _ as setSpanAttributes, v as setSpanStatus } from "./logging-BBIO8nx4.js";
|
|
3
|
+
import { a as getChatConfig } from "./config-DFAtlLoY.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-nNOUcF0O.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { createMemoryState } from "@chat-adapter/state-memory";
|
|
7
7
|
import { createRedisState } from "@chat-adapter/state-redis";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as conversationBriefSchema, N as parseBriefInput, j as briefOutcomeStatusSchema } from "./conversation-
|
|
1
|
+
import { M as conversationBriefSchema, N as parseBriefInput, j as briefOutcomeStatusSchema } from "./conversation-CRWntH-A.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/chat/briefs/generate.ts
|
|
4
4
|
const MAX_INPUT_CHARS = 6e4;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as setSpanAttributes, d as logInfo, f as logWarn } from "./logging-
|
|
1
|
+
import { _ as setSpanAttributes, d as logInfo, f as logWarn } from "./logging-BBIO8nx4.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-BBIO8nx4.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-JxMky6PH.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-I74ocTD9.js";
|
|
2
|
+
import { S as withLogContext, u as logException, y as setTags } from "./logging-BBIO8nx4.js";
|
|
3
3
|
import { t as credentialContextForActor } from "./context-Bplcgypl.js";
|
|
4
|
-
import { Ht as getConversationEventStore, Wt as getConversationStore } from "./agent-hooks-
|
|
5
|
-
import { F as loadProjection, V as recordAuthorizationCompleted, X as persistConversationMessages, Y as hydrateConversationMessages, ct as recordDeliveredAssistantMessage, d as persistWithRetry, j as commitAcceptedReply, ot as markConversationMessage, r as saveTurnCheckpoint, st as normalizeConversationText, tt as buildConversationContext, ut as upsertConversationMessage } 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-CdRPMAIE.js";
|
|
5
|
+
import { F as loadProjection, V as recordAuthorizationCompleted, X as persistConversationMessages, Y as hydrateConversationMessages, ct as recordDeliveredAssistantMessage, d as persistWithRetry, j as commitAcceptedReply, ot as markConversationMessage, r as saveTurnCheckpoint, st as normalizeConversationText, tt as buildConversationContext, ut as upsertConversationMessage } from "./checkpoint-BBfOHMai.js";
|
|
6
|
+
import { S as startActiveTurn, s as getAssistantReplyText, x as markTurnFailed } from "./pending-auth-YFna7Jtg.js";
|
|
7
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-BY358TR3.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-ofsiIkCp.js";
|
|
9
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DsLsunrt.js";
|
|
10
|
+
import { d as buildDeliveredTurnStatePatch, r as finalizeFailedTurnReplyWithEvent, t as completeAuthPauseTurn } from "./auth-pause-state-BeY0ljFA.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 { Y as sandboxEgressSignalsResponseSchema } from "./agent-
|
|
1
|
+
import { Y as sandboxEgressSignalsResponseSchema } from "./agent-I74ocTD9.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 juniorDestinationKindSchema } from "./destinations-BeBiJeEM.js";
|
|
2
|
-
import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-
|
|
2
|
+
import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-CRWntH-A.js";
|
|
3
3
|
import "./reporting-schema-DosTN__Q.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { codeChangeStateSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { f as logWarn } from "./logging-BBIO8nx4.js";
|
|
2
|
+
import { n as botConfig } from "./config-DFAtlLoY.js";
|
|
3
|
+
const TITLE_PROMPTS = {
|
|
4
|
+
conversation: [
|
|
5
|
+
"Generate a concise 5-8 word conversation title from the first user message below.",
|
|
6
|
+
"Capture the user's main request.",
|
|
7
|
+
"Reply with ONLY the title, with no quotes or trailing punctuation."
|
|
8
|
+
],
|
|
9
|
+
task: [
|
|
10
|
+
"Generate a concise 5-8 word task title from the task instruction below.",
|
|
11
|
+
"Capture the task's main purpose.",
|
|
12
|
+
"Reply with ONLY the title, with no quotes or trailing punctuation."
|
|
13
|
+
]
|
|
14
|
+
};
|
|
15
|
+
/** Collapse whitespace and cap a candidate short title. */
|
|
16
|
+
function normalizeShortTitle(value) {
|
|
17
|
+
return value.replace(/\s+/g, " ").trim().slice(0, 60);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Deterministic display title when no generated title is stored.
|
|
21
|
+
* Uses the first non-empty line of the source text, capped like generated titles.
|
|
22
|
+
*/
|
|
23
|
+
function fallbackShortTitle(sourceText, fallback = "Untitled") {
|
|
24
|
+
return normalizeShortTitle(sourceText.split(/\r?\n/).map((line) => line.trim()).find((line) => line.length > 0) ?? "") || fallback;
|
|
25
|
+
}
|
|
26
|
+
/** Generate a short title with the fast model, or return undefined on failure. */
|
|
27
|
+
async function generateShortTitle(args) {
|
|
28
|
+
const sourceText = args.sourceText.trim();
|
|
29
|
+
if (!sourceText) return void 0;
|
|
30
|
+
try {
|
|
31
|
+
return normalizeShortTitle((await args.completeText({
|
|
32
|
+
modelId: botConfig.fastModelId,
|
|
33
|
+
temperature: 0,
|
|
34
|
+
promptName: `junior.${args.kind}_title`,
|
|
35
|
+
messages: [{
|
|
36
|
+
role: "user",
|
|
37
|
+
content: [
|
|
38
|
+
...TITLE_PROMPTS[args.kind],
|
|
39
|
+
"",
|
|
40
|
+
args.kind === "conversation" ? `First user message: ${sourceText.slice(0, 500)}` : `Task instruction: ${sourceText.slice(0, 500)}`
|
|
41
|
+
].join("\n"),
|
|
42
|
+
timestamp: Date.now()
|
|
43
|
+
}],
|
|
44
|
+
metadata: { modelId: botConfig.fastModelId }
|
|
45
|
+
})).text) || void 0;
|
|
46
|
+
} catch (error) {
|
|
47
|
+
logWarn(`${args.kind}.title.generation.failed`, { "exception.message": error instanceof Error ? error.message : String(error) });
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Prefer an explicit task title when provided; otherwise generate one from the
|
|
53
|
+
* instruction with the fast model.
|
|
54
|
+
*/
|
|
55
|
+
async function resolveTaskTitle(args) {
|
|
56
|
+
const explicit = normalizeShortTitle(args.title ?? "");
|
|
57
|
+
if (explicit) return explicit;
|
|
58
|
+
return generateShortTitle({
|
|
59
|
+
completeText: args.completeText,
|
|
60
|
+
kind: "task",
|
|
61
|
+
sourceText: args.instruction
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { generateShortTitle as n, resolveTaskTitle as r, fallbackShortTitle as t };
|
|
@@ -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-BBIO8nx4.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-nNOUcF0O.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-B81eojZx.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-xudMvrk2.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,10 +1,10 @@
|
|
|
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-BBIO8nx4.js";
|
|
2
|
+
import { a as getChatConfig } from "./config-DFAtlLoY.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,
|
|
4
|
+
import { Gt as getDb, J as withSlackRetries, U as getSlackClient, Wt as getConversationStore, fn as sameDestination, pt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, un as parseDestination } from "./agent-hooks-CdRPMAIE.js";
|
|
5
5
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
6
|
-
import {
|
|
7
|
-
import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-
|
|
6
|
+
import { E as juniorConversations, a as juniorSchedulerRuns, c as juniorStats, l as juniorEventAutomations, o as juniorSchedulerTasks, w as juniorAttachments } from "./executor-BTrFBTlg.js";
|
|
7
|
+
import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-JxMky6PH.js";
|
|
8
8
|
import "./vercel-queue-DIkVcfK4.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -178,12 +178,13 @@ interface ConversationStore {
|
|
|
178
178
|
visibility?: ConversationPrivacy;
|
|
179
179
|
}): Promise<void>;
|
|
180
180
|
/**
|
|
181
|
-
*
|
|
182
|
-
*
|
|
181
|
+
* Store execution state and one Run's metrics.
|
|
182
|
+
* Conversation metric fields cache totals for existing readers.
|
|
183
183
|
*/
|
|
184
184
|
recordExecution(args: {
|
|
185
185
|
channelName?: string;
|
|
186
186
|
conversationId: string;
|
|
187
|
+
/** When this Run started. */
|
|
187
188
|
createdAtMs: number;
|
|
188
189
|
destination?: Destination;
|
|
189
190
|
execution: ConversationExecution;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as logWarn } from "./logging-
|
|
1
|
+
import { f as logWarn } from "./logging-BBIO8nx4.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-CEKc-Fos.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-BY358TR3.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-
|
|
4
|
-
import {
|
|
5
|
-
import { E as normalizeToolNameFromResult, O as stripRuntimeTurnContext, T as isToolResultMessage, Y as hydrateConversationMessages, _ as getPiMessageRole, s as getTurnRecord, w as isToolResultError, x 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-
|
|
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-CdRPMAIE.js";
|
|
4
|
+
import { G as sameActorIdentity } from "./conversation-CRWntH-A.js";
|
|
5
|
+
import { E as normalizeToolNameFromResult, O as stripRuntimeTurnContext, T as isToolResultMessage, Y as hydrateConversationMessages, _ as getPiMessageRole, s as getTurnRecord, w as isToolResultError, x as instructionTextForProjection } from "./checkpoint-BBfOHMai.js";
|
|
6
|
+
import { w as getStateAdapter } from "./profile-JxMky6PH.js";
|
|
7
|
+
import { u as recordAutomationExecution } from "./execution-stats-BjUUUOM8.js";
|
|
8
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DsLsunrt.js";
|
|
9
|
+
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-CcODaB31.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-CdRPMAIE.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-BBIO8nx4.js";
|
|
2
|
+
import { Gt as getDb, pt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-CdRPMAIE.js";
|
|
3
3
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
4
|
-
import { u as juniorLocationConfigurations } from "./executor-
|
|
5
|
-
import { X as persistConversationMessages } from "./checkpoint-
|
|
6
|
-
import { w as getStateAdapter } from "./profile-
|
|
4
|
+
import { u as juniorLocationConfigurations } from "./executor-BTrFBTlg.js";
|
|
5
|
+
import { X as persistConversationMessages } from "./checkpoint-BBfOHMai.js";
|
|
6
|
+
import { w as getStateAdapter } from "./profile-JxMky6PH.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-CdRPMAIE.js";
|
|
2
|
+
import { n as runAgentWithTimeout } from "./agent-runner-B81eojZx.js";
|
|
3
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-ofsiIkCp.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-CdRPMAIE.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
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-nNOUcF0O.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-Rvkbcp_Z.js";
|
|
2
2
|
export { JUNIOR_VERSION };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as getStateAdapter } from "./profile-
|
|
1
|
+
import { w as getStateAdapter } from "./profile-JxMky6PH.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-BBIO8nx4.js";
|
|
2
|
+
import { s as getSlackBotToken } from "./config-DFAtlLoY.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-CdRPMAIE.js";
|
|
5
|
+
import { c as parseSlackThreadId, ft as appendAndEnqueueExclusiveInboundMessage, pt as appendAndEnqueueInboundMessage, qt as buildDeterministicTurnId } from "./stats-CAV_taik.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 { $ as AuthorizationFlowDisabledError, A as createAgentInvocationSchema, M as AgentInvocationLimitError, O as agentBindingSchema, f as PluginCredentialFailureError, j as AgentInvocationBusyError, k as agentInvocationSchema } from "./agent-
|
|
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 { L as openConversationProjection, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord, v 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-I74ocTD9.js";
|
|
3
|
+
import { Ht as getConversationEventStore, Kt as getSqlExecutor, Wt as getConversationStore } from "./agent-hooks-CdRPMAIE.js";
|
|
4
|
+
import { f as juniorAgentBindings, p as juniorAgentInvocations } from "./executor-BTrFBTlg.js";
|
|
5
|
+
import { L as openConversationProjection, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord, v as getTerminalAssistantMessages } from "./checkpoint-BBfOHMai.js";
|
|
6
|
+
import { pt as appendAndEnqueueInboundMessage } from "./stats-CAV_taik.js";
|
|
7
|
+
import { _ as isTurnInputCommitLostError, h as getConversationTurnBoundaryError, p as TurnInputCommitLostError, s as getAssistantReplyText } from "./pending-auth-YFna7Jtg.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-ofsiIkCp.js";
|
|
9
|
+
import { n as executeTurn, t as AgentRunError } from "./turn-execution-CFdT_jiq.js";
|
|
10
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-DsLsunrt.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-HV5MI31k.js";
|
|
3
|
+
import { S as withLogContext, d as logInfo, f as logWarn, u as logException } from "./logging-BBIO8nx4.js";
|
|
4
|
+
import { a as getChatConfig } from "./config-DFAtlLoY.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-CAV_taik.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-CEKc-Fos.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,
|