@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.
Files changed (67) hide show
  1. package/dist/{adapter-Dj5BTJRd.js → adapter-t-Y9RHML.js} +2 -2
  2. package/dist/{admin-tzkZDqrH.js → admin-BCqeFndQ.js} +1 -1
  3. package/dist/{agent-hooks-V4Hfc2tB.js → agent-hooks-9q2zdKHL.js} +73 -20
  4. package/dist/{agent-invocations-Qfz7dWgU.js → agent-invocations-CxKldAeB.js} +1 -0
  5. package/dist/{agent-runner-DvTUyGTY.js → agent-runner-Cx6NO5LE.js} +115 -37
  6. package/dist/api/schema.js +1 -1
  7. package/dist/api.js +42 -41
  8. package/dist/{app-BsBUs3rF.d.ts → app-Bo0kB987.d.ts} +6 -1
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +59 -63
  11. package/dist/{assistant-reply-CEOMzsWy.js → assistant-reply-B2qUBAwL.js} +1 -1
  12. package/dist/{briefs-BSCkyYqs.js → briefs-DsGH2Vym.js} +2 -2
  13. package/dist/{catalog-runtime-Bpcs2b2L.js → catalog-runtime-CfwKT0sn.js} +1 -1
  14. package/dist/cli/chat.js +15 -17
  15. package/dist/cli/check.js +3 -3
  16. package/dist/cli/init.js +1 -1
  17. package/dist/cli/main.js +3 -3
  18. package/dist/cli/plugins.js +4 -4
  19. package/dist/cli/snapshot-create.js +4 -4
  20. package/dist/cli/upgrade.js +3 -3
  21. package/dist/{client-JeyzRwsT.js → client-DpfjZgNk.js} +2 -2
  22. package/dist/{config-ULs6Zl9b.js → config-BiCtNiu5.js} +2 -2
  23. package/dist/{connections-CZ7HhEmN.js → connections-D9IKbfk-.js} +10 -10
  24. package/dist/{conversation-privacy-BQSlZXgV.js → conversation-privacy-CBUI0frD.js} +1 -1
  25. package/dist/{credential-sync-BKcv5rBe.js → credential-sync-Bu6ZOuOk.js} +14 -14
  26. package/dist/{executor-BoGNVEDn.js → executor-O8xqLDN6.js} +4 -3
  27. package/dist/{images-BBmDXQCB.js → images-AM1exvU0.js} +2 -2
  28. package/dist/instrumentation.js +2 -2
  29. package/dist/{job-queue-CbdVyaCo.js → job-queue-DmarAQGI.js} +1 -1
  30. package/dist/{logging-DSMmkHXG.js → logging-dZN1Bvtu.js} +1 -1
  31. package/dist/{message-zaj5gBbS.js → message-C_g2S8kv.js} +3 -3
  32. package/dist/nitro.d.ts +1 -1
  33. package/dist/nitro.js +3 -3
  34. package/dist/{oauth-callback-server-yYFG8Own.js → oauth-callback-server-DvvOvr4q.js} +2 -2
  35. package/dist/{profile-ByWkAY7L.js → profile-BP2N5uDY.js} +13 -6
  36. package/dist/{registry-BL-osYWN.js → registry-BUje_knT.js} +1 -1
  37. package/dist/{resolve-HuPG2VMB.js → resolve-DftZiYNU.js} +4 -4
  38. package/dist/{result-DS7V4a3-.js → result-CRMRT9CE.js} +16 -11
  39. package/dist/{runner-Cba_OfGl.js → runner-4mmL2Pt1.js} +10 -10
  40. package/dist/{sandbox-egress-signals-C7NcPzea.js → sandbox-egress-signals-1ysv0z5A.js} +1 -1
  41. package/dist/{schema-OzL8Zw4H.js → schema-XuTZukI9.js} +1 -1
  42. package/dist/{service-account-DqwHhwJA.js → service-account-B1sH3P7d.js} +3 -3
  43. package/dist/{service-account-Ko1Xs--F.js → service-account-Del2I_x3.js} +3 -3
  44. package/dist/{session-stop-HfKx-pky.js → session-stop-ZuyOHxdK.js} +11 -11
  45. package/dist/{skills-D6_bcAuW.js → skills-lPeepA2b.js} +2 -2
  46. package/dist/{spawn-BWqK6EwM.js → spawn-DovpdlrW.js} +3 -2
  47. package/dist/{store-DzRbd5VT.js → store-dZynGGFW.js} +6 -6
  48. package/dist/{task-queue-9LICOzcL.js → task-queue-CmMCtzHO.js} +3 -3
  49. package/dist/{task-runner-DGnd_B5X.js → task-runner-BRgJ5e0s.js} +19 -11
  50. package/dist/{tasks-CjrS098O.js → tasks-Bh2qYaed.js} +45 -28
  51. package/dist/{thread-state-CqkYowEz.js → thread-state-DA37FsAT.js} +5 -5
  52. package/dist/{turn-failure-response-BkKmGqFt.js → turn-failure-response-BLcscQ-f.js} +7 -7
  53. package/dist/{turn-lifecycle-DYv8IV6w.js → turn-lifecycle-D0e887FM.js} +1 -1
  54. package/dist/{turn-session-routing-TaVhKmdz.js → turn-session-routing-DdbSbJS6.js} +1 -1
  55. package/dist/{validation-BrXMYPyo.js → validation-DtcovXqq.js} +1 -1
  56. package/dist/{version-Ct049vav.js → version-JcDaJ75p.js} +1 -1
  57. package/dist/version.js +1 -1
  58. package/dist/{viewer-C-J0ewlH.js → viewer-oMTUVAcR.js} +4 -4
  59. package/dist/{web-input-C_xB3RXp.js → web-input-FQ5wgqYn.js} +26 -26
  60. package/dist/{work-D829Ue7k.js → work-BiIKfayl.js} +40 -10
  61. package/dist/{worker-BRTYzlpk.js → worker-BZ7l75NM.js} +5 -5
  62. package/migrations/0062_plugin_report_index.sql +20 -0
  63. package/migrations/0063_agent_invocation_type.sql +1 -0
  64. package/migrations/meta/0062_snapshot.json +3499 -0
  65. package/migrations/meta/0063_snapshot.json +3505 -0
  66. package/migrations/meta/_journal.json +14 -0
  67. package/package.json +10 -10
