@sentry/junior 0.276.0 → 0.278.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 (80) hide show
  1. package/dist/{adapter-DoPR2jS-.js → adapter-BXosqTMx.js} +1 -1
  2. package/dist/{admin-BJTT-kXb.js → admin-Thn7NfOi.js} +1 -1
  3. package/dist/{agent-invocations-CUWrrzkc.js → agent-invocations-D7c4BQGc.js} +6 -2
  4. package/dist/{agent-runner-sMpA5qGM.js → agent-runner-DE-43MPb.js} +396 -877
  5. package/dist/api/schema.d.ts +2 -2
  6. package/dist/api/schema.js +5 -5
  7. package/dist/api.d.ts +13 -2
  8. package/dist/api.js +132 -61
  9. package/dist/{app-DTj-yAQt.d.ts → app-CHNS-AX2.d.ts} +6 -27
  10. package/dist/app.d.ts +3 -3
  11. package/dist/app.js +65 -57
  12. package/dist/{assistant-reply-DbxKnBQF.js → assistant-reply-pauL6qyn.js} +28 -6
  13. package/dist/{automation-B8_mC68r.js → automation-DphoTRYl.js} +1 -1
  14. package/dist/{background-compaction-queue-Bywqo1WJ.js → background-compaction-queue-CAL4A2y7.js} +2 -2
  15. package/dist/{briefs-IL7QnCCR.js → briefs-4fyPJJEu.js} +5 -6
  16. package/dist/{catalog-runtime--sC2CYLQ.js → catalog-runtime-BoOb5oUv.js} +1 -1
  17. package/dist/cli/chat.d.ts +1 -1
  18. package/dist/cli/chat.js +14 -14
  19. package/dist/cli/check.js +3 -3
  20. package/dist/cli/init.js +0 -2
  21. package/dist/cli/main.js +3 -3
  22. package/dist/cli/plugins.d.ts +1 -1
  23. package/dist/cli/plugins.js +4 -4
  24. package/dist/cli/snapshot-create.js +4 -4
  25. package/dist/cli/upgrade.d.ts +2 -2
  26. package/dist/cli/upgrade.js +3 -3
  27. package/dist/{client-7diKvInp.js → client-v_OVYuHZ.js} +3 -3
  28. package/dist/{config-Cb--cuv-.js → config-o2jLRY5J.js} +24 -99
  29. package/dist/{connections-C4-4fxaE.js → connections-RC4NXAx8.js} +10 -10
  30. package/dist/{conversation-DppJ83Hw.js → conversation-CZfyQvdm.js} +54 -109
  31. package/dist/{conversation-privacy-DTwdT3Pi.js → conversation-privacy-C23M8KaD.js} +1 -1
  32. package/dist/{credential-sync-Sl5RQCkS.js → credential-sync-Dd0WyNfF.js} +13 -13
  33. package/dist/{db-Ck6TXQIx.d.ts → db-BjLzDJCt.d.ts} +1 -1
  34. package/dist/{executor-BFKmqxYe.js → executor-CJfsD0VX.js} +13 -5
  35. package/dist/instrumentation.js +2 -2
  36. package/dist/{logging-B04X_eCB.js → logging-dFaXvBRK.js} +4 -2
  37. package/dist/{media-DstkkoNP.js → media-DTAA8Qs_.js} +21 -23
  38. package/dist/{message-DQMFyyE-.js → message-DSwxIZet.js} +22 -28
  39. package/dist/nitro.d.ts +2 -2
  40. package/dist/nitro.js +7 -3
  41. package/dist/{oauth-callback-server-BGq0_vQI.js → oauth-callback-server-CDcuCp27.js} +2 -2
  42. package/dist/{plugins-B_0Cr0MO.d.ts → plugins-DtmjkTza.d.ts} +1 -0
  43. package/dist/{projection-6dXaN0n-.js → projection-BTge9wrH.js} +5426 -5300
  44. package/dist/{prompt-B4fQKGZR.js → prompt-DDtCnlHP.js} +1 -1
  45. package/dist/{registry-CEqKR_ld.js → registry-Cp6CNmtP.js} +24 -8
  46. package/dist/{resolve-8I5DkrfI.js → resolve-B_7h2cXx.js} +3 -3
  47. package/dist/{result-BgAW90IM.js → result-5LBEfnLX.js} +9 -9
  48. package/dist/{runner-CSKDr_19.js → runner-C5-S4oq-.js} +11 -11
  49. package/dist/{sandbox-egress-signals-BxAT276e.js → sandbox-egress-signals-B4GehT1L.js} +1 -1
  50. package/dist/{schema-Cal-EFdi.js → schema-B5fpczDw.js} +82 -4
  51. package/dist/{schema-CaUWl2EV.d.ts → schema-Tr484cCC.d.ts} +935 -688
  52. package/dist/{service-account-CUuVJCKT.js → service-account-BkEv20zf.js} +3 -3
  53. package/dist/{service-account-CtOab1Xz.js → service-account-Cq_dLrZJ.js} +3 -3
  54. package/dist/{session-stop-DK8LuPZW.js → session-stop-BsS4qFS2.js} +26 -16
  55. package/dist/{skills-Bc0D7BGy.js → skills-M0BA0_s6.js} +2 -2
  56. package/dist/{spawn-DF_GUcd8.js → spawn-BO3y7H4d.js} +2 -3
  57. package/dist/{stop-DthSy-z8.js → stop-D5R82Wla.js} +612 -186
  58. package/dist/{store-C5uVTx2G.js → store-BGBzQWNf.js} +9 -16
  59. package/dist/{store-BgH2P3X9.js → store-CGJZTEVz.js} +3 -3
  60. package/dist/{task-queue-C6ROM_XJ.js → task-queue-UD27ei2U.js} +3 -3
  61. package/dist/{task-runner-BwAkjjVE.js → task-runner-noxjOjkM.js} +7 -7
  62. package/dist/{thread-state-BXjgk1pW.js → thread-state-BSu6rM6p.js} +4 -4
  63. package/dist/{turn-failure-response-CVI57qKL.js → turn-failure-response-wahwyPrZ.js} +7 -7
  64. package/dist/{turn-lifecycle-CF6ibonp.js → turn-lifecycle-Bo4Trccw.js} +1 -1
  65. package/dist/{turn-session-routing-DddybdNu.js → turn-session-routing-DnSaaEpn.js} +10 -10
  66. package/dist/{validation-BxF1nQbC.js → validation-B9-8iKyw.js} +1 -1
  67. package/dist/{version-CTzSbCmR.js → version-C7HejFP2.js} +1 -1
  68. package/dist/version.js +1 -1
  69. package/dist/{viewer-CQwBszc7.js → viewer-DLXajQZE.js} +94 -28
  70. package/dist/{work-BHlShEQ6.js → work-DRGSlfia.js} +12 -17
  71. package/dist/{worker-DhY9MnsH.js → worker-BGh5Dwc6.js} +6 -6
  72. package/migrations/0074_conversation_participant_pins.sql +1 -0
  73. package/migrations/0075_conversation_detail_version.sql +1 -0
  74. package/migrations/0076_conversation_auto_archive.sql +5 -0
  75. package/migrations/meta/0074_snapshot.json +4076 -0
  76. package/migrations/meta/0075_snapshot.json +4083 -0
  77. package/migrations/meta/0076_snapshot.json +4147 -0
  78. package/migrations/meta/_journal.json +21 -0
  79. package/package.json +5 -5
  80. package/dist/model-profile-B998sjVd.js +0 -67
