@sentry/junior 0.260.0 → 0.262.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-Dj5BTJRd.js → adapter-t-Y9RHML.js} +2 -2
- package/dist/{admin-tzkZDqrH.js → admin-BCqeFndQ.js} +1 -1
- package/dist/{agent-hooks-V4Hfc2tB.js → agent-hooks-9q2zdKHL.js} +73 -20
- package/dist/{agent-invocations-Qfz7dWgU.js → agent-invocations-CxKldAeB.js} +1 -0
- package/dist/{agent-runner-DvTUyGTY.js → agent-runner-Cx6NO5LE.js} +115 -37
- package/dist/api/schema.js +1 -1
- package/dist/api.js +42 -41
- package/dist/{app-BsBUs3rF.d.ts → app-Bo0kB987.d.ts} +6 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +59 -63
- package/dist/{assistant-reply-CEOMzsWy.js → assistant-reply-B2qUBAwL.js} +1 -1
- package/dist/{briefs-BSCkyYqs.js → briefs-DsGH2Vym.js} +2 -2
- package/dist/{catalog-runtime-Bpcs2b2L.js → catalog-runtime-CfwKT0sn.js} +1 -1
- package/dist/cli/chat.js +15 -17
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +1 -1
- 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-JeyzRwsT.js → client-DpfjZgNk.js} +2 -2
- package/dist/{config-ULs6Zl9b.js → config-BiCtNiu5.js} +2 -2
- package/dist/{connections-CZ7HhEmN.js → connections-D9IKbfk-.js} +10 -10
- package/dist/{conversation-privacy-BQSlZXgV.js → conversation-privacy-CBUI0frD.js} +1 -1
- package/dist/{credential-sync-BKcv5rBe.js → credential-sync-Bu6ZOuOk.js} +14 -14
- package/dist/{executor-BoGNVEDn.js → executor-O8xqLDN6.js} +4 -3
- package/dist/{images-BBmDXQCB.js → images-AM1exvU0.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-CbdVyaCo.js → job-queue-DmarAQGI.js} +1 -1
- package/dist/{logging-DSMmkHXG.js → logging-dZN1Bvtu.js} +1 -1
- package/dist/{message-zaj5gBbS.js → message-C_g2S8kv.js} +3 -3
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-yYFG8Own.js → oauth-callback-server-DvvOvr4q.js} +2 -2
- package/dist/{profile-ByWkAY7L.js → profile-BP2N5uDY.js} +13 -6
- package/dist/{registry-BL-osYWN.js → registry-BUje_knT.js} +1 -1
- package/dist/{resolve-HuPG2VMB.js → resolve-DftZiYNU.js} +4 -4
- package/dist/{result-DS7V4a3-.js → result-CRMRT9CE.js} +16 -11
- package/dist/{runner-Cba_OfGl.js → runner-4mmL2Pt1.js} +10 -10
- package/dist/{sandbox-egress-signals-C7NcPzea.js → sandbox-egress-signals-1ysv0z5A.js} +1 -1
- package/dist/{schema-OzL8Zw4H.js → schema-XuTZukI9.js} +1 -1
- package/dist/{service-account-DqwHhwJA.js → service-account-B1sH3P7d.js} +3 -3
- package/dist/{service-account-Ko1Xs--F.js → service-account-Del2I_x3.js} +3 -3
- package/dist/{session-stop-HfKx-pky.js → session-stop-ZuyOHxdK.js} +11 -11
- package/dist/{skills-D6_bcAuW.js → skills-lPeepA2b.js} +2 -2
- package/dist/{spawn-BWqK6EwM.js → spawn-DovpdlrW.js} +3 -2
- package/dist/{store-DzRbd5VT.js → store-dZynGGFW.js} +6 -6
- package/dist/{task-queue-9LICOzcL.js → task-queue-CmMCtzHO.js} +3 -3
- package/dist/{task-runner-DGnd_B5X.js → task-runner-BRgJ5e0s.js} +19 -11
- package/dist/{tasks-CjrS098O.js → tasks-Bh2qYaed.js} +45 -28
- package/dist/{thread-state-CqkYowEz.js → thread-state-DA37FsAT.js} +5 -5
- package/dist/{turn-failure-response-BkKmGqFt.js → turn-failure-response-BLcscQ-f.js} +7 -7
- package/dist/{turn-lifecycle-DYv8IV6w.js → turn-lifecycle-D0e887FM.js} +1 -1
- package/dist/{turn-session-routing-TaVhKmdz.js → turn-session-routing-DdbSbJS6.js} +1 -1
- package/dist/{validation-BrXMYPyo.js → validation-DtcovXqq.js} +1 -1
- package/dist/{version-Ct049vav.js → version-JcDaJ75p.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-C-J0ewlH.js → viewer-oMTUVAcR.js} +4 -4
- package/dist/{web-input-C_xB3RXp.js → web-input-FQ5wgqYn.js} +26 -26
- package/dist/{work-D829Ue7k.js → work-BiIKfayl.js} +40 -10
- package/dist/{worker-BRTYzlpk.js → worker-BZ7l75NM.js} +5 -5
- package/migrations/0062_plugin_report_index.sql +20 -0
- package/migrations/0063_agent_invocation_type.sql +1 -0
- package/migrations/meta/0062_snapshot.json +3499 -0
- package/migrations/meta/0063_snapshot.json +3505 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +10 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
2
|
-
import { t as disconnectStateAdapter } from "../adapter-
|
|
3
|
-
import { t as create } from "../profile-
|
|
4
|
-
import { r as resolve } from "../resolve-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-CfwKT0sn.js";
|
|
2
|
+
import { t as disconnectStateAdapter } from "../adapter-t-Y9RHML.js";
|
|
3
|
+
import { t as create } from "../profile-BP2N5uDY.js";
|
|
4
|
+
import { r as resolve } from "../resolve-DftZiYNU.js";
|
|
5
5
|
// src/cli/snapshot-create.ts
|
|
6
6
|
const DEFAULT_RUNTIME = "node22";
|
|
7
7
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as getChatConfig } from "../config-
|
|
2
|
-
import { t as createJuniorSqlExecutor } from "../executor-
|
|
3
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
1
|
+
import { i as getChatConfig } from "../config-BiCtNiu5.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-O8xqLDN6.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-BUje_knT.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-DOm9Y6qI.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as withSpan, _ as serializeGenAiAttribute, f as logException, h as normalizeGenAiFinishReason, i as extractGenAiUsageAttributes, m as logWarn } from "./logging-
|
|
2
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
1
|
+
import { T as withSpan, _ as serializeGenAiAttribute, f as logException, h as normalizeGenAiFinishReason, i as extractGenAiUsageAttributes, m as logWarn } from "./logging-dZN1Bvtu.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-CBUI0frD.js";
|
|
3
3
|
import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
|
|
4
4
|
import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
|
|
5
5
|
import { createGatewayProvider } from "@ai-sdk/gateway";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { C as toOptionalTrimmed, s as resolveGatewayModel } from "./client-
|
|
3
|
-
import { m as logWarn } from "./logging-
|
|
2
|
+
import { C as toOptionalTrimmed, s as resolveGatewayModel } from "./client-DpfjZgNk.js";
|
|
3
|
+
import { m as logWarn } from "./logging-dZN1Bvtu.js";
|
|
4
4
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema, t as DEFAULT_MODEL_PROFILES, u as parseTurnReasoningLevel } from "./model-profile-Bg8EoCKD.js";
|
|
5
5
|
// src/chat/slack/emoji.ts
|
|
6
6
|
const SLACK_EMOJI_NAME_RE = /^(?:[a-z0-9_+-]+)(?:::(?:skin-tone-[2-6]))?$/;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { A as deleteProviderIdentityForUser, c as getConversationEventStore, f as getSqlExecutor, k as deleteProviderIdentityForSlackUser } from "./viewer-
|
|
4
|
-
import { u as hasRequiredOAuthScope } from "./registry-
|
|
5
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
6
|
-
import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-
|
|
7
|
-
import { r as getStateAdapter } from "./adapter-
|
|
8
|
-
import { a as getVercelConversationWorkQueue } from "./job-queue-
|
|
9
|
-
import { m as ensureConversationWake, w as requestConversationWork } from "./store-
|
|
10
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-
|
|
1
|
+
import { In as startOAuthFlow, Nt as failTurnRecord, Pt as getTurnRecord, kt as loadTurnCheckpoint } from "./tasks-Bh2qYaed.js";
|
|
2
|
+
import { n as botConfig } from "./config-BiCtNiu5.js";
|
|
3
|
+
import { A as deleteProviderIdentityForUser, c as getConversationEventStore, f as getSqlExecutor, k as deleteProviderIdentityForSlackUser } from "./viewer-oMTUVAcR.js";
|
|
4
|
+
import { u as hasRequiredOAuthScope } from "./registry-BUje_knT.js";
|
|
5
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-CfwKT0sn.js";
|
|
6
|
+
import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-Cx6NO5LE.js";
|
|
7
|
+
import { r as getStateAdapter } from "./adapter-t-Y9RHML.js";
|
|
8
|
+
import { a as getVercelConversationWorkQueue } from "./job-queue-DmarAQGI.js";
|
|
9
|
+
import { m as ensureConversationWake, w as requestConversationWork } from "./store-dZynGGFW.js";
|
|
10
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-DdbSbJS6.js";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
13
13
|
// src/chat/task-execution/authorized-turn.ts
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { p as escapeXml } from "./client-
|
|
3
|
-
import { L as isNativeIdentityProvider, f as logException, g as runBestEffort, m as logWarn } from "./logging-
|
|
4
|
-
import { a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
1
|
+
import { Et as getConversationPendingAuth, Fn as resolveBaseUrl, H as recordAuthenticationLinked, Kn as postSlackMessage, Nn as formatProviderLabel, Pn as parseOAuthStatePayload, Pt as getTurnRecord, Qn as resolvePluginOAuthAccount, U as recordAuthorizationCompleted, yn as createUserTokenStore } from "./tasks-Bh2qYaed.js";
|
|
2
|
+
import { p as escapeXml } from "./client-DpfjZgNk.js";
|
|
3
|
+
import { L as isNativeIdentityProvider, f as logException, g as runBestEffort, m as logWarn } from "./logging-dZN1Bvtu.js";
|
|
4
|
+
import { a as getRuntimeMetadata, n as botConfig } from "./config-BiCtNiu5.js";
|
|
5
5
|
import { f as parseSlackUserId } from "./actor-tlxzqaRe.js";
|
|
6
|
-
import { F as upsertIdentity, I as upsertLinkedIdentity, b as identityFromActor, f as getSqlExecutor, j as findUserByVerifiedEmails } from "./viewer-
|
|
6
|
+
import { F as upsertIdentity, I as upsertLinkedIdentity, b as identityFromActor, f as getSqlExecutor, j as findUserByVerifiedEmails } from "./viewer-oMTUVAcR.js";
|
|
7
7
|
import { i as homeDir } from "./package-discovery-DJBompdd.js";
|
|
8
|
-
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
10
|
-
import { t as discoverSkills } from "./skills-
|
|
11
|
-
import { a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, v as lookupSlackUserProfile } from "./agent-runner-
|
|
12
|
-
import { ct as getSlackClient } from "./agent-hooks-
|
|
13
|
-
import { a as acquireActiveLock, r as getStateAdapter } from "./adapter-
|
|
14
|
-
import { _ as getMcpProviderErrorAttributes } from "./service-account-
|
|
15
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
16
|
-
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-BUje_knT.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-CfwKT0sn.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-lPeepA2b.js";
|
|
11
|
+
import { a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, v as lookupSlackUserProfile } from "./agent-runner-Cx6NO5LE.js";
|
|
12
|
+
import { ct as getSlackClient } from "./agent-hooks-9q2zdKHL.js";
|
|
13
|
+
import { a as acquireActiveLock, r as getStateAdapter } from "./adapter-t-Y9RHML.js";
|
|
14
|
+
import { _ as getMcpProviderErrorAttributes } from "./service-account-Del2I_x3.js";
|
|
15
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DA37FsAT.js";
|
|
16
|
+
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-D9IKbfk-.js";
|
|
17
17
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-CTygMkNx.js";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { z } from "zod";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as logException } from "./logging-
|
|
1
|
+
import { f as logException } from "./logging-dZN1Bvtu.js";
|
|
2
2
|
import { g as startSpanManual } from "./sentry-BBUlHih9.js";
|
|
3
|
-
import "./config-
|
|
4
|
-
import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-
|
|
3
|
+
import "./config-BiCtNiu5.js";
|
|
4
|
+
import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { sql } from "drizzle-orm";
|
|
7
7
|
import { bigint, boolean, check, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, uniqueIndex, uuid } from "drizzle-orm/pg-core";
|
|
@@ -154,6 +154,7 @@ const juniorConversationEvents = pgTable("junior_conversation_events", {
|
|
|
154
154
|
}),
|
|
155
155
|
index("junior_conversation_events_history_version_idx").on(table.conversationId, table.historyVersion, table.seq),
|
|
156
156
|
index("junior_conversation_events_type_idx").on(table.conversationId, table.type, table.seq),
|
|
157
|
+
index("junior_conversation_events_plugin_report_idx").on(sql`(${table.payload}->>'namespace')`, sql`(${table.payload}->>'name')`, table.createdAt).where(sql`${table.type} = 'structured_event'`),
|
|
157
158
|
index("junior_conversation_events_actor_identity_idx").on(table.actorIdentityId, table.conversationId, table.seq),
|
|
158
159
|
index("junior_conversation_events_message_search_idx").using("gin", sql`to_tsvector('english', ${table.payload}->>'text')`).where(sql`${table.type} = 'message'`),
|
|
159
160
|
uniqueIndex("junior_conversation_events_idempotency_idx").on(table.conversationId, table.idempotencyKey)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { f as getSqlExecutor } from "./viewer-
|
|
3
|
-
import { S as readLiveAttachment, w as storeAttachment } from "./agent-runner-
|
|
2
|
+
import { f as getSqlExecutor } from "./viewer-oMTUVAcR.js";
|
|
3
|
+
import { S as readLiveAttachment, w as storeAttachment } from "./agent-runner-Cx6NO5LE.js";
|
|
4
4
|
import { H as detectImageMediaType } from "./conversation-CvuKJ3tA.js";
|
|
5
5
|
// src/chat/attachments/images.ts
|
|
6
6
|
var images_exports = /* @__PURE__ */ __exportAll({
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as getDeploymentTelemetryAttributes, P as getDeploymentServiceVersion } from "./logging-
|
|
1
|
+
import { F as getDeploymentTelemetryAttributes, P as getDeploymentServiceVersion } from "./logging-dZN1Bvtu.js";
|
|
2
2
|
import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-BBUlHih9.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-CBUI0frD.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
5
5
|
// src/chat/sentry-payload-filter.ts
|
|
6
6
|
const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
1
|
+
import { i as getChatConfig } from "./config-BiCtNiu5.js";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException, y as withScope } from "./sentry-BBUlHih9.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-JcDaJ75p.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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as enqueueAgentMessageToParent } from "./result-
|
|
4
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
2
|
+
import { Dt as toolInvocationDestination, Et as actorFromRun, X as getActiveAgentInvocationForConversation, Y as findChildAgentConversationId, gt as PARENT_AGENT_TARGET, ht as AgentMessageTargetError, q as createAgentInvocationForMessage } from "./agent-runner-Cx6NO5LE.js";
|
|
3
|
+
import { n as enqueueAgentMessageToParent } from "./result-CRMRT9CE.js";
|
|
4
|
+
import { r as enqueueAgentInvocation } from "./work-BiIKfayl.js";
|
|
5
5
|
// src/chat/agent-invocations/message.ts
|
|
6
6
|
var message_exports = /* @__PURE__ */ __exportAll({ bindMessageAgent: () => bindMessageAgent });
|
|
7
7
|
/**
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { r as JuniorDashboardOptions } from "./app-Bo0kB987.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.js";
|
|
3
3
|
export type JuniorNitroDashboardOptions = JuniorDashboardOptions;
|
|
4
4
|
export interface JuniorPluginModuleReference {
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_RETENTION_CRON_SCHEDULE, D as JUNIOR_HEARTBEAT_CRON_SCHEDULE, E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_ROUTE, j as JUNIOR_RETENTION_ROUTE, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_RETENTION_CRON_SCHEDULE, D as JUNIOR_HEARTBEAT_CRON_SCHEDULE, E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_ROUTE, j as JUNIOR_RETENTION_ROUTE, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE } from "./logging-dZN1Bvtu.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJBompdd.js";
|
|
3
|
-
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-
|
|
3
|
+
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-DmarAQGI.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-DOm9Y6qI.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-CmMCtzHO.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { yn as createUserTokenStore } from "./tasks-Bh2qYaed.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Bu6ZOuOk.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
// src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as toOptionalTrimmed } from "./client-
|
|
2
|
-
import { b as setSpanStatus, y as setSpanAttributes } from "./logging-
|
|
3
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
1
|
+
import { C as toOptionalTrimmed } from "./client-DpfjZgNk.js";
|
|
2
|
+
import { b as setSpanStatus, y as setSpanAttributes } from "./logging-dZN1Bvtu.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-CfwKT0sn.js";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
// src/chat/sandbox/paths.ts
|
|
6
6
|
function normalizeWorkspaceRoot(input) {
|
|
@@ -13,6 +13,13 @@ const SANDBOX_WORKSPACE_ROOT = normalizeWorkspaceRoot(process.env.VERCEL_SANDBOX
|
|
|
13
13
|
const SANDBOX_REPOS_ROOT = `${SANDBOX_WORKSPACE_ROOT}/repos`;
|
|
14
14
|
const SANDBOX_SKILLS_ROOT = `${SANDBOX_WORKSPACE_ROOT}/skills`;
|
|
15
15
|
const SANDBOX_DATA_ROOT = `${SANDBOX_WORKSPACE_ROOT}/data`;
|
|
16
|
+
/**
|
|
17
|
+
* PATH for sandbox commands. Plugin runtime binaries come last so they never
|
|
18
|
+
* shadow repo or Workspace tools with the same name. Repo tools often start
|
|
19
|
+
* child processes through PATH, so only PATH order can protect them. Plugin
|
|
20
|
+
* binaries stay reachable by name or by absolute path.
|
|
21
|
+
*/
|
|
22
|
+
const SANDBOX_COMMAND_PATH = `$PATH:${`${SANDBOX_WORKSPACE_ROOT}/.junior/bin`}`;
|
|
16
23
|
function sandboxSkillDir(skillName) {
|
|
17
24
|
return `${SANDBOX_SKILLS_ROOT}/${skillName}`;
|
|
18
25
|
}
|
|
@@ -51,7 +58,7 @@ function shellQuote(value) {
|
|
|
51
58
|
}
|
|
52
59
|
function buildEnvExports(options) {
|
|
53
60
|
const lines = [];
|
|
54
|
-
if (options.
|
|
61
|
+
if (options.path) lines.push(`export PATH="${options.path}"`);
|
|
55
62
|
for (const [key, value] of Object.entries(NON_INTERACTIVE_ENV)) lines.push(`export ${key}=${shellQuote(value)}`);
|
|
56
63
|
for (const [key, value] of Object.entries(options.env ?? {})) lines.push(`export ${key}=${shellQuote(value)}`);
|
|
57
64
|
return lines;
|
|
@@ -74,7 +81,7 @@ function buildNonInteractiveCommand(input) {
|
|
|
74
81
|
cmd: "bash",
|
|
75
82
|
args: [input.login ? "-lc" : "-c", buildNonInteractiveShellScript(buildCommandScript(input), {
|
|
76
83
|
env: input.env,
|
|
77
|
-
|
|
84
|
+
path: input.path
|
|
78
85
|
})]
|
|
79
86
|
};
|
|
80
87
|
}
|
|
@@ -572,4 +579,4 @@ function isStale(profile, createdAtMs) {
|
|
|
572
579
|
const maxAgeMs = floatingMaxAgeMs();
|
|
573
580
|
return maxAgeMs === 0 || Date.now() - createdAtMs > maxAgeMs;
|
|
574
581
|
}
|
|
575
|
-
export {
|
|
582
|
+
export { sandboxSkillPathResolution as A, SANDBOX_COMMAND_PATH as C, SANDBOX_WORKSPACE_ROOT as D, SANDBOX_SKILLS_ROOT as E, sandboxSkillDir as O, runNonInteractiveCommand as S, SANDBOX_REPOS_ROOT as T, workspaceSnapshotNotReadyUserMessage as _, isAbortError as a, buildCommandScript as b, isSandboxCommandStreamInterruptedError as c, isSnapshottingError as d, throwSandboxOperationError as f, isWorkspaceSnapshotNotReadyError as g, getWorkspaceSnapshotNotReadyError as h, ensureDockerDaemon as i, sandboxSkillFile as k, isSandboxMissingError as l, WorkspaceSnapshotNotReadyError as m, hash as n, isAlreadyExistsError as o, wrapSandboxSetupError as p, isStale as r, isSandboxApiTransientError as s, create as t, isSandboxUnavailableError as u, getVercelSandboxCredentials as v, SANDBOX_DATA_ROOT as w, buildNonInteractiveShellScript as x, sleep as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-
|
|
1
|
+
import { m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-dZN1Bvtu.js";
|
|
2
2
|
import { a as isUserActor, o as parseActorUserId } from "./actor-tlxzqaRe.js";
|
|
3
3
|
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJBompdd.js";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as withSpan, y as setSpanAttributes } from "./logging-
|
|
2
|
-
import { r as getStateAdapter } from "./adapter-
|
|
3
|
-
import {
|
|
1
|
+
import { T as withSpan, y as setSpanAttributes } from "./logging-dZN1Bvtu.js";
|
|
2
|
+
import { r as getStateAdapter } from "./adapter-t-Y9RHML.js";
|
|
3
|
+
import { C as SANDBOX_COMMAND_PATH, D as SANDBOX_WORKSPACE_ROOT, S as runNonInteractiveCommand, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, y as sleep } from "./profile-BP2N5uDY.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { FileSystem, Sandbox } from "@vercel/sandbox";
|
|
6
6
|
// src/chat/sandbox/resources.ts
|
|
@@ -216,7 +216,7 @@ async function postinstall(sandbox, commands, signal, timeoutMs) {
|
|
|
216
216
|
cmd: command.cmd,
|
|
217
217
|
args: command.args,
|
|
218
218
|
login: true,
|
|
219
|
-
|
|
219
|
+
path: SANDBOX_COMMAND_PATH,
|
|
220
220
|
signal,
|
|
221
221
|
timeoutMs,
|
|
222
222
|
...command.sudo !== void 0 ? { sudo: command.sudo } : void 0
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { Ft as listTurnSummaries, Pt as getTurnRecord } from "./tasks-
|
|
2
|
+
import { Ft as listTurnSummaries, Pt as getTurnRecord } from "./tasks-Bh2qYaed.js";
|
|
3
3
|
import { t as createActor } from "./actor-tlxzqaRe.js";
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import { $ as
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-BUje_knT.js";
|
|
5
|
+
import { $ as getAgentInvocationIdForMessage, J as createAgentInvocationFromLatest, Q as getAgentInvocationIdForEvents, W as listUnreportedSiblingAgents, Z as getAgentInvocation, at as getLatestAgentInvocationForConversation, et as getAgentInvocationIdForResult, nt as getAgentInvocationResultMessageId, ot as isTerminalAgentInvocation, ut as markAgentInvocationParentMailboxAppended } from "./agent-runner-Cx6NO5LE.js";
|
|
6
6
|
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-DeVax2qO.js";
|
|
7
|
-
import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
7
|
+
import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-ZuyOHxdK.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-dZynGGFW.js";
|
|
9
|
+
import { r as enqueueAgentInvocation } from "./work-BiIKfayl.js";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
|
|
12
12
|
// src/chat/conversations/web-mailbox.ts
|
|
@@ -223,7 +223,10 @@ const OUTPUT_LABEL = {
|
|
|
223
223
|
failed: "Error",
|
|
224
224
|
stopped: "Error"
|
|
225
225
|
};
|
|
226
|
-
function
|
|
226
|
+
function siblingLabel(sibling) {
|
|
227
|
+
return sibling.agentName ? `"${sibling.agentName}"` : sibling.title ?? sibling.childConversationId;
|
|
228
|
+
}
|
|
229
|
+
function renderResultInput(invocation, summary, openSiblings) {
|
|
227
230
|
const output = (invocation.status === "completed" ? invocation.result : invocation.errorMessage).trim().slice(0, AGENT_INVOCATION_RESULT_MAX_LENGTH);
|
|
228
231
|
const outputLabel = OUTPUT_LABEL[invocation.status];
|
|
229
232
|
return [
|
|
@@ -238,11 +241,12 @@ function renderResultInput(invocation, summary) {
|
|
|
238
241
|
`${outputLabel}:`,
|
|
239
242
|
output || "(empty)",
|
|
240
243
|
"",
|
|
241
|
-
RESULT_NEXT_STEP[invocation.status]
|
|
244
|
+
RESULT_NEXT_STEP[invocation.status],
|
|
245
|
+
...openSiblings.length > 0 ? ["", `Other child agents that you started have not reported yet: ${openSiblings.map(siblingLabel).join(", ")}. Their results arrive later. Unless this result is useful to the user alone, wait for them before you report.`] : []
|
|
242
246
|
].join("\n");
|
|
243
247
|
}
|
|
244
248
|
/** Build the parent Inbound message for one terminal agent invocation. */
|
|
245
|
-
function buildResultInboundMessage(invocation, nowMs) {
|
|
249
|
+
function buildResultInboundMessage(invocation, nowMs, openSiblings) {
|
|
246
250
|
const summary = trustedSummary(invocation, childAgentLabel(invocation));
|
|
247
251
|
const metadata = {
|
|
248
252
|
kind: "event",
|
|
@@ -262,7 +266,7 @@ function buildResultInboundMessage(invocation, nowMs) {
|
|
|
262
266
|
input: {
|
|
263
267
|
authorId: resultAuthorId(invocation.actor),
|
|
264
268
|
metadata,
|
|
265
|
-
text: renderResultInput(invocation, summary)
|
|
269
|
+
text: renderResultInput(invocation, summary, openSiblings)
|
|
266
270
|
},
|
|
267
271
|
receivedAtMs: nowMs,
|
|
268
272
|
source: "event"
|
|
@@ -280,8 +284,9 @@ function buildResultInboundMessage(invocation, nowMs) {
|
|
|
280
284
|
async function enqueueAgentInvocationResult(invocation, options) {
|
|
281
285
|
if (invocation.parentMailboxStatus !== "pending") return;
|
|
282
286
|
const nowMs = options.nowMs ?? Date.now();
|
|
287
|
+
const openSiblings = await listUnreportedSiblingAgents(invocation.parentConversationId, invocation.childConversationId);
|
|
283
288
|
await appendAndEnqueueInboundMessage({
|
|
284
|
-
message: buildResultInboundMessage(invocation, nowMs),
|
|
289
|
+
message: buildResultInboundMessage(invocation, nowMs, openSiblings),
|
|
285
290
|
queue: options.queue,
|
|
286
291
|
queueDelayMs: EVENT_WAIT_MS,
|
|
287
292
|
state: options.state
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { At as saveTurnCheckpoint, I as loadProjection, Q as persistConversationMessages, U as recordAuthorizationCompleted, Wt as persistWithRetry, Z as hydrateConversationMessages, dt as markConversationMessage, ft as normalizeConversationText, ht as upsertConversationMessage, j as commitAcceptedReply, ot as buildConversationContext, pt as recordDeliveredAssistantMessage, yt as authorizationId } from "./tasks-
|
|
2
|
-
import { f as logException, w as withLogContext, x as setTags } from "./logging-
|
|
3
|
-
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import {
|
|
1
|
+
import { At as saveTurnCheckpoint, I as loadProjection, Q as persistConversationMessages, U as recordAuthorizationCompleted, Wt as persistWithRetry, Z as hydrateConversationMessages, dt as markConversationMessage, ft as normalizeConversationText, ht as upsertConversationMessage, j as commitAcceptedReply, ot as buildConversationContext, pt as recordDeliveredAssistantMessage, yt as authorizationId } from "./tasks-Bh2qYaed.js";
|
|
2
|
+
import { f as logException, w as withLogContext, x as setTags } from "./logging-dZN1Bvtu.js";
|
|
3
|
+
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-oMTUVAcR.js";
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-BUje_knT.js";
|
|
5
|
+
import { Bt as startActiveTurn, zt as markTurnFailed } from "./agent-runner-Cx6NO5LE.js";
|
|
6
6
|
import { P as messageCardText } from "./conversation-CvuKJ3tA.js";
|
|
7
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
8
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
9
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
10
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
11
|
-
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-
|
|
7
|
+
import { n as getAssistantReplyText } from "./assistant-reply-B2qUBAwL.js";
|
|
8
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-BRgJ5e0s.js";
|
|
9
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-D0e887FM.js";
|
|
10
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DA37FsAT.js";
|
|
11
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-BLcscQ-f.js";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
13
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
14
14
|
// src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jn as sandboxEgressSignalsResponseSchema } from "./tasks-Bh2qYaed.js";
|
|
2
2
|
// 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,4 +1,4 @@
|
|
|
1
|
-
import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-
|
|
1
|
+
import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-CxKldAeB.js";
|
|
2
2
|
import { E as conversationUsageSchema, T as conversationSummaryReportSchema, j as conversationChildAgentTotalsSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema } from "./conversation-CvuKJ3tA.js";
|
|
3
3
|
import "./automation-DrpcA-SX.js";
|
|
4
4
|
import { a as fillUtcHours, c as sumUtcHoursIntoSixHours, i as fillUtcDays } from "./web-message-id-CJSUiksE.js";
|
|
@@ -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-CfwKT0sn.js";
|
|
2
|
+
import { t as disconnectStateAdapter } from "./adapter-t-Y9RHML.js";
|
|
3
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-Del2I_x3.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,6 +1,6 @@
|
|
|
1
|
-
import { m as logWarn, y as setSpanAttributes, z as isRecord } from "./logging-
|
|
2
|
-
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-
|
|
3
|
-
import { i as MUTATION_LOCK_TTL_MS, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-
|
|
1
|
+
import { m as logWarn, y as setSpanAttributes, z as isRecord } from "./logging-dZN1Bvtu.js";
|
|
2
|
+
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-BUje_knT.js";
|
|
3
|
+
import { i as MUTATION_LOCK_TTL_MS, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-t-Y9RHML.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { UnauthorizedError, auth } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { $t as isToolResultError, A as ToolInputError,
|
|
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-
|
|
6
|
-
import { s as juniorConversations } from "./agent-invocations-
|
|
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 } from "./agent-hooks-
|
|
2
|
+
import { $t as isToolResultError, A as ToolInputError, Kn as postSlackMessage, Zt as isAssistantMessage, en as isToolResultMessage, tn as normalizeToolNameFromResult } from "./tasks-Bh2qYaed.js";
|
|
3
|
+
import { f as logException, m as logWarn, p as logInfo } from "./logging-dZN1Bvtu.js";
|
|
4
|
+
import { n as botConfig } from "./config-BiCtNiu5.js";
|
|
5
|
+
import { f as getSqlExecutor, u as getConversationStore } from "./viewer-oMTUVAcR.js";
|
|
6
|
+
import { s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
7
|
+
import "./executor-O8xqLDN6.js";
|
|
8
|
+
import { h as credentialSubjectSchema } from "./registry-BUje_knT.js";
|
|
9
|
+
import { gt as JUNIOR_THREAD_STATE_TTL_MS, rt as verifyTimerWatchCredentialSubject, u as getPlugins } from "./agent-hooks-9q2zdKHL.js";
|
|
10
|
+
import { r as getStateAdapter } from "./adapter-t-Y9RHML.js";
|
|
10
11
|
import { r as EVENT_AUTHOR_ID } from "./prompt-DeVax2qO.js";
|
|
11
|
-
import { r as
|
|
12
|
-
import { r as
|
|
13
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-DzRbd5VT.js";
|
|
12
|
+
import { r as sanitizeAssistantText } from "./assistant-reply-B2qUBAwL.js";
|
|
13
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-dZynGGFW.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";
|
|
@@ -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-dZN1Bvtu.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-CfwKT0sn.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 {
|
|
3
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { Dt as toolInvocationDestination, Et as actorFromRun } from "./agent-runner-Cx6NO5LE.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-BiIKfayl.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. */
|
|
@@ -13,6 +13,7 @@ function bindSpawnAgent(run, options) {
|
|
|
13
13
|
return { childConversationId: (await createAndEnqueueAgentInvocation({
|
|
14
14
|
actor,
|
|
15
15
|
...input.name ? { agentName: input.name } : void 0,
|
|
16
|
+
...input.agentType ? { agentType: input.agentType } : void 0,
|
|
16
17
|
...run.credentialContext ? { credentialContext: run.credentialContext } : void 0,
|
|
17
18
|
destination: toolInvocationDestination(run),
|
|
18
19
|
idempotencyKey: `${run.turnId}:${call.toolCallId}`,
|
|
@@ -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-dZN1Bvtu.js";
|
|
2
|
+
import { i as getChatConfig } from "./config-BiCtNiu5.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-oMTUVAcR.js";
|
|
5
|
+
import { gt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-9q2zdKHL.js";
|
|
6
|
+
import { n as getDefaultRedisStateAdapterFor, r as getStateAdapter } from "./adapter-t-Y9RHML.js";
|
|
7
|
+
import "./job-queue-DmarAQGI.js";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
10
|
import { destinationSchema } from "@sentry/junior-plugin-api";
|
|
@@ -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-dZN1Bvtu.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-DmarAQGI.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-BRgJ5e0s.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 isToolResultError,
|
|
3
|
-
import { g as runBestEffort, m as logWarn } from "./logging-
|
|
2
|
+
import { $t as isToolResultError, Gn as openSlackDirectMessage, Kn as postSlackMessage, Kt as getPiMessageRole, Ln as escapeSlackMrkdwnText, Pt as getTurnRecord, Rn as formatSlackLink, Xt as instructionTextForProjection, Z as hydrateConversationMessages, en as isToolResultMessage, i as readScheduledAutomation, l as blockEventAutomation, m as getEventAutomation, rn as stripRuntimeTurnContext, rt as fallbackShortTitle, tn as normalizeToolNameFromResult } from "./tasks-Bh2qYaed.js";
|
|
3
|
+
import { g as runBestEffort, m as logWarn } from "./logging-dZN1Bvtu.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-
|
|
6
|
-
import { s as juniorConversations } from "./agent-invocations-
|
|
7
|
-
import { a as juniorAutomationRuns, s as juniorAutomations } from "./executor-
|
|
5
|
+
import { T as agentTurnTotalTokens, d as getDb, r as readActorIdentity, u as getConversationStore, w as agentTurnCostUsd } from "./viewer-oMTUVAcR.js";
|
|
6
|
+
import { s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
7
|
+
import { a as juniorAutomationRuns, s as juniorAutomations } from "./executor-O8xqLDN6.js";
|
|
8
8
|
import { m as sameActorIdentity } from "./history-AY8rs-FR.js";
|
|
9
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
10
|
-
import { Ct as createPluginModel, Pt as createPluginConversationEvents, St as createPluginEmbedder, gt as JUNIOR_THREAD_STATE_TTL_MS, p as coreTaskRegistrations, u as getPlugins, wt as createPluginLogger, xt as createPluginState, 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-BUje_knT.js";
|
|
10
|
+
import { Ct as createPluginModel, Pt as createPluginConversationEvents, St as createPluginEmbedder, Xt as createPluginCache, gt as JUNIOR_THREAD_STATE_TTL_MS, p as coreTaskRegistrations, u as getPlugins, wt as createPluginLogger, xt as createPluginState, yt as getDashboardTaskLink } from "./agent-hooks-9q2zdKHL.js";
|
|
11
|
+
import { r as getStateAdapter } from "./adapter-t-Y9RHML.js";
|
|
12
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DA37FsAT.js";
|
|
13
|
+
import { t as resolveConversationRouting } from "./turn-session-routing-DdbSbJS6.js";
|
|
14
|
+
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-CmMCtzHO.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";
|
|
@@ -784,6 +784,13 @@ async function getPluginDispatchProjection(args) {
|
|
|
784
784
|
return toDispatchProjection(record);
|
|
785
785
|
}
|
|
786
786
|
// src/chat/plugins/task-runner.ts
|
|
787
|
+
/**
|
|
788
|
+
* Plugin background-task orchestration.
|
|
789
|
+
*
|
|
790
|
+
* Core schedules tasks from completed sessions and exposes plugins only a
|
|
791
|
+
* bounded run projection rather than live runtime internals or queue
|
|
792
|
+
* payloads.
|
|
793
|
+
*/
|
|
787
794
|
var task_runner_exports = /* @__PURE__ */ __exportAll({
|
|
788
795
|
processPluginTask: () => processPluginTask,
|
|
789
796
|
scheduleSessionCompletedPluginTasks: () => scheduleSessionCompletedPluginTasks
|
|
@@ -991,6 +998,7 @@ function taskPluginContext(plugin, message, options = {}) {
|
|
|
991
998
|
model: createPluginModel(pluginName, plugin.model, { signal: options.signal }),
|
|
992
999
|
name: message.name,
|
|
993
1000
|
plugin: { name: pluginName },
|
|
1001
|
+
cache: createPluginCache(pluginName),
|
|
994
1002
|
run: { async load() {
|
|
995
1003
|
return await loadPluginRun(sessionParams);
|
|
996
1004
|
} },
|