@@ -1,7 +1,7 @@
1
- import { n as pluginCatalogRuntime } from "../catalog-runtime-Bpcs2b2L.js";
2
- import { t as disconnectStateAdapter } from "../adapter-Dj5BTJRd.js";
3
- import { t as create } from "../profile-ByWkAY7L.js";
4
- import { r as resolve } from "../resolve-HuPG2VMB.js";
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;
@@ -1,6 +1,6 @@
1
- import { i as getChatConfig } from "../config-ULs6Zl9b.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-BoGNVEDn.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-BL-osYWN.js";
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-DSMmkHXG.js";
2
- import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-BQSlZXgV.js";
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-JeyzRwsT.js";
3
- import { m as logWarn } from "./logging-DSMmkHXG.js";
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 { Ln as startOAuthFlow, Nt as failTurnRecord, Pt as getTurnRecord, kt as loadTurnCheckpoint } from "./tasks-CjrS098O.js";
2
- import { n as botConfig } from "./config-ULs6Zl9b.js";
3
- import { A as deleteProviderIdentityForUser, c as getConversationEventStore, f as getSqlExecutor, k as deleteProviderIdentityForSlackUser } from "./viewer-C-J0ewlH.js";
4
- import { u as hasRequiredOAuthScope } from "./registry-BL-osYWN.js";
5
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Bpcs2b2L.js";
6
- import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-DvTUyGTY.js";
7
- import { r as getStateAdapter } from "./adapter-Dj5BTJRd.js";
8
- import { a as getVercelConversationWorkQueue } from "./job-queue-CbdVyaCo.js";
9
- import { m as ensureConversationWake, w as requestConversationWork } from "./store-DzRbd5VT.js";
10
- import { n as resolveTurnSessionRouting } from "./turn-session-routing-TaVhKmdz.js";
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,4 +1,4 @@
1
- import { m as logWarn } from "./logging-DSMmkHXG.js";
1
+ import { m as logWarn } from "./logging-dZN1Bvtu.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  // src/chat/conversation-privacy.ts
4
4
  const SAFE_METADATA_KEY_LIMIT = 20;
