@sentry/junior 0.248.0 → 0.250.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 (59) hide show
  1. package/dist/{admin-BlHz8fGl.js → admin-DMKyXi83.js} +1 -1
  2. package/dist/{agent-hooks-DWCHBPYw.js → agent-hooks-CtZuJPTU.js} +26 -11
  3. package/dist/{agent-runner-CnlFtbzb.js → agent-runner-CNiTpIpb.js} +745 -423
  4. package/dist/api/schema.d.ts +33 -0
  5. package/dist/api/schema.js +4 -4
  6. package/dist/api.js +56 -24
  7. package/dist/app.js +36 -44
  8. package/dist/{assistant-reply-BxCi7V4v.js → assistant-reply-K5r1pcgJ.js} +1 -1
  9. package/dist/{briefs-CdkIl79U.js → briefs-8xyS3oeV.js} +4 -4
  10. package/dist/{catalog-runtime-CTBsdSam.js → catalog-runtime-BQ3g3OX_.js} +1 -1
  11. package/dist/cli/chat.js +15 -15
  12. package/dist/cli/check.js +3 -3
  13. package/dist/cli/main.js +2 -2
  14. package/dist/cli/plugins.js +4 -4
  15. package/dist/cli/snapshot-create.js +3 -3
  16. package/dist/cli/upgrade.js +3 -3
  17. package/dist/{client-CWQtbizj.js → client-Q27hki0Y.js} +2 -2
  18. package/dist/{config-aitDvTQm.js → config-Cb--Qs-g.js} +2 -2
  19. package/dist/{web-authorization-rDLlKIS0.js → connections-DZ70JeSN.js} +85 -8
  20. package/dist/{conversation-Cjo9tHGm.js → conversation-NutPJ8S8.js} +1 -1
  21. package/dist/{conversation-privacy-BsqXHVBz.js → conversation-privacy-BIDN1sW3.js} +1 -1
  22. package/dist/{credential-sync-DqZF735a.js → credential-sync-CyAN-Gos.js} +18 -23
  23. package/dist/{executor-oIZAkQZb.js → executor-D8y7v95s.js} +2 -2
  24. package/dist/{history-Nte1oVed.js → history-9pO1Zd4Y.js} +7 -1
  25. package/dist/{images-Dzh3RBXY.js → images-BkGhqKIK.js} +3 -3
  26. package/dist/instrumentation.js +2 -2
  27. package/dist/{job-queue-DyA2AEnY.js → job-queue-uGq6Grnt.js} +1 -1
  28. package/dist/{logging-OpC2jwiV.js → logging-C22RdmU8.js} +1 -1
  29. package/dist/{message-EyMrVXEf.js → message-D0RPetp-.js} +3 -3
  30. package/dist/nitro.js +3 -3
  31. package/dist/{oauth-callback-server-ClDv9Z5Y.js → oauth-callback-server-DF_Odkvh.js} +2 -2
  32. package/dist/{pending-auth-D_nf121N.js → pending-auth-Bg3A1-pE.js} +2 -2
  33. package/dist/{profile-Dfg76pvk.js → profile-DK9umvav.js} +4 -4
  34. package/dist/{prompt-C7bRJ2vg.js → prompt-kYP1FAX_.js} +1 -1
  35. package/dist/{registry-fpIZHoqE.js → registry-BvsLuoLK.js} +1 -1
  36. package/dist/{resolve-LMCZhQVg.js → resolve-C9btOXju.js} +2 -2
  37. package/dist/{result-C1ZCRPLx.js → result-CcdQ2iau.js} +8 -8
  38. package/dist/{runner-DNZMviFH.js → runner-Bem4DUHN.js} +10 -10
  39. package/dist/{sandbox-egress-signals-Dcc-mwkl.js → sandbox-egress-signals-Bl-4cF7E.js} +1 -1
  40. package/dist/{schema-BRZsYL5-.js → schema-DELmAdjR.js} +18 -2
  41. package/dist/{session-stop-dyvsZDB0.js → session-stop-DteRDRCi.js} +17 -14
  42. package/dist/{skills-BgGiQt5Y.js → skills-CVwSL6Gc.js} +2 -2
  43. package/dist/{spawn-CpqxMPWE.js → spawn-CA0YYtzr.js} +2 -2
  44. package/dist/{store-OMQAFrJG.js → store-Dw3eBN9S.js} +6 -6
  45. package/dist/{task-queue-SWsXPSp-.js → task-queue-C7cyjcVj.js} +3 -3
  46. package/dist/{task-runner-BOxv7shv.js → task-runner-BbSyWmOq.js} +11 -11
  47. package/dist/{tasks-DREdnhVP.js → tasks-B8nH3ND_.js} +10 -10
  48. package/dist/{thread-state-BoNCtSwk.js → thread-state-BTOLzCM-.js} +6 -6
  49. package/dist/{turn-failure-response-C6jrCPjc.js → turn-failure-response-BwNfO8Xt.js} +8 -8
  50. package/dist/{turn-lifecycle-cQFsZFOU.js → turn-lifecycle-DSN0xGW7.js} +1 -1
  51. package/dist/{turn-session-routing-Ba12fwXz.js → turn-session-routing-BRKYIn6n.js} +1 -1
  52. package/dist/{validation-Dmfh2cTj.js → validation-CBkyzKCP.js} +1 -1
  53. package/dist/{version-ByV7nGOn.js → version-CkwwLVLb.js} +1 -1
  54. package/dist/version.js +1 -1
  55. package/dist/{viewer-CX41TWYr.js → viewer-DdzigZQh.js} +4 -4
  56. package/dist/{web-input-Bn9HHZEo.js → web-input-BjdnnpuN.js} +29 -29
  57. package/dist/{work-CvFoEpRT.js → work-qQEjtmlv.js} +29 -13
  58. package/dist/{worker-CI5B63vk.js → worker-C-CSZMy_.js} +5 -5
  59. package/package.json +4 -4
