@sentry/junior 0.297.0 → 0.298.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 (70) hide show
  1. package/dist/{admin-tmGIw4KS.js → admin-BF3DbYGf.js} +2 -2
  2. package/dist/{agent-runner-CneTquAE.js → agent-runner-Q9GkoerG.js} +99 -46
  3. package/dist/api/schema.d.ts +1 -1
  4. package/dist/api/schema.js +4 -4
  5. package/dist/api.d.ts +1 -1
  6. package/dist/api.js +31 -31
  7. package/dist/{app-BJojZ7HL.d.ts → app-DOg_mCtV.d.ts} +2 -2
  8. package/dist/app.d.ts +1 -1
  9. package/dist/app.js +33 -33
  10. package/dist/{automation-BrP6ImrC.js → automation-Cn8qmbdr.js} +1 -1
  11. package/dist/{background-compaction-queue-CwfJy3Cd.js → background-compaction-queue-BZhGFOK6.js} +3 -3
  12. package/dist/{briefs-uFTuhMqA.js → briefs-CQrCRF6-.js} +3 -3
  13. package/dist/{catalog-runtime-0kuQqYL4.js → catalog-runtime-DZeD2WbL.js} +1 -1
  14. package/dist/cli/chat.js +15 -15
  15. package/dist/cli/check.js +3 -3
  16. package/dist/cli/main.js +3 -3
  17. package/dist/cli/plugins.js +4 -4
  18. package/dist/cli/snapshot-create.js +4 -4
  19. package/dist/cli/upgrade.d.ts +1 -1
  20. package/dist/cli/upgrade.js +3 -3
  21. package/dist/{config-Dj9M_nqB.js → config-BOByVnxe.js} +2 -2
  22. package/dist/{connections-B96JUM5o.js → connections-BNN5cJam.js} +6 -6
  23. package/dist/{conversation-CvcBU1z2.js → conversation-DCkzvxqB.js} +50 -2
  24. package/dist/{conversation-feed-BSMlGZnS.js → conversation-feed-CMA12Rjs.js} +1 -1
  25. package/dist/{conversation-privacy-DI29jbZV.js → conversation-privacy-C0eRxsgb.js} +1 -1
  26. package/dist/{conversation-turn-CZWBr091.js → conversation-turn-D9qvcDX6.js} +18 -18
  27. package/dist/{credential-sync-Blhx4_xf.js → credential-sync-B_iUpxGL.js} +14 -14
  28. package/dist/{db-Br0tfAo7.js → db-CoMNr2Zm.js} +3 -3
  29. package/dist/{db-CrtyFRz7.d.ts → db-DoMcnYol.d.ts} +1 -1
  30. package/dist/{executor-BMPipFVA.js → executor-C-m8VrzX.js} +2 -2
  31. package/dist/instrumentation.js +2 -2
  32. package/dist/{logging-CQjlDQYX.js → logging-CJTi5niy.js} +1 -1
  33. package/dist/{message-BOZEIuxy.js → message-Q6_5DAWR.js} +9 -9
  34. package/dist/nitro.d.ts +1 -1
  35. package/dist/nitro.js +3 -3
  36. package/dist/{notification-gusCgdQ6.js → notification-Bv25xbj0.js} +9 -9
  37. package/dist/{oauth-callback-server-V_DuMuNX.js → oauth-callback-server-CH5XAyo-.js} +2 -2
  38. package/dist/{projection-B08mfi0u.js → projection-BgwEE36_.js} +11 -11
  39. package/dist/{prompt-BlutWLNt.js → prompt-DXc9DYT9.js} +4 -4
  40. package/dist/{prompt-input-Dxn8cDC0.js → prompt-input-BUr4J9RO.js} +7 -7
  41. package/dist/{registry-BDWgCJDf.js → registry-9XwqSnM-.js} +1 -1
  42. package/dist/{resolve-2Z_o_SsI.js → resolve-DUIAbcRL.js} +3 -3
  43. package/dist/{result-CAujiaci.js → result-C2Vn8QGn.js} +10 -10
  44. package/dist/{runner-D2Chc02N.js → runner-CXGtw-Mc.js} +9 -9
  45. package/dist/{sandbox-egress-signals-CFoJduFj.js → sandbox-egress-signals-Di3S_dO7.js} +1 -1
  46. package/dist/{schema-Ce2XCS7O.d.ts → schema-BnbZ-rKv.d.ts} +6 -0
  47. package/dist/{schema-Bqa5NbcP.js → schema-Dyp7racy.js} +3 -3
  48. package/dist/{service-account-CERfXEVU.js → service-account-DM3KBBeG.js} +3 -3
  49. package/dist/{service-account-C9kRQEb_.js → service-account-GzAMUQ8a.js} +3 -3
  50. package/dist/{session-stop-B-I1rAS1.js → session-stop-D4i7e6iT.js} +5 -5
  51. package/dist/{skills-B0m1nZ_j.js → skills-DCK9SD_l.js} +2 -2
  52. package/dist/{spawn-CwMjRRtn.js → spawn-6cX6xE9G.js} +5 -5
  53. package/dist/{state-DFnmLmfn.js → state-CSuA2J1V.js} +2 -2
  54. package/dist/{stop-BCH9VNGf.js → stop-Dh2DfwpK.js} +33 -31
  55. package/dist/{store-B59rOYbS.js → store-B1zepKG8.js} +3 -3
  56. package/dist/{store-m5bmdmsP.js → store-DrA17Fbz.js} +9 -9
  57. package/dist/{task-queue-N0kuCknH.js → task-queue-D1rXWfFN.js} +3 -3
  58. package/dist/{task-runner-COOwR8qm.js → task-runner-CT4M8oDz.js} +8 -8
  59. package/dist/{thread-context-Cd44z_W5.js → thread-context-DnqUkbzN.js} +7 -7
  60. package/dist/{turn-cancel-DDu8TOwt.js → turn-cancel-l460pfGW.js} +6 -6
  61. package/dist/{turn-session-routing-BlCtVFRN.js → turn-session-routing-VXDVXLRl.js} +5 -5
  62. package/dist/{turn-user-message-ygLG3ylQ.js → turn-user-message-BSPmkm7X.js} +15 -48
  63. package/dist/{turn-wake-DmQec4AG.js → turn-wake-DVFVXyhX.js} +6 -6
  64. package/dist/{validation-Ba2OcUse.js → validation-zxAJBDDy.js} +1 -1
  65. package/dist/{version-KNDzIAh6.js → version-DcZ40a0g.js} +1 -1
  66. package/dist/version.js +1 -1
  67. package/dist/{viewer-BPpuN2f9.js → viewer-CgiGjW10.js} +3 -3
  68. package/dist/{warmup-Bskrwmk1.js → warmup-CwKbxQLl.js} +16 -15
  69. package/dist/{worker-B1skZlit.js → worker-CbDUzaBA.js} +6 -6
  70. package/package.json +4 -4