@@ -1,19 +1,19 @@
1
- import { $n as resolvePluginOAuthAccount, Et as getConversationPendingAuth, Fn as parseOAuthStatePayload, H as recordAuthenticationLinked, In as resolveBaseUrl, Pn as formatProviderLabel, Pt as getTurnRecord, U as recordAuthorizationCompleted, bn as createUserTokenStore, qn as postSlackMessage } from "./tasks-CjrS098O.js";
2
- import { p as escapeXml } from "./client-JeyzRwsT.js";
3
- import { L as isNativeIdentityProvider, f as logException, g as runBestEffort, m as logWarn } from "./logging-DSMmkHXG.js";
4
- import { a as getRuntimeMetadata, n as botConfig } from "./config-ULs6Zl9b.js";
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-C-J0ewlH.js";
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-BL-osYWN.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Bpcs2b2L.js";
10
- import { t as discoverSkills } from "./skills-D6_bcAuW.js";
11
- import { a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, v as lookupSlackUserProfile } from "./agent-runner-DvTUyGTY.js";
12
- import { ct as getSlackClient } from "./agent-hooks-V4Hfc2tB.js";
13
- import { a as acquireActiveLock, r as getStateAdapter } from "./adapter-Dj5BTJRd.js";
14
- import { _ as getMcpProviderErrorAttributes } from "./service-account-Ko1Xs--F.js";
15
- import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CqkYowEz.js";
16
- import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-CZ7HhEmN.js";
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-DSMmkHXG.js";
1
+ import { f as logException } from "./logging-dZN1Bvtu.js";
2
2
  import { g as startSpanManual } from "./sentry-BBUlHih9.js";