@@ -1,7 +1,7 @@
1
- import { H as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-B04X_eCB.js";
2
- import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-CEqKR_ld.js";
1
+ import { W as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-dFaXvBRK.js";
2
+ import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-Cp6CNmtP.js";
3
3
  import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS } from "./locks-D-0h111u.js";
4
- import { r as getStateAdapter } from "./adapter-DoPR2jS-.js";
4
+ import { r as getStateAdapter } from "./adapter-BXosqTMx.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { randomUUID } from "node:crypto";
7
7
  import { UnauthorizedError, auth } from "@modelcontextprotocol/sdk/client/auth.js";
@@ -1,6 +1,6 @@
1
- import { n as pluginCatalogRuntime } from "./catalog-runtime--sC2CYLQ.js";
2
- import { t as disconnectStateAdapter } from "./adapter-DoPR2jS-.js";
3
- import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-CUuVJCKT.js";
1
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BoOb5oUv.js";
2
+ import { t as disconnectStateAdapter } from "./adapter-BXosqTMx.js";
3
+ import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-BkEv20zf.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,17 +1,17 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { $r as postSlackMessage, Bn as getPlugins, Hr as formatSlackLink, I as normalizeConversationText, In as getPluginSlackConversationLink, Ua as buildSentryConversationUrl, Ur as normalizeSlackReplyMarkdown, Vr as escapeSlackMrkdwnText, an as normalizeToolNameFromResult, ca as getDashboardConversationLink, en as isAssistantMessage, in as isToolResultMessage, la as getDashboardObjectIconLink, pa as ToolInputError, qi as verifyTimerWatchCredentialSubject, rn as isToolResultError, sa as JUNIOR_THREAD_STATE_TTL_MS } from "./projection-6dXaN0n-.js";
3
- import { n as botConfig } from "./config-Cb--cuv-.js";
4
- import { h as logWarn, m as logInfo, p as logException } from "./logging-B04X_eCB.js";
5
- import { C as getSqlExecutor, M as SYSTEM_IDENTITY_ID, x as getConversationStore } from "./viewer-CQwBszc7.js";
6
- import { s as juniorConversations } from "./agent-invocations-CUWrrzkc.js";
7
- import "./executor-BFKmqxYe.js";
8
- import { h as credentialSubjectSchema } from "./registry-CEqKR_ld.js";
9
- import { r as getStateAdapter } from "./adapter-DoPR2jS-.js";
10
- import { K as readMessageAttachments } from "./conversation-DppJ83Hw.js";
11
- import { r as EVENT_AUTHOR_ID } from "./prompt-B4fQKGZR.js";
12
- import { r as sanitizeAssistantText } from "./assistant-reply-DbxKnBQF.js";
13
- import { r as appendAndEnqueueInboundMessage } from "./store-BgH2P3X9.js";
14
- import { dt as CORE_EVENT_NAMESPACE, ht as eventGuidance, mt as eventCatalogEntry } from "./turn-session-routing-DddybdNu.js";
2
+ import { Br as getDashboardObjectIconLink, Ln as getPlugins, Lr as verifyTimerWatchCredentialSubject, N as normalizeConversationText, Nn as getPluginSlackConversationLink, Rr as JUNIOR_THREAD_STATE_TTL_MS, Wr as ToolInputError, Zt as isAssistantMessage, _i as escapeSlackMrkdwnText, en as isToolResultError, ki as postSlackMessage, nn as normalizeToolNameFromResult, qa as buildSentryConversationUrl, tn as isToolResultMessage, vi as formatSlackLink, yi as normalizeSlackReplyMarkdown, zr as getDashboardConversationLink } from "./projection-BTge9wrH.js";
3
+ import { n as botConfig } from "./config-o2jLRY5J.js";
4
+ import { h as logWarn, m as logInfo, p as logException } from "./logging-dFaXvBRK.js";
5
+ import { C as getSqlExecutor, F as SYSTEM_IDENTITY_ID, J as nextDetailVersion, x as getConversationStore } from "./viewer-DLXajQZE.js";
6
+ import { s as juniorConversations } from "./agent-invocations-D7c4BQGc.js";
7
+ import "./executor-CJfsD0VX.js";
8
+ import { h as credentialSubjectSchema } from "./registry-Cp6CNmtP.js";
9
+ import { r as getStateAdapter } from "./adapter-BXosqTMx.js";
10
+ import { R as readMessageAttachments } from "./conversation-CZfyQvdm.js";
11
+ import { r as EVENT_AUTHOR_ID } from "./prompt-DDtCnlHP.js";
12
+ import { a as QUIET_MARKER, r as sanitizeAssistantText } from "./assistant-reply-pauL6qyn.js";
13
+ import { r as appendAndEnqueueInboundMessage } from "./store-CGJZTEVz.js";
14
+ import { dt as CORE_EVENT_NAMESPACE, ht as eventGuidance, mt as eventCatalogEntry } from "./turn-session-routing-DnSaaEpn.js";
15
15
  import { z } from "zod";
16
16
  import { eq, inArray } from "drizzle-orm";
17
17
  import { agentEventKeys, eventMatchFieldsSchema, objectFactFields, objectPresentation, objectTypeSchema } from "@sentry/junior-plugin-api";
@@ -715,10 +715,17 @@ async function maybePostAutomatedTurnLimitNotice(args) {
715
715
  */
716
716
  /**
717
717
  * Shared closing lines. Automations pass outcomes and end with a declared
718
- * result. Watches follow the Conversation's reply rules.
718
+ * result. Watches follow the Conversation's reply rules. A Watch reply goes
719
+ * only to the Conversation, so a question asked in the provider must also get
720
+ * its answer there. Watch instructions often say to stay silent, so this rule
721
+ * sits in the contract, not in plugin guidance.
719
722
  */
720
723
  function replyContractLines(outcomes) {
721
- if (!outcomes) return ["When you reply, follow any reply format in the instructions."];
724
+ if (!outcomes) return [
725
+ "When an Event asks you a question, answer it where it was asked, with that provider's tool. Then reply with the answer and a link to it.",
726
+ "When you reply, follow any reply format in the instructions.",
727
+ `When the outcome needs nobody's attention, such as a routine fix that worked or feedback that you handled, end the reply with exactly ${QUIET_MARKER}. The reply stays in the Conversation but notifies nobody. Do not use it when a person must decide or act, or when something failed.`
728
+ ];
722
729
  return [`End with \`${FINISH_AUTOMATION_RUN_TOOL_NAME}\`.`];
723
730
  }
724
731
  function verifiedDetailsJson(details) {
@@ -1406,7 +1413,10 @@ var session_stop_exports = /* @__PURE__ */ __exportAll({
1406
1413
  */
1407
1414
  async function markConversationsStopped(conversationIds, nowMs = Date.now()) {
1408
1415
  if (conversationIds.length === 0) return;
1409
- await getSqlExecutor().db().update(juniorConversations).set({ stoppedAt: new Date(nowMs) }).where(inArray(juniorConversations.conversationId, [...conversationIds]));
1416
+ await getSqlExecutor().db().update(juniorConversations).set({
1417
+ stoppedAt: new Date(nowMs),
1418
+ detailVersion: nextDetailVersion
1419
+ }).where(inArray(juniorConversations.conversationId, [...conversationIds]));
1410
1420
  }
1411
1421
  /** Return when a Conversation's session was last stopped. */
1412
1422
  async function getConversationStoppedAtMs(conversationId) {
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { h as logWarn } from "./logging-B04X_eCB.js";
2
+ import { h as logWarn } from "./logging-dFaXvBRK.js";
3
3
  import { s as skillRoots } from "./package-discovery-DJBompdd.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime--sC2CYLQ.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BoOb5oUv.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 { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-sMpA5qGM.js";
3
- import { n as createAndEnqueueAgentInvocation } from "./work-BHlShEQ6.js";
2
+ import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-DE-43MPb.js";
3
+ import { n as createAndEnqueueAgentInvocation } from "./work-DRGSlfia.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. */
@@ -18,7 +18,6 @@ function bindSpawnAgent(run, options) {
18
18
  destination: toolInvocationDestination(run),
19
19
  idempotencyKey: `${run.turnId}:${call.toolCallId}`,
20
20
  input: input.task,
21
- modelProfile: input.profile,
22
21
  parentConversationId: run.conversationId,
23
22
  parentToolCallId: call.toolCallId,
24
23
  ...input.reasoningLevel ? { reasoningLevel: input.reasoningLevel } : void 0,