@@ -1,10 +1,10 @@
1
- import { E as buildConversationContext, Uo as listConversationAnnotations, X as clearPendingAuth, j as markConversationMessage, v as hydrateConversationMessages } from "./projection-B08mfi0u.js";
2
- import { H as findProviderError, U as getProviderErrorAttributes, W as getProviderErrorUserMessage, z as ProviderError } from "./config-Dj9M_nqB.js";
3
- import { G as isRecord, b as setSpanAttributes, t as buildTurnFailureResponse } from "./logging-CQjlDQYX.js";
4
- import { o as getDb, r as getConversationEventStore } from "./db-Br0tfAo7.js";
5
- import { I as readMessageCardRefs, L as removedCardSchema, R as resolveMessageCards } from "./conversation-CvcBU1z2.js";
6
- import { dt as parseAgentReplyMessageId, ft as parseTurnReplyMessageId, m as markTurnCompleted, n as getTurnUserMessageId, p as markTurnClosed, rt as getAgentInvocationTurnId, ut as parseAgentInvocationResultMessageId, w as getAgentInvocation } from "./turn-user-message-ygLG3ylQ.js";
7
- import { a as getPersistedThreadState, c as coerceThreadConversationState, s as persistThreadStateById } from "./turn-session-routing-BlCtVFRN.js";
1
+ import { E as buildConversationContext, Uo as listConversationAnnotations, X as clearPendingAuth, j as markConversationMessage, v as hydrateConversationMessages } from "./projection-BgwEE36_.js";
2
+ import { H as findProviderError, U as getProviderErrorAttributes, W as getProviderErrorUserMessage, z as ProviderError } from "./config-BOByVnxe.js";
3
+ import { G as isRecord, b as setSpanAttributes, t as buildTurnFailureResponse } from "./logging-CJTi5niy.js";
4
+ import { o as getDb, r as getConversationEventStore } from "./db-CoMNr2Zm.js";
5
+ import { B as readMessageCardRefs, H as resolveMessageCards, V as removedCardSchema } from "./conversation-DCkzvxqB.js";
6
+ import { ct as parseAgentReplyMessageId, et as getAgentInvocationTurnId, lt as parseTurnReplyMessageId, m as markTurnCompleted, n as getTurnUserMessageId, p as markTurnClosed, st as parseAgentInvocationResultMessageId, w as getAgentInvocation } from "./turn-user-message-BSPmkm7X.js";
7
+ import { a as getPersistedThreadState, c as coerceThreadConversationState, s as persistThreadStateById } from "./turn-session-routing-VXDVXLRl.js";
8
8
  // src/chat/conversations/pending-cards.ts