3
- import "./config-ULs6Zl9b.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-Qfz7dWgU.js";
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-C-J0ewlH.js";
3
- import { S as readLiveAttachment, w as storeAttachment } from "./agent-runner-DvTUyGTY.js";
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({
@@ -1,6 +1,6 @@
1
- import { F as getDeploymentTelemetryAttributes, P as getDeploymentServiceVersion } from "./logging-DSMmkHXG.js";
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-BQSlZXgV.js";
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-ULs6Zl9b.js";
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-Ct049vav.js";
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 { Ct as actorFromRun, J as findChildAgentConversationId, K as createAgentInvocationForMessage, Y as getActiveAgentInvocationForConversation, ht as PARENT_AGENT_TARGET, mt as AgentMessageTargetError, wt as toolInvocationDestination } from "./agent-runner-DvTUyGTY.js";
3
- import { n as enqueueAgentMessageToParent } from "./result-DS7V4a3-.js";
4
- import { r as enqueueAgentInvocation } from "./work-D829Ue7k.js";
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-BsBUs3rF.js";
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-DSMmkHXG.js";
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-CbdVyaCo.js";
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-9LICOzcL.js";
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 { bn as createUserTokenStore } from "./tasks-CjrS098O.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-BKcv5rBe.js";
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-JeyzRwsT.js";
2
- import { b as setSpanStatus, y as setSpanAttributes } from "./logging-DSMmkHXG.js";
3
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Bpcs2b2L.js";
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.pathPrefix) lines.push(`export PATH="${options.pathPrefix}"`);
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
- pathPrefix: input.pathPrefix
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 { SANDBOX_DATA_ROOT as C, sandboxSkillDir as D, SANDBOX_WORKSPACE_ROOT as E, sandboxSkillFile as O, runNonInteractiveCommand as S, SANDBOX_SKILLS_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, sandboxSkillPathResolution 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_REPOS_ROOT as w, buildNonInteractiveShellScript as x, sleep as y };
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-DSMmkHXG.js";
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-DSMmkHXG.js";
2
- import { r as getStateAdapter } from "./adapter-Dj5BTJRd.js";
3
- import { E as SANDBOX_WORKSPACE_ROOT, S as runNonInteractiveCommand, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, y as sleep } from "./profile-ByWkAY7L.js";
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
- pathPrefix: `${SANDBOX_WORKSPACE_ROOT}/.junior/bin:$PATH`,
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-CjrS098O.js";
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-BL-osYWN.js";
5
- import { $ as getAgentInvocationIdForResult, Q as getAgentInvocationIdForMessage, X as getAgentInvocation, Z as getAgentInvocationIdForEvents, at as isTerminalAgentInvocation, it as getLatestAgentInvocationForConversation, lt as markAgentInvocationParentMailboxAppended, q as createAgentInvocationFromLatest, tt as getAgentInvocationResultMessageId } from "./agent-runner-DvTUyGTY.js";
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-HfKx-pky.js";
8
- import { r as appendAndEnqueueInboundMessage } from "./store-DzRbd5VT.js";
9
- import { r as enqueueAgentInvocation } from "./work-D829Ue7k.js";
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 renderResultInput(invocation, summary) {
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-CjrS098O.js";
2
- import { f as logException, w as withLogContext, x as setTags } from "./logging-DSMmkHXG.js";
3
- import { c as getConversationEventStore, u as getConversationStore } from "./viewer-C-J0ewlH.js";
4
- import { f as credentialContextForActor } from "./registry-BL-osYWN.js";
5
- import { It as markTurnFailed, Lt as startActiveTurn } from "./agent-runner-DvTUyGTY.js";
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-CEOMzsWy.js";
8
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-DGnd_B5X.js";
9
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DYv8IV6w.js";
10
- import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CqkYowEz.js";
11
- import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-BkKmGqFt.js";
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 { Mn as sandboxEgressSignalsResponseSchema } from "./tasks-CjrS098O.js";
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-Qfz7dWgU.js";
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-Bpcs2b2L.js";
2
- import { t as disconnectStateAdapter } from "./adapter-Dj5BTJRd.js";
3
- import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-Ko1Xs--F.js";
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-DSMmkHXG.js";
2
- import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-BL-osYWN.js";
3
- import { i as MUTATION_LOCK_TTL_MS, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-Dj5BTJRd.js";
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, Zt as isAssistantMessage, en as isToolResultMessage, qn as postSlackMessage, tn as normalizeToolNameFromResult } from "./tasks-CjrS098O.js";
3
- import { f as logException, m as logWarn, p as logInfo } from "./logging-DSMmkHXG.js";
4
- import { n as botConfig } from "./config-ULs6Zl9b.js";
5
- import { f as getSqlExecutor, u as getConversationStore } from "./viewer-C-J0ewlH.js";
6
- import { s as juniorConversations } from "./agent-invocations-Qfz7dWgU.js";
7
- import "./executor-BoGNVEDn.js";
8
- import { h as credentialSubjectSchema } from "./registry-BL-osYWN.js";
9
- import { gt as JUNIOR_THREAD_STATE_TTL_MS, rt as verifyTimerWatchCredentialSubject, u as getPlugins } from "./agent-hooks-V4Hfc2tB.js";
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 getStateAdapter } from "./adapter-Dj5BTJRd.js";
12
- import { r as sanitizeAssistantText } from "./assistant-reply-CEOMzsWy.js";
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-DSMmkHXG.js";
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-Bpcs2b2L.js";
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 { Ct as actorFromRun, wt as toolInvocationDestination } from "./agent-runner-DvTUyGTY.js";
3
- import { n as createAndEnqueueAgentInvocation } from "./work-D829Ue7k.js";
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-DSMmkHXG.js";
2
- import { i as getChatConfig } from "./config-ULs6Zl9b.js";
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-C-J0ewlH.js";
5
- import { gt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-V4Hfc2tB.js";
6
- import { n as getDefaultRedisStateAdapterFor, r as getStateAdapter } from "./adapter-Dj5BTJRd.js";
7
- import "./job-queue-CbdVyaCo.js";
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-DSMmkHXG.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-CbdVyaCo.js";
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-DGnd_B5X.js").then((n) => n.r);
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, Kn as openSlackDirectMessage, Kt as getPiMessageRole, Pt as getTurnRecord, Rn as escapeSlackMrkdwnText, Xt as instructionTextForProjection, Z as hydrateConversationMessages, en as isToolResultMessage, i as readScheduledAutomation, l as blockEventAutomation, m as getEventAutomation, qn as postSlackMessage, rn as stripRuntimeTurnContext, rt as fallbackShortTitle, tn as normalizeToolNameFromResult, zn as formatSlackLink } from "./tasks-CjrS098O.js";
3
- import { g as runBestEffort, m as logWarn } from "./logging-DSMmkHXG.js";
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-C-J0ewlH.js";
6
- import { s as juniorConversations } from "./agent-invocations-Qfz7dWgU.js";
7
- import { a as juniorAutomationRuns, s as juniorAutomations } from "./executor-BoGNVEDn.js";
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-BL-osYWN.js";
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-V4Hfc2tB.js";
11
- import { r as getStateAdapter } from "./adapter-Dj5BTJRd.js";
12
- import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CqkYowEz.js";
13
- import { t as resolveConversationRouting } from "./turn-session-routing-TaVhKmdz.js";
14
- import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-9LICOzcL.js";
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
  } },