@@ -1,11 +1,14 @@
1
- import { c as getConversationEventStore } from "./viewer-CX41TWYr.js";
2
- import { Q as getTurnRecord, Z as failTurnRecord, q as loadTurnCheckpoint } from "./tasks-DREdnhVP.js";
3
- import { w as getStateAdapter } from "./profile-Dfg76pvk.js";
4
- import { a as getVercelConversationWorkQueue } from "./job-queue-DyA2AEnY.js";
5
- import { m as ensureConversationWake, w as requestConversationWork } from "./store-OMQAFrJG.js";
6
- import { n as resolveTurnSessionRouting } from "./turn-session-routing-Ba12fwXz.js";
1
+ import { Pt as startOAuthFlow, c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-CNiTpIpb.js";
2
+ import { D as deleteProviderIdentityForSlackUser, c as getConversationEventStore, f as getSqlExecutor } from "./viewer-DdzigZQh.js";
3
+ import { u as hasRequiredOAuthScope } from "./registry-BvsLuoLK.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BQ3g3OX_.js";
5
+ import { Q as getTurnRecord, Z as failTurnRecord, q as loadTurnCheckpoint } from "./tasks-B8nH3ND_.js";
6
+ import { w as getStateAdapter } from "./profile-DK9umvav.js";
7
+ import { a as getVercelConversationWorkQueue } from "./job-queue-uGq6Grnt.js";
8
+ import { m as ensureConversationWake, w as requestConversationWork } from "./store-Dw3eBN9S.js";
9
+ import { n as resolveTurnSessionRouting } from "./turn-session-routing-BRKYIn6n.js";
7
10
  import { z } from "zod";
8
- import { randomUUID } from "node:crypto";
11
+ import { randomBytes, randomUUID } from "node:crypto";
9
12
  //#region src/chat/task-execution/authorized-turn.ts
10
13
  /**
11
14
  * OAuth callbacks save readiness, not agent history. The conversation worker
@@ -159,4 +162,78 @@ async function deleteWebAuthorization(args) {
159
162
  await getStateAdapter().delete(authorizationKey(args.conversationId, args.actorId));
160
163
  }
161
164
  //#endregion
162
- export { getPausedTurnRequest as a, getTurnAuthorization as c, createPausedTurns as i, deleteWebAuthorization as n, wakeAuthorizedTurn as o, getWebAuthorization as r, wakePausedTurn as s, createWebAuthorization as t };
165
+ //#region src/chat/credentials/unlink-provider.ts
166
+ /** Remove one provider connection and its exact stored account identity. */
167
+ async function unlinkProvider(userId, provider, userTokenStore, slackTeamId) {
168
+ const tokens = await userTokenStore.get(userId, provider);
169
+ if (tokens?.account && slackTeamId) await deleteProviderIdentityForSlackUser(getSqlExecutor(), slackTeamId, userId, provider, tokens.account.id);
170
+ await Promise.all([
171
+ userTokenStore.delete(userId, provider),
172
+ deleteMcpStoredOAuthCredentials(userId, provider),
173
+ deleteMcpServerSessionId(userId, provider),
174
+ deleteMcpAuthSessionsForUserProvider(userId, provider)
175
+ ]);
176
+ }
177
+ //#endregion
178
+ //#region src/chat/credentials/connections.ts
179
+ /** Return stored OAuth tokens only when they still carry the manifest scope. */
180
+ async function readConnectedOAuthTokens(userId, plugin, userTokenStore) {
181
+ if (!plugin.manifest.oauth && !plugin.manifest.credentials) return;
182
+ const stored = await userTokenStore.get(userId, plugin.manifest.name);
183
+ return stored && hasRequiredOAuthScope(stored.scope, plugin.manifest.oauth?.scope) ? stored : void 0;
184
+ }
185
+ function connectablePlugin(provider) {
186
+ const plugin = pluginCatalogRuntime.getDefinition(provider);
187
+ return plugin?.manifest.oauth ? plugin : void 0;
188
+ }
189
+ /** List OAuth plugins and the user's connection state for each one. */
190
+ async function listConnections(userId, userTokenStore) {
191
+ const plugins = pluginCatalogRuntime.getProviders().filter((plugin) => Boolean(plugin.manifest.oauth));
192
+ return await Promise.all(plugins.map(async (plugin) => {
193
+ const tokens = await readConnectedOAuthTokens(userId, plugin, userTokenStore);
194
+ const account = tokens?.account;
195
+ return {
196
+ provider: plugin.manifest.name,
197
+ displayName: plugin.manifest.displayName,
198
+ description: plugin.manifest.description,
199
+ connected: Boolean(tokens),
200
+ ...account ? { account: {
201
+ label: account.label ?? account.id,
202
+ ...account.url ? { url: account.url } : void 0
203
+ } } : void 0
204
+ };
205
+ }));
206
+ }
207
+ /** True when the provider is an installed plugin with user OAuth. */
208
+ function isConnectableProvider(provider) {
209
+ return Boolean(connectablePlugin(provider));
210
+ }
211
+ /**
212
+ * Start OAuth for a dashboard viewer and return the provider authorization URL.
213
+ * The callback stores tokens under the viewer's web actor id.
214
+ */
215
+ async function startConnection(provider, actor) {
216
+ let request;
217
+ const result = await startOAuthFlow(provider, {
218
+ actorId: actor.userId,
219
+ actor,
220
+ authorization: {
221
+ createState: async () => randomBytes(32).toString("hex"),
222
+ deliver: (next) => {
223
+ request = next;
224
+ }
225
+ }
226
+ });
227
+ if (!result.ok) return result;
228
+ if (!request) throw new Error("OAuth flow finished without an authorization request");
229
+ return {
230
+ ok: true,
231
+ authorizationUrl: request.authorizationUrl
232
+ };
233
+ }
234
+ /** Remove the user's stored connection for one provider. */
235
+ async function disconnectConnection(userId, provider, userTokenStore) {
236
+ await unlinkProvider(userId, provider, userTokenStore);
237
+ }
238
+ //#endregion
239
+ export { startConnection as a, deleteWebAuthorization as c, getPausedTurnRequest as d, wakeAuthorizedTurn as f, readConnectedOAuthTokens as i, getWebAuthorization as l, getTurnAuthorization as m, isConnectableProvider as n, unlinkProvider as o, wakePausedTurn as p, listConnections as r, createWebAuthorization as s, disconnectConnection as t, createPausedTurns as u };
@@ -1,4 +1,4 @@
1
- import { a as conversationTurnFailureReasonSchema, i as conversationTurnFailureCodeSchema, m as usageSchema } from "./history-Nte1oVed.js";
1
+ import { a as conversationTurnFailureReasonSchema, h as usageSchema, i as conversationTurnFailureCodeSchema } from "./history-9pO1Zd4Y.js";
2
2
  import { z } from "zod";
3
3
  import { codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, objectFactFields, objectTypeSchema } from "@sentry/junior-plugin-api";
4
4
  //#region src/chat/automations/card.ts
@@ -1,4 +1,4 @@
1
- import { p as logWarn } from "./logging-OpC2jwiV.js";
1
+ import { p as logWarn } from "./logging-C22RdmU8.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  //#region src/chat/conversation-privacy.ts
4
4
  const SAFE_METADATA_KEY_LIMIT = 20;
@@ -1,19 +1,19 @@
1
- import { Ft as createUserTokenStore, Mt as parseOAuthStatePayload, Nt as resolveBaseUrl, _ as resolvePluginOAuthAccount, d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, jt as formatProviderLabel, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, x as lookupSlackUserProfile, yt as getMcpProviderErrorAttributes } from "./agent-runner-CnlFtbzb.js";
2
- import { f as escapeXml } from "./client-CWQtbizj.js";
3
- import { d as logException, h as runBestEffort, p as logWarn } from "./logging-OpC2jwiV.js";
4
- import { a as getRuntimeMetadata, n as botConfig } from "./config-aitDvTQm.js";
1
+ import { Ft as createUserTokenStore, Mt as parseOAuthStatePayload, Nt as resolveBaseUrl, _ as resolvePluginOAuthAccount, d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, jt as formatProviderLabel, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, x as lookupSlackUserProfile, yt as getMcpProviderErrorAttributes } from "./agent-runner-CNiTpIpb.js";
2
+ import { f as escapeXml } from "./client-Q27hki0Y.js";
3
+ import { d as logException, h as runBestEffort, p as logWarn } from "./logging-C22RdmU8.js";
4
+ import { a as getRuntimeMetadata, n as botConfig } from "./config-Cb--Qs-g.js";
5
5
  import { f as parseSlackUserId } from "./actor-BTtLaeWy.js";
6
- import { A as upsertIdentity, f as getSqlExecutor, j as upsertLinkedIdentity } from "./viewer-CX41TWYr.js";
6
+ import { A as upsertIdentity, f as getSqlExecutor, j as upsertLinkedIdentity } from "./viewer-DdzigZQh.js";
7
7
  import { i as homeDir } from "./package-discovery-BVvSnQBB.js";
8
- import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-fpIZHoqE.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-CTBsdSam.js";
10
- import { t as discoverSkills } from "./skills-BgGiQt5Y.js";
11
- import { It as recordAuthenticationLinked, Lt as recordAuthorizationCompleted, Q as getTurnRecord, V as postSlackMessage } from "./tasks-DREdnhVP.js";
12
- import { Vt as getSlackClient } from "./agent-hooks-DWCHBPYw.js";
13
- import { E as acquireActiveLock, w as getStateAdapter } from "./profile-Dfg76pvk.js";
14
- import { i as getConversationPendingAuth } from "./pending-auth-D_nf121N.js";
15
- import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BoNCtSwk.js";
16
- import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-rDLlKIS0.js";
8
+ import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-BvsLuoLK.js";
9
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BQ3g3OX_.js";
10
+ import { t as discoverSkills } from "./skills-CVwSL6Gc.js";
11
+ import { It as recordAuthenticationLinked, Lt as recordAuthorizationCompleted, Q as getTurnRecord, V as postSlackMessage } from "./tasks-B8nH3ND_.js";
12
+ import { Vt as getSlackClient } from "./agent-hooks-CtZuJPTU.js";
13
+ import { E as acquireActiveLock, w as getStateAdapter } from "./profile-DK9umvav.js";
14
+ import { i as getConversationPendingAuth } from "./pending-auth-Bg3A1-pE.js";
15
+ import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BTOLzCM-.js";
16
+ import { c as deleteWebAuthorization, f as wakeAuthorizedTurn, i as readConnectedOAuthTokens, p as wakePausedTurn } from "./connections-DZ70JeSN.js";
17
17
  import { n as relayLocalOAuthCallback } from "./oauth-relay-CdCnu80W.js";
18
18
  import path from "node:path";
19
19
  import { z } from "zod";
@@ -437,12 +437,6 @@ function accountLabel(account) {
437
437
  function connectedAccountText(plugin, account) {
438
438
  return account ? `*${plugin.manifest.name}*\nConnected as ${accountLabel(account)}` : `*${plugin.manifest.name}*\n${plugin.manifest.description}`;
439
439
  }
440
- async function connectedOAuthTokens(userId, plugin, userTokenStore) {
441
- if (plugin.manifest.oauth || plugin.manifest.credentials) {
442
- const stored = await userTokenStore.get(userId, plugin.manifest.name);
443
- return stored && hasRequiredOAuthScope(stored.scope, plugin.manifest.oauth?.scope) ? stored : void 0;
444
- }
445
- }
446
440
  async function hasConnectedMcpAccount(userId, plugin) {
447
441
  if (!plugin.manifest.mcp) return false;
448
442
  const credentials = await getMcpStoredOAuthCredentials(userId, plugin.manifest.name);
@@ -456,7 +450,7 @@ async function buildHomeView(userId, userTokenStore) {
456
450
  const providers = pluginCatalogRuntime.getProviders();
457
451
  const connectedSections = [];
458
452
  for (const plugin of providers) {
459
- const tokens = await connectedOAuthTokens(userId, plugin, userTokenStore);
453
+ const tokens = await readConnectedOAuthTokens(userId, plugin, userTokenStore);
460
454
  if (!tokens && !await hasConnectedMcpAccount(userId, plugin)) continue;
461
455
  connectedSections.push({
462
456
  type: "section",
@@ -711,7 +705,8 @@ async function GET(request, provider, waitUntil, options) {
711
705
  } : void 0
712
706
  });
713
707
  }, "oauth.callback.authentication_event.failed", { "app.credential.provider": provider });
714
- if (stored.destination?.platform !== "local" && stored.source?.kind !== "web") waitUntil(async () => {
708
+ const webActor = stored.actor?.platform === "web";
709
+ if (stored.destination?.platform !== "local" && stored.source?.kind !== "web" && !webActor) waitUntil(async () => {
715
710
  try {
716
711
  await publishAppHomeView(getSlackClient(), stored.userId, userTokenStore);
717
712
  } catch {}
@@ -753,7 +748,7 @@ async function GET(request, provider, waitUntil, options) {
753
748
  }
754
749
  const botName = botConfig.userName;
755
750
  const statusMessage = stored.destination?.platform === "local" && !resumesWebTurn ? `Your request is continuing in the local ${botName} client.` : resumesWebTurn ? `Your request is continuing in ${botName}.` : resumesAgentTurn ? "Your request is being processed in Slack." : `Your ${providerLabel} account is connected.`;
756
- const footerMessage = stored.destination?.platform === "local" || resumesWebTurn ? `You can close this tab and return to ${botName}.` : "You can close this tab and return to Slack.";
751
+ const footerMessage = stored.destination?.platform === "local" || resumesWebTurn || webActor ? `You can close this tab and return to ${botName}.` : "You can close this tab and return to Slack.";
757
752
  return htmlCallbackResponse(escapeXml(`${providerLabel} account connected`), escapeXml(statusMessage), 200, { footerMessage: escapeXml(footerMessage) });
758
753
  }
759
754
  //#endregion
@@ -1,6 +1,6 @@
1
- import { d as logException } from "./logging-OpC2jwiV.js";
1
+ import { d as logException } from "./logging-C22RdmU8.js";
2
2
  import { g as startSpanManual } from "./sentry-CgWZM_kV.js";
3
- import "./config-aitDvTQm.js";
3
+ import "./config-Cb--Qs-g.js";
4
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-D_YoNnAn.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { sql } from "drizzle-orm";
@@ -37,6 +37,12 @@ function instructionProvenanceFor(actor) {
37
37
  actor
38
38
  } : { authority: "instruction" };
39
39
  }
40
+ /**
41
+ * Provenance of an instruction that an agent wrote, such as a parent agent
42
+ * task in a child Conversation. It has no Actor, so it never counts as user
43
+ * intent.
44
+ */
45
+ const agentInstructionProvenance = { authority: "instruction" };
40
46
  /** Unattributed ambient-context provenance for non-instruction messages. */
41
47
  const contextProvenance = { authority: "context" };
42
48
  function actorIdentityKey(actor) {
@@ -519,4 +525,4 @@ const newConversationEventSchema = z.object({
519
525
  createdAtMs: z.number().finite()
520
526
  }).strict();
521
527
  //#endregion
522
- export { conversationTurnFailureReasonSchema as a, newConversationEventSchema as c, instructionActors as d, instructionProvenanceFor as f, conversationTurnFailureCodeSchema as i, encodeHistoryPayload as l, usageSchema as m, agentHistoryItemSchema as n, decodeStoredConversationEvent as o, sameActorIdentity as p, conversationEventDataSchema as r, historyReplacementSchema as s, KNOWN_CONVERSATION_EVENT_TYPES as t, contextProvenance as u };
528
+ export { conversationTurnFailureReasonSchema as a, newConversationEventSchema as c, contextProvenance as d, instructionActors as f, usageSchema as h, conversationTurnFailureCodeSchema as i, encodeHistoryPayload as l, sameActorIdentity as m, agentHistoryItemSchema as n, decodeStoredConversationEvent as o, instructionProvenanceFor as p, conversationEventDataSchema as r, historyReplacementSchema as s, KNOWN_CONVERSATION_EVENT_TYPES as t, agentInstructionProvenance as u };
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-CnlFtbzb.js";
3
- import { f as getSqlExecutor } from "./viewer-CX41TWYr.js";
4
- import { L as detectImageMediaType } from "./conversation-Cjo9tHGm.js";
2
+ import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-CNiTpIpb.js";
3
+ import { f as getSqlExecutor } from "./viewer-DdzigZQh.js";
4
+ import { L as detectImageMediaType } from "./conversation-NutPJ8S8.js";
5
5
  //#region src/chat/attachments/images.ts
6
6
  var images_exports = /* @__PURE__ */ __exportAll({
7
7
  decodeInputImages: () => decodeInputImages,
@@ -1,6 +1,6 @@
1
- import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-OpC2jwiV.js";
1
+ import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-C22RdmU8.js";
2
2
  import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-CgWZM_kV.js";
3
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-BsqXHVBz.js";
3
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-BIDN1sW3.js";
4
4
  import { t as consumePrivateTraceResultMarker } from "./private-trace-result-BLvBjy_e.js";
5
5
  //#region src/chat/sentry-payload-filter.ts
6
6
  const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
@@ -1,4 +1,4 @@
1
- import { i as getChatConfig } from "./config-aitDvTQm.js";
1
+ import { i as getChatConfig } from "./config-Cb--Qs-g.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-CgWZM_kV.js";
2
- import { t as JUNIOR_VERSION } from "./version-ByV7nGOn.js";
2
+ import { t as JUNIOR_VERSION } from "./version-CkwwLVLb.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-B4FMCO8f.js";
2
- import { Bt as toolInvocationDestination, Q as getActiveAgentInvocationForConversation, Y as createAgentInvocationForMessage, Z as findChildAgentConversationId, _t as AgentMessageTargetError, vt as PARENT_AGENT_TARGET, zt as actorFromRun } from "./agent-runner-CnlFtbzb.js";
3
- import { n as enqueueAgentMessageToParent } from "./result-C1ZCRPLx.js";
4
- import { r as enqueueAgentInvocation } from "./work-CvFoEpRT.js";
2
+ import { Bt as toolInvocationDestination, Q as getActiveAgentInvocationForConversation, Y as createAgentInvocationForMessage, Z as findChildAgentConversationId, _t as AgentMessageTargetError, vt as PARENT_AGENT_TARGET, zt as actorFromRun } from "./agent-runner-CNiTpIpb.js";
3
+ import { n as enqueueAgentMessageToParent } from "./result-CcdQ2iau.js";
4
+ import { r as enqueueAgentInvocation } from "./work-qQEjtmlv.js";
5
5
  //#region src/chat/agent-invocations/message.ts
6
6
  var message_exports = /* @__PURE__ */ __exportAll({ bindMessageAgent: () => bindMessageAgent });
7
7
  /**
package/dist/nitro.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-OpC2jwiV.js";
1
+ import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-C22RdmU8.js";
2
2
  import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-BVvSnQBB.js";
3
- import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-DyA2AEnY.js";
3
+ import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-uGq6Grnt.js";
4
4
  import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-egKWjgue.js";
5
- import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-SWsXPSp-.js";
5
+ import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-C7cyjcVj.js";
6
6
  import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-CVvEUSMH.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 { Ft as createUserTokenStore } from "./agent-runner-CnlFtbzb.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DqZF735a.js";
1
+ import { Ft as createUserTokenStore } from "./agent-runner-CNiTpIpb.js";
2
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-CyAN-Gos.js";
3
3
  import { createServer } from "node:http";
4
4
  //#region src/chat/local/oauth-callback-server.ts
5
5
  const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
@@ -1,5 +1,5 @@
1
- import { v as isProviderRetryError } from "./client-CWQtbizj.js";
2
- import { Y as abandonTurnRecord, un as estimateTextTokens } from "./tasks-DREdnhVP.js";
1
+ import { v as isProviderRetryError } from "./client-Q27hki0Y.js";
2
+ import { Y as abandonTurnRecord, un as estimateTextTokens } from "./tasks-B8nH3ND_.js";
3
3
  import { r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
4
4
  import { z } from "zod";
5
5
  //#region src/chat/state/turn-id.ts
@@ -1,7 +1,7 @@
1
- import { S as toOptionalTrimmed } from "./client-CWQtbizj.js";
2
- import { v as setSpanAttributes, y as setSpanStatus } from "./logging-OpC2jwiV.js";
3
- import { i as getChatConfig } from "./config-aitDvTQm.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-CTBsdSam.js";
1
+ import { S as toOptionalTrimmed } from "./client-Q27hki0Y.js";
2
+ import { v as setSpanAttributes, y as setSpanStatus } from "./logging-C22RdmU8.js";
3
+ import { i as getChatConfig } from "./config-Cb--Qs-g.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BQ3g3OX_.js";
5
5
  import { createHash } from "node:crypto";
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
7
7
  import { createRedisState } from "@chat-adapter/state-redis";
@@ -1,4 +1,4 @@
1
- import { H as conversationBriefSchema, U as parseBriefInput, V as briefOutcomeStatusSchema } from "./conversation-Cjo9tHGm.js";
1
+ import { H as conversationBriefSchema, U as parseBriefInput, V as briefOutcomeStatusSchema } from "./conversation-NutPJ8S8.js";
2
2
  import { z } from "zod";
3
3
  //#region src/chat/briefs/generate.ts
4
4
  const MAX_INPUT_CHARS = 6e4;
@@ -1,4 +1,4 @@
1
- import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-OpC2jwiV.js";
1
+ import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-C22RdmU8.js";
2
2
  import { o as parseActorUserId } from "./actor-BTtLaeWy.js";
3
3
  import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-BVvSnQBB.js";
4
4
  import path from "node:path";
@@ -1,5 +1,5 @@
1
- import { v as setSpanAttributes, w as withSpan } from "./logging-OpC2jwiV.js";
2
- import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-Dfg76pvk.js";
1
+ import { v as setSpanAttributes, w as withSpan } from "./logging-C22RdmU8.js";
2
+ import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-DK9umvav.js";
3
3
  import { z } from "zod";
4
4
  import { FileSystem, Sandbox } from "@vercel/sandbox";
5
5
  //#region src/chat/sandbox/resources.ts
@@ -1,12 +1,12 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { $ as getAgentInvocation, X as createAgentInvocationFromLatest, ct as isTerminalAgentInvocation, et as getAgentInvocationIdForEvents, ft as markAgentInvocationParentMailboxAppended, it as getAgentInvocationResultMessageId, nt as getAgentInvocationIdForResult, st as getLatestAgentInvocationForConversation, tt as getAgentInvocationIdForMessage } from "./agent-runner-CnlFtbzb.js";
2
+ import { $ as getAgentInvocation, X as createAgentInvocationFromLatest, ct as isTerminalAgentInvocation, et as getAgentInvocationIdForEvents, ft as markAgentInvocationParentMailboxAppended, it as getAgentInvocationResultMessageId, nt as getAgentInvocationIdForResult, st as getLatestAgentInvocationForConversation, tt as getAgentInvocationIdForMessage } from "./agent-runner-CNiTpIpb.js";
3
3
  import { t as createActor } from "./actor-BTtLaeWy.js";
4
- import { d as credentialContextForActor } from "./registry-fpIZHoqE.js";
5
- import { $ as listTurnSummaries, Q as getTurnRecord } from "./tasks-DREdnhVP.js";
6
- import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-dyvsZDB0.js";
7
- import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-C7bRJ2vg.js";
8
- import { r as appendAndEnqueueInboundMessage } from "./store-OMQAFrJG.js";
9
- import { r as enqueueAgentInvocation } from "./work-CvFoEpRT.js";
4
+ import { d as credentialContextForActor } from "./registry-BvsLuoLK.js";
5
+ import { $ as listTurnSummaries, Q as getTurnRecord } from "./tasks-B8nH3ND_.js";
6
+ import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-DteRDRCi.js";
7
+ import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-kYP1FAX_.js";
8
+ import { r as appendAndEnqueueInboundMessage } from "./store-Dw3eBN9S.js";
9
+ import { r as enqueueAgentInvocation } from "./work-qQEjtmlv.js";
10
10
  import { z } from "zod";
11
11
  import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
12
12
  //#region src/chat/task-execution/mailbox-input.ts
@@ -221,7 +221,7 @@ function trustedSummary(invocation, agent) {
221
221
  */
222
222
  const RESULT_NEXT_STEP = {
223
223
  completed: "Use this result to continue the work in this conversation. Do not repeat work that the child agent already did.",
224
- blocked: "The child agent did not finish its task because something is missing. If you can give it, send it to the child agent with messageAgent. Otherwise tell the user what is missing.",
224
+ blocked: "The child agent did not finish its task because something is missing. If you can give it, send it to the child agent with messageAgent. If it needs user approval, your own text cannot give it: ask the user one focused question that names the exact action. After the user answers in this conversation, tell the child agent with messageAgent to try again. The runtime shows the user's own messages to the child's action review. Otherwise tell the user what is missing.",
225
225
  failed: "The child agent did not finish its task. If you still need this work, use messageAgent to ask the same child agent to try again, or tell the user what is blocked.",
226
226
  stopped: "The child agent was stopped before it finished. Do not start this work again unless the user asks."
227
227
  };
@@ -1,14 +1,14 @@
1
- import { C as withLogContext, b as setTags, d as logException } from "./logging-OpC2jwiV.js";
2
- import { c as getConversationEventStore, u as getConversationStore } from "./viewer-CX41TWYr.js";
3
- import { d as credentialContextForActor } from "./registry-fpIZHoqE.js";
4
- import { At as loadProjection, Gt as hydrateConversationMessages, J as saveTurnCheckpoint, Kt as persistConversationMessages, Lt as recordAuthorizationCompleted, Tt as commitAcceptedReply, an as markConversationMessage, en as buildConversationContext, ln as upsertConversationMessage, on as normalizeConversationText, sn as recordDeliveredAssistantMessage, tt as persistWithRetry } from "./tasks-DREdnhVP.js";
5
- import { K as messageCardText } from "./conversation-Cjo9tHGm.js";
1
+ import { C as withLogContext, b as setTags, d as logException } from "./logging-C22RdmU8.js";
2
+ import { c as getConversationEventStore, u as getConversationStore } from "./viewer-DdzigZQh.js";
3
+ import { d as credentialContextForActor } from "./registry-BvsLuoLK.js";
4
+ import { At as loadProjection, Gt as hydrateConversationMessages, J as saveTurnCheckpoint, Kt as persistConversationMessages, Lt as recordAuthorizationCompleted, Tt as commitAcceptedReply, an as markConversationMessage, en as buildConversationContext, ln as upsertConversationMessage, on as normalizeConversationText, sn as recordDeliveredAssistantMessage, tt as persistWithRetry } from "./tasks-B8nH3ND_.js";
5
+ import { K as messageCardText } from "./conversation-NutPJ8S8.js";
6
6
  import { f as markTurnFailed, p as startActiveTurn, t as authorizationId } from "./oauth-authorization-BA4Dt6a7.js";
7
- import { n as getAssistantReplyText } from "./assistant-reply-BxCi7V4v.js";
8
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-BOxv7shv.js";
9
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-cQFsZFOU.js";
10
- import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BoNCtSwk.js";
11
- import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-C6jrCPjc.js";
7
+ import { n as getAssistantReplyText } from "./assistant-reply-K5r1pcgJ.js";
8
+ import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-BbSyWmOq.js";
9
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DSN0xGW7.js";
10
+ import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BTOLzCM-.js";
11
+ import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-BwNfO8Xt.js";
12
12
  import { randomUUID } from "node:crypto";
13
13
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
14
14
  //#region src/chat/local/runner.ts
@@ -1,4 +1,4 @@
1
- import { At as sandboxEgressSignalsResponseSchema } from "./agent-runner-CnlFtbzb.js";
1
+ import { At as sandboxEgressSignalsResponseSchema } from "./agent-runner-CNiTpIpb.js";
2
2
  //#region src/chat/local/sandbox-egress-signals.ts
3
3
  const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
4
4
  const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
@@ -1,5 +1,5 @@
1
1
  import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-D_YoNnAn.js";
2
- import { D as conversationUsageSchema, E as conversationSummaryReportSchema, M as conversationChildAgentTotalsSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-Cjo9tHGm.js";
2
+ import { D as conversationUsageSchema, E as conversationSummaryReportSchema, M as conversationChildAgentTotalsSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-NutPJ8S8.js";
3
3
  import "./automation-gznOMaQ2.js";
4
4
  import { a as fillUtcHours, c as sumUtcHoursIntoSixHours, i as fillUtcDays } from "./web-message-id-xPI_EFSC.js";
5
5
  import { z } from "zod";
@@ -152,6 +152,22 @@ const codePersonReportSchema = z.object({
152
152
  windowStart: z.string()
153
153
  }).strict();
154
154
  //#endregion
155
+ //#region src/api/schema/connection.ts
156
+ const connectionSchema = z.object({
157
+ provider: z.string(),
158
+ displayName: z.string(),
159
+ description: z.string(),
160
+ account: z.object({
161
+ label: z.string(),
162
+ url: z.string().optional()
163
+ }).strict().optional(),
164
+ connected: z.boolean()
165
+ }).strict();
166
+ const connectionListSchema = z.object({ connections: z.array(connectionSchema) }).strict();
167
+ const connectionParamsSchema = z.object({ provider: z.string().regex(/^[a-z][a-z0-9-]*$/).max(64) }).strict();
168
+ const startConnectionResponseSchema = z.object({ authorizationUrl: z.string().url() }).strict();
169
+ const disconnectConnectionResponseSchema = z.object({ disconnected: z.literal(true) }).strict();
170
+ //#endregion
155
171
  //#region src/api/activity.ts
156
172
  const dailyConversationActivitySchema = z.object({
157
173
  active: z.number(),
@@ -400,4 +416,4 @@ const statsReportSchema = z.object({
400
416
  windowStart: z.string()
401
417
  }).strict();
402
418
  //#endregion
403
- export { codeChangeSummarySchema as A, locationParamsSchema as C, dailyConversationActivitySchema as D, activitySixHours as E, codeRepositorySummarySchema as F, conversationChildAgentSchema as I, conversationChildAgentsReportSchema as L, codePersonReportSchema as M, codeRepositoryParamsSchema as N, codeActivityDaySchema as O, codeRepositoryReportSchema as P, stopConversationTurnResponseSchema as R, locationDirectoryReportSchema as S, activityHours as T, actorProfileReportSchema as _, workspaceBodySchema as a, locationActivityDayReportSchema as b, workspaceRepoSchema as c, createdPersonalTokenSchema as d, personalTokenListSchema as f, actorDirectoryReportSchema as g, revokePersonalTokenResponseSchema as h, deleteWorkspaceResponseSchema as i, codeOverviewReportSchema as j, codeChangeSummaryReportSchema as k, workspaceSchema as l, personalTokenParamsSchema as m, statsReportSchema as n, workspaceListSchema as o, personalTokenMetadataSchema as p, baselineSnapshotSchema as r, workspaceParamsSchema as s, statSchema as t, createPersonalTokenBodySchema as u, personParamsSchema as v, activityDays as w, locationDetailReportSchema as x, personalSpendReportSchema as y, apiErrorSchema as z };
419
+ export { connectionSchema as A, codeRepositorySummarySchema as B, locationParamsSchema as C, dailyConversationActivitySchema as D, activitySixHours as E, codeChangeSummarySchema as F, conversationChildAgentsReportSchema as H, codeOverviewReportSchema as I, codePersonReportSchema as L, startConnectionResponseSchema as M, codeActivityDaySchema as N, connectionListSchema as O, codeChangeSummaryReportSchema as P, codeRepositoryParamsSchema as R, locationDirectoryReportSchema as S, activityHours as T, stopConversationTurnResponseSchema as U, conversationChildAgentSchema as V, apiErrorSchema as W, actorProfileReportSchema as _, workspaceBodySchema as a, locationActivityDayReportSchema as b, workspaceRepoSchema as c, createdPersonalTokenSchema as d, personalTokenListSchema as f, actorDirectoryReportSchema as g, revokePersonalTokenResponseSchema as h, deleteWorkspaceResponseSchema as i, disconnectConnectionResponseSchema as j, connectionParamsSchema as k, workspaceSchema as l, personalTokenParamsSchema as m, statsReportSchema as n, workspaceListSchema as o, personalTokenMetadataSchema as p, baselineSnapshotSchema as r, workspaceParamsSchema as s, statSchema as t, createPersonalTokenBodySchema as u, personParamsSchema as v, activityDays as w, locationDetailReportSchema as x, personalSpendReportSchema as y, codeRepositoryReportSchema as z };
@@ -1,16 +1,16 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { d as logException, f as logInfo, p as logWarn } from "./logging-OpC2jwiV.js";
3
- import { n as botConfig } from "./config-aitDvTQm.js";
4
- import { f as getSqlExecutor, u as getConversationStore } from "./viewer-CX41TWYr.js";
2
+ import { d as logException, f as logInfo, p as logWarn } from "./logging-C22RdmU8.js";
3
+ import { n as botConfig } from "./config-Cb--Qs-g.js";
4
+ import { f as getSqlExecutor, u as getConversationStore } from "./viewer-DdzigZQh.js";
5
5
  import { s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
6
- import "./executor-oIZAkQZb.js";
7
- import { p as credentialSubjectSchema } from "./registry-fpIZHoqE.js";
8
- import { V as postSlackMessage, _t as isToolResultError, ht as isAssistantMessage, vt as isToolResultMessage, wt as ToolInputError, yt as normalizeToolNameFromResult } from "./tasks-DREdnhVP.js";
9
- import { nt as verifyTimerWatchCredentialSubject, rt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins } from "./agent-hooks-DWCHBPYw.js";
10
- import { w as getStateAdapter } from "./profile-Dfg76pvk.js";
11
- import { r as sanitizeAssistantText } from "./assistant-reply-BxCi7V4v.js";
12
- import { r as EVENT_AUTHOR_ID } from "./prompt-C7bRJ2vg.js";
13
- import { r as appendAndEnqueueInboundMessage } from "./store-OMQAFrJG.js";
6
+ import "./executor-D8y7v95s.js";
7
+ import { p as credentialSubjectSchema } from "./registry-BvsLuoLK.js";
8
+ import { V as postSlackMessage, _t as isToolResultError, ht as isAssistantMessage, vt as isToolResultMessage, wt as ToolInputError, yt as normalizeToolNameFromResult } from "./tasks-B8nH3ND_.js";
9
+ import { nt as verifyTimerWatchCredentialSubject, rt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins } from "./agent-hooks-CtZuJPTU.js";
10
+ import { w as getStateAdapter } from "./profile-DK9umvav.js";
11
+ import { r as sanitizeAssistantText } from "./assistant-reply-K5r1pcgJ.js";
12
+ import { r as EVENT_AUTHOR_ID } from "./prompt-kYP1FAX_.js";
13
+ import { r as appendAndEnqueueInboundMessage } from "./store-Dw3eBN9S.js";
14
14
  import { z } from "zod";
15
15
  import { eq, inArray } from "drizzle-orm";
16
16
  import { eventMatchSchema, normalizeEventIdentifier, objectTypeSchema } from "@sentry/junior-plugin-api";
@@ -355,6 +355,7 @@ function renderTaskInput(args) {
355
355
  if (!instructions) throw new Error("Task instructions are required");
356
356
  const about = args.about?.trim();
357
357
  const creator = args.creator?.trim();
358
+ const people = (args.people ?? []).map((person) => oneLine(person)).filter(Boolean);
358
359
  const lines = [
359
360
  "[task]",
360
361
  "",
@@ -362,6 +363,7 @@ function renderTaskInput(args) {
362
363
  "",
363
364
  ...about ? [`About: ${oneLine(about)}`] : [],
364
365
  ...creator ? [`Created by: ${oneLine(creator)}. "Me" and "my" in the instructions mean this person: mention them in the message. If the instructions do not say "me" or "my", do not mention this person.`] : [],
366
+ ...people.length > 0 ? [`People involved: ${people.join(", ")}`] : [],
365
367
  `Instructions: ${instructions}`
366
368
  ];
367
369
  const guidance = args.guidance?.trim();
@@ -629,10 +631,11 @@ const EVENT_WAIT_MS = 3e4;
629
631
  * Keep this short: facts the model cannot reconstruct, plus a one-line handling
630
632
  * contract. Stable delivery rules live in runtime and docs, not this prompt.
631
633
  */
632
- function renderEventNotificationText(subscription, event) {
633
- const guidance = eventGuidance(getEventCatalog(), event.namespace, subscription.resourceType, event.eventType);
634
+ function renderEventNotificationText(subscription, event, people = []) {
635
+ const guidance = [eventGuidance(getEventCatalog(), event.namespace, subscription.resourceType, event.eventType), subscription.guidance?.[event.eventType]].filter((text) => Boolean(text?.trim())).join(" ");
634
636
  return renderTaskInput({
635
637
  about: subscription.label,
638
+ people,
636
639
  instructions: subscription.intent,
637
640
  guidance,
638
641
  trustedSummary: event.trustedSummary,
@@ -728,7 +731,7 @@ async function enqueueEventNotification(args) {
728
731
  });
729
732
  return { status: "duplicate" };
730
733
  }
731
- const text = renderEventNotificationText(args.subscription, args.event);
734
+ const text = renderEventNotificationText(args.subscription, args.event, args.people);
732
735
  return await appendAndEnqueueInboundMessage({
733
736
  message: createEventInboundMessage({
734
737
  event: args.event,
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { p as logWarn } from "./logging-OpC2jwiV.js";
2
+ import { p as logWarn } from "./logging-C22RdmU8.js";
3
3
  import { s as skillRoots } from "./package-discovery-BVvSnQBB.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-CTBsdSam.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BQ3g3OX_.js";
5
5
  import path from "node:path";
6
6
  import { z } from "zod";
7
7
  import fs from "node:fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { Bt as toolInvocationDestination, zt as actorFromRun } from "./agent-runner-CnlFtbzb.js";
3
- import { n as createAndEnqueueAgentInvocation } from "./work-CvFoEpRT.js";
2
+ import { Bt as toolInvocationDestination, zt as actorFromRun } from "./agent-runner-CNiTpIpb.js";
3
+ import { n as createAndEnqueueAgentInvocation } from "./work-qQEjtmlv.js";
4
4
  //#region src/chat/agent-invocations/spawn.ts
5
5
  var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
6
6
  /** Bind a Run's Actor and credentials to new Agent invocations. */
@@ -1,10 +1,10 @@
1
- import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-OpC2jwiV.js";
2
- import { i as getChatConfig } from "./config-aitDvTQm.js";
1
+ import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-C22RdmU8.js";
2
+ import { i as getChatConfig } from "./config-Cb--Qs-g.js";
3
3
  import { s as parseStoredSlackActor } from "./actor-BTtLaeWy.js";
4
- import { F as sameDestination, N as parseDestination, u as getConversationStore } from "./viewer-CX41TWYr.js";
5
- import { rt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-DWCHBPYw.js";
6
- import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-Dfg76pvk.js";
7
- import "./job-queue-DyA2AEnY.js";
4
+ import { F as sameDestination, N as parseDestination, u as getConversationStore } from "./viewer-DdzigZQh.js";
5
+ import { rt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-CtZuJPTU.js";
6
+ import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-DK9umvav.js";
7
+ import "./job-queue-uGq6Grnt.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 { p as logWarn } from "./logging-OpC2jwiV.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-DyA2AEnY.js";
1
+ import { p as logWarn } from "./logging-C22RdmU8.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-uGq6Grnt.js";
3
3
  import { z } from "zod";
4
4
  import { createHash } from "node:crypto";
5
5
  import { handleCallback, registerDevConsumer } from "@vercel/queue";
@@ -115,7 +115,7 @@ function pluginTaskCallback() {
115
115
  maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
116
116
  onRejected: logPluginTaskQueueMessageRejected,
117
117
  run: async (message) => {
118
- const { processPluginTask } = await import("./task-runner-BOxv7shv.js").then((n) => n.r);
118
+ const { processPluginTask } = await import("./task-runner-BbSyWmOq.js").then((n) => n.r);
119
119
  await processPluginTask(message);
120
120
  },
121
121
  topic: PLUGIN_TASK_QUEUE_TOPIC,