9
9
  /**
10
10
  * Add the cards that tool results selected since the last visible assistant
@@ -1,9 +1,9 @@
1
- import { X as clearPendingAuth, j as markConversationMessage, ot as getTurnRecord, rt as abandonTurnRecord, v as hydrateConversationMessages } from "./projection-B08mfi0u.js";
2
- import { r as getConversationEventStore } from "./db-Br0tfAo7.js";
3
- import { g as getAuthPausedConversationTurnId, v as listActiveMailboxTurns } from "./prompt-input-Dxn8cDC0.js";
4
- import { _ as ConversationTurnLifecycleService, p as markTurnClosed, t as getTurnUserMessage } from "./turn-user-message-ygLG3ylQ.js";
5
- import { a as getPersistedThreadState, c as coerceThreadConversationState, s as persistThreadStateById } from "./turn-session-routing-BlCtVFRN.js";
6
- import { n as getPausedTurnRequest, s as deleteWebAuthorization } from "./turn-wake-DmQec4AG.js";
1
+ import { X as clearPendingAuth, j as markConversationMessage, ot as getTurnRecord, rt as abandonTurnRecord, v as hydrateConversationMessages } from "./projection-BgwEE36_.js";
2
+ import { r as getConversationEventStore } from "./db-CoMNr2Zm.js";
3
+ import { g as getAuthPausedConversationTurnId, v as listActiveMailboxTurns } from "./prompt-input-BUr4J9RO.js";
4
+ import { _ as ConversationTurnLifecycleService, p as markTurnClosed, t as getTurnUserMessage } from "./turn-user-message-BSPmkm7X.js";
5
+ import { a as getPersistedThreadState, c as coerceThreadConversationState, s as persistThreadStateById } from "./turn-session-routing-VXDVXLRl.js";
6
+ import { n as getPausedTurnRequest, s as deleteWebAuthorization } from "./turn-wake-DVFVXyhX.js";
7
7
  import { t as canJoinTurn } from "./attempt-selection-ClP3MMPr.js";
8
8
  // src/chat/runtime/turn-execution.ts
9
9
  /** An error thrown while the agent advances a Run. */
@@ -1,7 +1,7 @@
1
- import { Ei as ToolInputError, Qo as createDurableLocationConfigurationService, b as persistConversationMessages, vi as JUNIOR_THREAD_STATE_TTL_MS } from "./projection-B08mfi0u.js";
2
- import { G as isRecord, K as toOptionalNumber, q as toOptionalString } from "./logging-CQjlDQYX.js";
3
- import { o as getDb } from "./db-Br0tfAo7.js";
4
- import { a as getStateAdapter } from "./state-DFnmLmfn.js";
1
+ import { Ei as ToolInputError, Qo as createDurableLocationConfigurationService, b as persistConversationMessages, vi as JUNIOR_THREAD_STATE_TTL_MS } from "./projection-BgwEE36_.js";
2
+ import { G as isRecord, K as toOptionalNumber, q as toOptionalString } from "./logging-CJTi5niy.js";
3
+ import { o as getDb } from "./db-CoMNr2Zm.js";
4
+ import { a as getStateAdapter } from "./state-CSuA2J1V.js";
5
5
  import * as z from "zod";
6
6
  import { agentEventMatchSchema, anyResourceMatchFields, describeEventTrigger, eventTriggerChoices, eventTriggerProblems, normalizeEventIdentifier, normalizeEventMatch } from "@sentry/junior-plugin-api";
7
7
  // src/chat/events/catalog.ts
@@ -338,7 +338,7 @@ function slackSourceForDestination(args) {
338
338
  * Reads parent Conversations when this Conversation has no Destination.
339
339
  */
340
340
  async function resolveConversationRouting(args) {
341
- const conversationStore = args.conversationStore ?? (await import("./db-Br0tfAo7.js").then((n) => n.n)).getConversationStore();
341
+ const conversationStore = args.conversationStore ?? (await import("./db-CoMNr2Zm.js").then((n) => n.n)).getConversationStore();
342
342
  const chain = await loadConversationChain(args.conversationId, conversationStore);
343
343
  let destination;
344
344
  let source;
@@ -1,10 +1,11 @@
1
- import { g as TURN_REASONING_LEVELS } from "./config-Dj9M_nqB.js";
1
+ import { g as TURN_REASONING_LEVELS } from "./config-BOByVnxe.js";
2
2
  import { h as parseSlackMessageTs } from "./actor-6jsm_v96.js";
3
- import { r as getConversationEventStore, s as getSqlExecutor } from "./db-Br0tfAo7.js";
4
- import { g as juniorAgentInvocations } from "./executor-BMPipFVA.js";
5
- import { p as credentialContextSchema } from "./registry-BDWgCJDf.js";
6
- import { i as isEventMailboxMetadata } from "./notification-gusCgdQ6.js";
7
- import { _ as getConversationWorkState } from "./store-B59rOYbS.js";
3
+ import { r as getConversationEventStore, s as getSqlExecutor } from "./db-CoMNr2Zm.js";
4
+ import { g as juniorAgentInvocations } from "./executor-C-m8VrzX.js";
5
+ import { p as credentialContextSchema } from "./registry-9XwqSnM-.js";
6
+ import { k as agentTypeSchema } from "./conversation-DCkzvxqB.js";
7
+ import { i as isEventMailboxMetadata } from "./notification-Bv25xbj0.js";
8
+ import { _ as getConversationWorkState } from "./store-B1zepKG8.js";
8
9
  import { d as AGENT_INVOCATION_MAILBOX_STATUSES, f as AGENT_INVOCATION_PARENT_MAILBOX_STATUSES } from "./user-input-request-CXNIov9n.js";
9
10
  import { createHash } from "node:crypto";
10
11
  import * as z from "zod";
@@ -113,44 +114,6 @@ function parseAgentInvocationResultMessageId(messageId) {
113
114
  if (!messageId.startsWith(RESULT_MESSAGE_PREFIX) || !messageId.endsWith(RESULT_MESSAGE_SUFFIX)) return;
114
115
  return messageId.slice(17, -7) || void 0;
115
116
  }
116
- // src/chat/agent-invocations/agent-types.ts
117
- /**
118
- * Child agent types. A type is plain data: when to pick it and what the child
119
- * reads with its task. Runtime code reads only these fields, never a type
120
- * name, so types can later come from configuration. Types do not limit tools:
121
- * Guardian reviews each child action against the root user's messages, as for
122
- * any child. A child keeps its type for later agent invocations. How a child
123
- * starts, fresh or forked from its parent's history, is not a type: see
124
- * `fork` on the agent invocation.
125
- */
126
- const AGENT_TYPES = ["explore", "reviewer"];
127
- /**
128
- * Stored name of a child agent type. A stored name stays readable after its
129
- * type is removed; the runtime then treats the child as a
130
- * child without a type.
131
- */
132
- const agentTypeSchema = z.string().regex(/^[a-z][a-z0-9_-]*$/);
133
- const AGENT_TYPE_DEFINITIONS = {
134
- explore: {
135
- whenToUse: "Investigation across code, docs, logs, telemetry, or the web. Use it when an answer needs reading across many files or sources and you need the conclusion with evidence, not the raw output.",
136
- instructions: "You are an explore agent. Your job is to investigate and report, so do not change anything outside your sandbox unless the task asks for it. Report what you found with exact evidence, such as paths, lines, links, and ids, and say what you could not verify."
137
- },
138
- reviewer: {
139
- whenToUse: "An independent second opinion on a change, plan, or claim. Give it the evidence to judge, not your conclusion.",
140
- instructions: "You are a reviewer agent. Give an independent assessment. Do not assume that the parent's framing is correct: verify each claim against the evidence. Do not change anything outside your own sandbox. Report concrete problems ranked by severity, each with its evidence, and say clearly when you found none."
141
- }
142
- };
143
- function agentTypeDefinition(type) {
144
- return type && Object.hasOwn(AGENT_TYPE_DEFINITIONS, type) ? AGENT_TYPE_DEFINITIONS[type] : void 0;
145
- }
146
- /** Model-facing list of child agent types. */
147
- function formatAgentTypes() {
148
- return AGENT_TYPES.map((type) => `- "${type}": ${AGENT_TYPE_DEFINITIONS[type].whenToUse}`).join("\n");
149
- }
150
- /** Return the instructions that a child of this type reads with its task. */
151
- function agentTypeInstructions(type) {
152
- return agentTypeDefinition(type)?.instructions;
153
- }
154
117
  // src/chat/agent-invocations/types.ts
155
118
  const exactStringSchema = z.string().min(1).refine((value) => value === value.trim());
156
119
  const agentNameSchema = exactStringSchema.max(64);
@@ -296,13 +259,17 @@ async function getLatestAgentInvocationForConversation(childConversationId) {
296
259
  return rows[0] ? invocationFromRow(rows[0]) : void 0;
297
260
  }
298
261
  /**
299
- * Read the name and the newest task title of one child Conversation, for
300
- * labels. Agent invocations that give a nested result to the child have no
301
- * title, so an agent invocation with a title comes first.
262
+ * Read the name, agent type, fork flag, and newest task title of one child
263
+ * Conversation, for labels. Agent invocations that give a nested result to
264
+ * the child have no title, so an agent invocation with a title comes first.
265
+ * Each agent invocation keeps the child's agent type, but only the one that
266
+ * started a fork has `fork` set, so the flag reads every agent invocation.
302
267
  */
303
268
  async function getChildAgentLabel(childConversationId) {
304
269
  const [row] = await getSqlExecutor().db().select({
305
270
  agentName: juniorAgentInvocations.agentName,
271
+ agentType: juniorAgentInvocations.agentType,
272
+ fork: sql`bool_or(${juniorAgentInvocations.fork}) over ()`,
306
273
  title: juniorAgentInvocations.title
307
274
  }).from(juniorAgentInvocations).where(eq(juniorAgentInvocations.childConversationId, childConversationId)).orderBy(sql`${juniorAgentInvocations.title} is null`, desc(juniorAgentInvocations.createdAt)).limit(1);
308
275
  return row;
@@ -638,4 +605,4 @@ function getTurnUserReplyAttachmentContext(message) {
638
605
  ...!imagesHydrated && imageAttachmentCount > 0 ? { omittedImageAttachmentCount: imageAttachmentCount } : void 0
639
606
  };
640
607
  }
641
- export { getAgentInvocationIdForMessage as $, listAgentInvocationsForConversation as A, reportReplacedWithoutOpenWork as B, getActiveAgentInvocationForConversation as C, invocationFromRow as D, getLatestAgentInvocationForConversation as E, markAgentInvocationParentMailboxAppended as F, agentBindingSchema as G, CHILD_AGENT_KINDS as H, markAgentInvocationPaused as I, AGENT_TYPES as J, agentNameSchema as K, markAgentInvocationRunning as L, listPendingAgentInvocationMailboxAppends as M, listPendingAgentInvocationResults as N, isStoppedAgentInvocation as O, markAgentInvocationMailboxAppended as P, getAgentInvocationIdForEvents as Q, markAgentInvocationSteered as R, completeAgentInvocation as S, getChildAgentLabel as T, CHILD_AGENT_RESULTS as U, sendsResultToParent as V, PARENT_AGENT_TARGET as W, formatAgentTypes as X, agentTypeInstructions as Y, getAgentInvocationId as Z, ConversationTurnLifecycleService as _, ConversationTurnBoundaryError as a, getChildAgentLockName as at, NON_TERMINAL_AGENT_INVOCATION_STATUSES as b, TurnInputDeferredError as c, getUnnamedAgentConversationId as ct, isTurnInputCommitLostError as d, parseAgentReplyMessageId as dt, getAgentInvocationIdForResult as et, isTurnInputDeferredError as f, parseTurnReplyMessageId as ft, startActiveTurn as g, markTurnFailed as h, getTurnUserSlackMessageTs as i, getAgentReplyMessageId as it, listOpenAgentInvocations as j, isTerminalAgentInvocation as k, getConversationTurnBoundaryError as l, isAgentReplyMessageId as lt, markTurnCompleted as m, buildDeterministicTurnId as mt, getTurnUserMessageId as n, getAgentInvocationResultMessageId as nt, CooperativeTurnYieldError as o, getNamedAgentConversationId as ot, markTurnClosed as p, buildDeterministicAssistantMessageId as pt, createAgentInvocationSchema as q, getTurnUserReplyAttachmentContext as r, getAgentInvocationTurnId as rt, TurnInputCommitLostError as s, getTurnReplyKey as st, getTurnUserMessage as t, getAgentInvocationMessageId as tt, isCooperativeTurnYieldError as u, parseAgentInvocationResultMessageId as ut, getTurnLifecycle as v, getAgentInvocation as w, TERMINAL_AGENT_INVOCATION_STATUSES as x, ACTIVE_AGENT_INVOCATION_STATUSES as y, reportReplacedAgentInvocation as z };
608
+ export { getAgentInvocationResultMessageId as $, listAgentInvocationsForConversation as A, reportReplacedWithoutOpenWork as B, getActiveAgentInvocationForConversation as C, invocationFromRow as D, getLatestAgentInvocationForConversation as E, markAgentInvocationParentMailboxAppended as F, agentBindingSchema as G, CHILD_AGENT_KINDS as H, markAgentInvocationPaused as I, getAgentInvocationId as J, agentNameSchema as K, markAgentInvocationRunning as L, listPendingAgentInvocationMailboxAppends as M, listPendingAgentInvocationResults as N, isStoppedAgentInvocation as O, markAgentInvocationMailboxAppended as P, getAgentInvocationMessageId as Q, markAgentInvocationSteered as R, completeAgentInvocation as S, getChildAgentLabel as T, CHILD_AGENT_RESULTS as U, sendsResultToParent as V, PARENT_AGENT_TARGET as W, getAgentInvocationIdForMessage as X, getAgentInvocationIdForEvents as Y, getAgentInvocationIdForResult as Z, ConversationTurnLifecycleService as _, ConversationTurnBoundaryError as a, getUnnamedAgentConversationId as at, NON_TERMINAL_AGENT_INVOCATION_STATUSES as b, TurnInputDeferredError as c, parseAgentReplyMessageId as ct, isTurnInputCommitLostError as d, buildDeterministicTurnId as dt, getAgentInvocationTurnId as et, isTurnInputDeferredError as f, startActiveTurn as g, markTurnFailed as h, getTurnUserSlackMessageTs as i, getTurnReplyKey as it, listOpenAgentInvocations as j, isTerminalAgentInvocation as k, getConversationTurnBoundaryError as l, parseTurnReplyMessageId as lt, markTurnCompleted as m, getTurnUserMessageId as n, getChildAgentLockName as nt, CooperativeTurnYieldError as o, isAgentReplyMessageId as ot, markTurnClosed as p, createAgentInvocationSchema as q, getTurnUserReplyAttachmentContext as r, getNamedAgentConversationId as rt, TurnInputCommitLostError as s, parseAgentInvocationResultMessageId as st, getTurnUserMessage as t, getAgentReplyMessageId as tt, isCooperativeTurnYieldError as u, buildDeterministicAssistantMessageId as ut, getTurnLifecycle as v, getAgentInvocation as w, TERMINAL_AGENT_INVOCATION_STATUSES as x, ACTIVE_AGENT_INVOCATION_STATUSES as y, reportReplacedAgentInvocation as z };
@@ -1,9 +1,9 @@
1
- import { $ as loadTurnCheckpoint, at as failTurnRecord, ot as getTurnRecord } from "./projection-B08mfi0u.js";
2
- import { T as isTopLevelKind, a as getConversationStore, r as getConversationEventStore } from "./db-Br0tfAo7.js";
3
- import { a as getStateAdapter } from "./state-DFnmLmfn.js";
4
- import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-CwfJy3Cd.js";
5
- import { C as requestConversationWork, h as ensureConversationWake } from "./store-B59rOYbS.js";
6
- import { n as resolveTurnSessionRouting } from "./turn-session-routing-BlCtVFRN.js";
1
+ import { $ as loadTurnCheckpoint, at as failTurnRecord, ot as getTurnRecord } from "./projection-BgwEE36_.js";
2
+ import { T as isTopLevelKind, a as getConversationStore, r as getConversationEventStore } from "./db-CoMNr2Zm.js";
3
+ import { a as getStateAdapter } from "./state-CSuA2J1V.js";
4
+ import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-BZhGFOK6.js";
5
+ import { C as requestConversationWork, h as ensureConversationWake } from "./store-B1zepKG8.js";
6
+ import { n as resolveTurnSessionRouting } from "./turn-session-routing-VXDVXLRl.js";
7
7
  import { randomUUID } from "node:crypto";
8
8
  import * as z from "zod";
9
9
  // src/chat/conversations/web-authorization.ts
@@ -1,5 +1,5 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { n as pluginCatalogRuntime } from "./catalog-runtime-0kuQqYL4.js";
2
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-DZeD2WbL.js";
3
3
  import { isDeepStrictEqual } from "node:util";
4
4
  // src/chat/plugins/validation.ts
5
5
  var validation_exports = /* @__PURE__ */ __exportAll({
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.297.0";
2
+ var version = "0.298.0";
3
3
  // src/version.ts
4
4
  /** Installed Junior package version, or `unknown` when package metadata is unavailable. */
5
5
  const JUNIOR_VERSION = typeof version === "string" && version.trim() ? version : "unknown";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export { t as JUNIOR_VERSION } from "./version-KNDzIAh6.js";
1
+ export { t as JUNIOR_VERSION } from "./version-DcZ40a0g.js";
@@ -1,6 +1,6 @@
1
- import { H as GOOGLE_IDENTITY_PROVIDER, W as normalizeIdentityEmail, h as logWarn } from "./logging-CQjlDQYX.js";
2
- import { N as findActorIdentityId, o as getDb } from "./db-Br0tfAo7.js";
3
- import { M as juniorUsers, j as juniorIdentities } from "./executor-BMPipFVA.js";
1
+ import { H as GOOGLE_IDENTITY_PROVIDER, W as normalizeIdentityEmail, h as logWarn } from "./logging-CJTi5niy.js";
2
+ import { N as findActorIdentityId, o as getDb } from "./db-CoMNr2Zm.js";
3
+ import { M as juniorUsers, j as juniorIdentities } from "./executor-C-m8VrzX.js";
4
4
  import { r as detectImageMediaType } from "./media-BepyEUNm.js";
5
5
  import { a as withLock } from "./locks-D-0h111u.js";
6
6
  import { createHash, randomUUID } from "node:crypto";
@@ -1,21 +1,22 @@
1
1
  import { n as captureMessage, u as sentry_exports, v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { H as PluginCredentialFailureError, K as AuthorizationFlowDisabledError, Mo as FORK_INSTRUCTIONS, No as loadForkHistory, Pn as escapeClosingTags, Qt as isTurnExecutionLimitExceededError, Rn as renderTag, Zo as createPluginCache, _n as getTerminalAssistantMessages, an as getAssistantReplyText, at as failTurnRecord, et as lostWorkerBeforeFirstSave, fn as REPORT_BLOCKED_TOOL_NAME, fo as createPluginLogger, li as listWatches, nr as getPlugins, nt as saveTurnCheckpoint, ot as getTurnRecord, rt as abandonTurnRecord, s as openConversationProjection, sn as NO_REPLY_TOOL_NAME, tn as readTurnAnswer, tt as pauseLostWorkerTurn, v as hydrateConversationMessages } from "./projection-B08mfi0u.js";
3
- import { E as resolveGatewayModel, K as isProviderRetryError, i as getChatConfig, n as botConfig } from "./config-Dj9M_nqB.js";
4
- import { E as withSpan, h as logWarn, m as logInfo, x as setSpanStatus } from "./logging-CQjlDQYX.js";
5
- import { D as turnBehavior, M as SYSTEM_IDENTITY_ID, O as conversationKindFromRow, Q as rootConversationIsArchived, a as getConversationStore, b as userMessageQueries, o as getDb, r as getConversationEventStore, s as getSqlExecutor, w as isPersonInput } from "./db-Br0tfAo7.js";
6
- import { A as juniorConversations, g as juniorAgentInvocations, h as juniorAgentBindings } from "./executor-BMPipFVA.js";
2
+ import { H as PluginCredentialFailureError, K as AuthorizationFlowDisabledError, Mo as FORK_INSTRUCTIONS, No as loadForkHistory, Pn as escapeClosingTags, Qt as isTurnExecutionLimitExceededError, Rn as renderTag, Zo as createPluginCache, _n as getTerminalAssistantMessages, an as getAssistantReplyText, at as failTurnRecord, et as lostWorkerBeforeFirstSave, fn as REPORT_BLOCKED_TOOL_NAME, fo as createPluginLogger, li as listWatches, nr as getPlugins, nt as saveTurnCheckpoint, ot as getTurnRecord, rt as abandonTurnRecord, s as openConversationProjection, sn as NO_REPLY_TOOL_NAME, tn as readTurnAnswer, tt as pauseLostWorkerTurn, v as hydrateConversationMessages } from "./projection-BgwEE36_.js";
3
+ import { E as resolveGatewayModel, K as isProviderRetryError, i as getChatConfig, n as botConfig } from "./config-BOByVnxe.js";
4
+ import { E as withSpan, h as logWarn, m as logInfo, x as setSpanStatus } from "./logging-CJTi5niy.js";
5
+ import { D as turnBehavior, M as SYSTEM_IDENTITY_ID, O as conversationKindFromRow, Q as rootConversationIsArchived, a as getConversationStore, b as userMessageQueries, o as getDb, r as getConversationEventStore, s as getSqlExecutor, w as isPersonInput } from "./db-CoMNr2Zm.js";
6
+ import { A as juniorConversations, g as juniorAgentInvocations, h as juniorAgentBindings } from "./executor-C-m8VrzX.js";
7
7
  import { h as contextProvenance, m as agentInstructionProvenance, v as sameActorIdentity } from "./media-BepyEUNm.js";
8
- import { u as completeText } from "./prompt-BlutWLNt.js";
9
- import { a as getStateAdapter } from "./state-DFnmLmfn.js";
10
- import { T as systemPromptHash, l as withoutSavedSteeringMessages, o as buildSteeringPiMessage, s as instructionForInputs, v as listActiveMailboxTurns, w as buildDeploymentSystemPrompt } from "./prompt-input-Dxn8cDC0.js";
11
- import { w as getTurnRequestDeadline, y as sendCacheWarmup } from "./background-compaction-queue-CwfJy3Cd.js";
12
- import { c as conversationSubtreeColumns, i as resumeStoppedConversationTree, n as isSkippedAfterConversationStop, r as markConversationsStopped, s as conversationSubtree, t as getConversationStoppedAtMs } from "./session-stop-B-I1rAS1.js";
13
- import { A as listAgentInvocationsForConversation, C as getActiveAgentInvocationForConversation, D as invocationFromRow, E as getLatestAgentInvocationForConversation, G as agentBindingSchema, I as markAgentInvocationPaused, L as markAgentInvocationRunning, O as isStoppedAgentInvocation, P as markAgentInvocationMailboxAppended, R as markAgentInvocationSteered, S as completeAgentInvocation, U as CHILD_AGENT_RESULTS, V as sendsResultToParent, Y as agentTypeInstructions, Z as getAgentInvocationId, _ as ConversationTurnLifecycleService, at as getChildAgentLockName, b as NON_TERMINAL_AGENT_INVOCATION_STATUSES, ct as getUnnamedAgentConversationId, d as isTurnInputCommitLostError, dt as parseAgentReplyMessageId, et as getAgentInvocationIdForResult, ft as parseTurnReplyMessageId, j as listOpenAgentInvocations, k as isTerminalAgentInvocation, l as getConversationTurnBoundaryError, lt as isAgentReplyMessageId, mt as buildDeterministicTurnId, ot as getNamedAgentConversationId, q as createAgentInvocationSchema, rt as getAgentInvocationTurnId, s as TurnInputCommitLostError, tt as getAgentInvocationMessageId, ut as parseAgentInvocationResultMessageId, w as getAgentInvocation, y as ACTIVE_AGENT_INVOCATION_STATUSES, z as reportReplacedAgentInvocation } from "./turn-user-message-ygLG3ylQ.js";
14
- import { E as resetAutomatedTurnLimit, T as recordFinishedTurnForAutomatedLimit, i as isEventMailboxMetadata, y as maybePostAutomatedTurnLimitNotice } from "./notification-gusCgdQ6.js";
15
- import { E as stopConversationWork, _ as getConversationWorkState, m as dropPendingMessages, r as appendAndEnqueueInboundMessage } from "./store-B59rOYbS.js";
16
- import { a as getPersistedThreadState, c as coerceThreadConversationState, i as getPersistedSandboxState, s as persistThreadStateById } from "./turn-session-routing-BlCtVFRN.js";
8
+ import { u as completeText } from "./prompt-DXc9DYT9.js";
9
+ import { a as getStateAdapter } from "./state-CSuA2J1V.js";
10
+ import { O as agentTypeInstructions } from "./conversation-DCkzvxqB.js";
11
+ import { T as systemPromptHash, l as withoutSavedSteeringMessages, o as buildSteeringPiMessage, s as instructionForInputs, v as listActiveMailboxTurns, w as buildDeploymentSystemPrompt } from "./prompt-input-BUr4J9RO.js";
12
+ import { w as getTurnRequestDeadline, y as sendCacheWarmup } from "./background-compaction-queue-BZhGFOK6.js";
13
+ import { c as conversationSubtreeColumns, i as resumeStoppedConversationTree, n as isSkippedAfterConversationStop, r as markConversationsStopped, s as conversationSubtree, t as getConversationStoppedAtMs } from "./session-stop-D4i7e6iT.js";
14
+ import { A as listAgentInvocationsForConversation, C as getActiveAgentInvocationForConversation, D as invocationFromRow, E as getLatestAgentInvocationForConversation, G as agentBindingSchema, I as markAgentInvocationPaused, J as getAgentInvocationId, L as markAgentInvocationRunning, O as isStoppedAgentInvocation, P as markAgentInvocationMailboxAppended, Q as getAgentInvocationMessageId, R as markAgentInvocationSteered, S as completeAgentInvocation, U as CHILD_AGENT_RESULTS, V as sendsResultToParent, Z as getAgentInvocationIdForResult, _ as ConversationTurnLifecycleService, at as getUnnamedAgentConversationId, b as NON_TERMINAL_AGENT_INVOCATION_STATUSES, ct as parseAgentReplyMessageId, d as isTurnInputCommitLostError, dt as buildDeterministicTurnId, et as getAgentInvocationTurnId, j as listOpenAgentInvocations, k as isTerminalAgentInvocation, l as getConversationTurnBoundaryError, lt as parseTurnReplyMessageId, nt as getChildAgentLockName, ot as isAgentReplyMessageId, q as createAgentInvocationSchema, rt as getNamedAgentConversationId, s as TurnInputCommitLostError, st as parseAgentInvocationResultMessageId, w as getAgentInvocation, y as ACTIVE_AGENT_INVOCATION_STATUSES, z as reportReplacedAgentInvocation } from "./turn-user-message-BSPmkm7X.js";
15
+ import { E as resetAutomatedTurnLimit, T as recordFinishedTurnForAutomatedLimit, i as isEventMailboxMetadata, y as maybePostAutomatedTurnLimitNotice } from "./notification-Bv25xbj0.js";
16
+ import { E as stopConversationWork, _ as getConversationWorkState, m as dropPendingMessages, r as appendAndEnqueueInboundMessage } from "./store-B1zepKG8.js";
17
+ import { a as getPersistedThreadState, c as coerceThreadConversationState, i as getPersistedSandboxState, s as persistThreadStateById } from "./turn-session-routing-VXDVXLRl.js";
17
18
  import { v as isAgentInvocationResultEventType } from "./user-input-request-CXNIov9n.js";
18
- import { a as AgentRunError, o as executeTurn, r as supersedeOpenMailboxTurns, s as finishTurn, t as cancelSignInWait } from "./turn-cancel-DDu8TOwt.js";
19
+ import { a as AgentRunError, o as executeTurn, r as supersedeOpenMailboxTurns, s as finishTurn, t as cancelSignInWait } from "./turn-cancel-l460pfGW.js";
19
20
  import { streamSimple } from "@earendil-works/pi-ai/compat";
20
21
  import { isDeepStrictEqual, promisify } from "node:util";
21
22
  import { createHash, randomUUID } from "node:crypto";
@@ -1,10 +1,10 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { At as isFinalAttempt, Ot as hasConversationStop, St as countPendingConversationMessages, jt as isInvalidConversationRecordError } from "./projection-B08mfi0u.js";
3
- import { K as isProviderRetryError, i as getChatConfig } from "./config-Dj9M_nqB.js";
4
- import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-CQjlDQYX.js";
5
- import { f as ConversationQueueMessageRejectedError, w as getTurnRequestDeadline } from "./background-compaction-queue-CwfJy3Cd.js";
6
- import { t as getConversationStoppedAtMs } from "./session-stop-B-I1rAS1.js";
7
- import { S as requestAnotherSlice, _ as getConversationWorkState, b as recordConversationRetry, c as clearConsumedConversationWake, d as completeConversationWork, f as deadLetterAttempt, h as ensureConversationWake, i as beginConversationResume, o as checkInConversationWork, p as drainConversationMailbox, t as ackMessages, u as completeConversationStop, w as startConversationWork, x as releaseConversationWork, y as recordAttemptFailure } from "./store-B59rOYbS.js";
2
+ import { At as isFinalAttempt, Ot as hasConversationStop, St as countPendingConversationMessages, jt as isInvalidConversationRecordError } from "./projection-BgwEE36_.js";
3
+ import { K as isProviderRetryError, i as getChatConfig } from "./config-BOByVnxe.js";
4
+ import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-CJTi5niy.js";
5
+ import { f as ConversationQueueMessageRejectedError, w as getTurnRequestDeadline } from "./background-compaction-queue-BZhGFOK6.js";
6
+ import { t as getConversationStoppedAtMs } from "./session-stop-D4i7e6iT.js";
7
+ import { S as requestAnotherSlice, _ as getConversationWorkState, b as recordConversationRetry, c as clearConsumedConversationWake, d as completeConversationWork, f as deadLetterAttempt, h as ensureConversationWake, i as beginConversationResume, o as checkInConversationWork, p as drainConversationMailbox, t as ackMessages, u as completeConversationStop, w as startConversationWork, x as releaseConversationWork, y as recordAttemptFailure } from "./store-B1zepKG8.js";
8
8
  import { i as selectAttemptMessages, r as isAttemptInterrupt } from "./attempt-selection-ClP3MMPr.js";
9
9
  // src/chat/task-execution/worker.ts
10
10
  var worker_exports = /* @__PURE__ */ __exportAll({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior",
3
- "version": "0.297.0",
3
+ "version": "0.298.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -95,7 +95,7 @@
95
95
  "web-push": "^3.6.7",
96
96
  "yaml": "^2.9.0",
97
97
  "zod": "^4.5.4",
98
- "@sentry/junior-plugin-api": "0.297.0"
98
+ "@sentry/junior-plugin-api": "0.298.0"
99
99
  },
100
100
  "peerDependencies": {
101
101
  "bullmq": "^6.5.0",
@@ -131,8 +131,8 @@
131
131
  "typescript": "^7.0.2",
132
132
  "vercel": "^54.4.0",
133
133
  "vitest": "^4.1.12",
134
- "@sentry/junior-github": "0.297.0",
135
- "@sentry/junior-memory": "0.297.0",
134
+ "@sentry/junior-github": "0.298.0",
135
+ "@sentry/junior-memory": "0.298.0",
136
136
  "@sentry/junior-testing": "0.0.0"
137
137
  },
138
138
  "scripts": {