@sentry/junior 0.278.0 → 0.280.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 (90) hide show
  1. package/dist/{actor-B4DYygOB.js → actor-6jsm_v96.js} +1 -1
  2. package/dist/{adapter-BXosqTMx.js → adapter-DVN3iwf9.js} +1 -1
  3. package/dist/{admin-Thn7NfOi.js → admin-Q_UI--9W.js} +1 -1
  4. package/dist/{agent-runner-DE-43MPb.js → agent-runner-_PYLv4Qo.js} +79 -39
  5. package/dist/api/schema.d.ts +2 -2
  6. package/dist/api/schema.js +7 -7
  7. package/dist/api.d.ts +3 -3
  8. package/dist/api.js +184 -418
  9. package/dist/{app-CHNS-AX2.d.ts → app-CL2zzzE0.d.ts} +5 -5
  10. package/dist/app.d.ts +1 -1
  11. package/dist/app.js +462 -80
  12. package/dist/{assistant-reply-pauL6qyn.js → assistant-reply-DbebsAxi.js} +1 -1
  13. package/dist/{automation-DphoTRYl.js → automation-CPqRFjIa.js} +2 -2
  14. package/dist/{background-compaction-queue-CAL4A2y7.js → background-compaction-queue-B9lmh8Ml.js} +3 -3
  15. package/dist/{briefs-4fyPJJEu.js → briefs-Dej7V0Bz.js} +11 -10
  16. package/dist/{catalog-runtime-BoOb5oUv.js → catalog-runtime-DpN0sWQ6.js} +2 -2
  17. package/dist/cli/chat.js +16 -16
  18. package/dist/cli/check.js +3 -3
  19. package/dist/cli/main.js +4 -4
  20. package/dist/cli/plugins.js +5 -5
  21. package/dist/cli/snapshot-create.js +4 -4
  22. package/dist/cli/upgrade.d.ts +1 -1
  23. package/dist/cli/upgrade.js +4 -4
  24. package/dist/{client-v_OVYuHZ.js → client-h2A2ZPzY.js} +7 -3
  25. package/dist/{config-o2jLRY5J.js → config-CusBFORe.js} +3 -3
  26. package/dist/{connections-RC4NXAx8.js → connections-C4h6mGha.js} +11 -11
  27. package/dist/{conversation-CZfyQvdm.js → conversation-DExTZw8B.js} +22 -7
  28. package/dist/conversation-pending-messages-Dgz6hrJs.js +173 -0
  29. package/dist/{conversation-privacy-C23M8KaD.js → conversation-privacy-2cm6OpNg.js} +1 -1
  30. package/dist/{credential-sync-Dd0WyNfF.js → credential-sync-DK06Jgt-.js} +17 -17
  31. package/dist/{db-BjLzDJCt.d.ts → db-Dsvk1Tp1.d.ts} +2 -2
  32. package/dist/{executor-CJfsD0VX.js → executor-Cmr0J8W3.js} +152 -7
  33. package/dist/instrumentation.d.ts +12 -0
  34. package/dist/instrumentation.js +56 -23
  35. package/dist/{logging-dFaXvBRK.js → logging-CGnh65_X.js} +2 -2
  36. package/dist/{media-DTAA8Qs_.js → media-Dq9_svfQ.js} +1 -1
  37. package/dist/{message-DSwxIZet.js → message-RpAnqHPY.js} +10 -10
  38. package/dist/nitro.d.ts +1 -1
  39. package/dist/nitro.js +18 -6
  40. package/dist/{oauth-callback-server-CDcuCp27.js → oauth-callback-server-BBnhVKuX.js} +2 -2
  41. package/dist/{oauth-relay-C6ZAyJgf.js → oauth-relay-D6xxVywK.js} +2 -2
  42. package/dist/{package-discovery-DJBompdd.js → package-discovery-DJhGdS4c.js} +1 -1
  43. package/dist/{plugins-DOm9Y6qI.js → plugins-HYh_JOdw.js} +1 -1
  44. package/dist/{projection-BTge9wrH.js → projection-C1MghKyI.js} +257 -137
  45. package/dist/{prompt-DDtCnlHP.js → prompt-BcHg-BMy.js} +2 -2
  46. package/dist/proxy-path-BHYoKZdq.js +15 -0
  47. package/dist/{queue-C37RbDVc.d.ts → queue-CZyYgPF0.d.ts} +1 -1
  48. package/dist/{registry-Cp6CNmtP.js → registry-DR7DjX9H.js} +4 -4
  49. package/dist/{reporting-window-DgHgwQB3.js → reporting-window-B-QP9zX1.js} +28 -2
  50. package/dist/{resolve-B_7h2cXx.js → resolve-0Ful4oDv.js} +4 -4
  51. package/dist/{result-5LBEfnLX.js → result-Dd9kCuQ-.js} +12 -12
  52. package/dist/{runner-C5-S4oq-.js → runner-yiY8gUUu.js} +11 -11
  53. package/dist/{sandbox-egress-signals-B4GehT1L.js → sandbox-egress-signals-BzQVHCMz.js} +1 -1
  54. package/dist/{schema-Tr484cCC.d.ts → schema-BkMmF552.d.ts} +1232 -222
  55. package/dist/{schema-B5fpczDw.js → schema-C5pEgfHc.js} +30 -70
  56. package/dist/sentry-BRTJqumy.js +51 -0
  57. package/dist/sentry-DrKC2NeM.d.ts +1 -0
  58. package/dist/sentry-route-name-BhwWnfqj.js +51 -0
  59. package/dist/{service-account-Cq_dLrZJ.js → service-account-Cu7HFLZQ.js} +3 -3
  60. package/dist/{service-account-BkEv20zf.js → service-account-PIMpWZHF.js} +3 -3
  61. package/dist/{session-stop-BsS4qFS2.js → session-stop-CDEMsNtv.js} +14 -15
  62. package/dist/{skills-M0BA0_s6.js → skills-B2xIoe0f.js} +5 -5
  63. package/dist/{spawn-BO3y7H4d.js → spawn-C0DySQRV.js} +3 -3
  64. package/dist/{stop-D5R82Wla.js → stop-Dj5-nrAo.js} +740 -285
  65. package/dist/{store-BGBzQWNf.js → store-Dlio-o6u.js} +6 -6
  66. package/dist/{store-CGJZTEVz.js → store-QzOfDwKA.js} +3 -3
  67. package/dist/{task-queue-UD27ei2U.js → task-queue-Cp1V_XW3.js} +4 -4
  68. package/dist/{task-runner-noxjOjkM.js → task-runner-CQkkUj3o.js} +23 -11
  69. package/dist/{thread-state-BSu6rM6p.js → thread-state-Bn87cfzE.js} +4 -4
  70. package/dist/{turn-failure-response-wahwyPrZ.js → turn-failure-response-CQebxByj.js} +8 -8
  71. package/dist/{turn-lifecycle-Bo4Trccw.js → turn-lifecycle-CJJsOhXB.js} +1 -1
  72. package/dist/{turn-session-routing-DnSaaEpn.js → turn-session-routing-bmG330Cf.js} +10 -11
  73. package/dist/{validation-B9-8iKyw.js → validation-D1wcf7hp.js} +2 -2
  74. package/dist/{version-C7HejFP2.js → version-BeHSXUK6.js} +1 -1
  75. package/dist/version.js +1 -1
  76. package/dist/{viewer-DLXajQZE.js → viewer-BZ0Hp5Nb.js} +6 -7
  77. package/dist/{work-DRGSlfia.js → work-BTcCIbWu.js} +12 -12
  78. package/dist/{worker-BGh5Dwc6.js → worker-D3fDK6zc.js} +7 -7
  79. package/migrations/0077_drop_agent_invocation_model_profile.sql +1 -0
  80. package/migrations/0078_plugin_conversation_index.sql +20 -0
  81. package/migrations/0079_conversation_event_author_index.sql +20 -0
  82. package/migrations/meta/0077_snapshot.json +4141 -0
  83. package/migrations/meta/0078_snapshot.json +4175 -0
  84. package/migrations/meta/0079_snapshot.json +4203 -0
  85. package/migrations/meta/_journal.json +21 -0
  86. package/package.json +4 -4
  87. package/dist/agent-invocations-D7c4BQGc.js +0 -182
  88. package/dist/common-Eu6sx09c.js +0 -107
  89. package/dist/rolldown-runtime-nwUcYXjP.js +0 -27
  90. package/dist/sentry-MDkYAVPV.js +0 -23
@@ -1,5 +1,5 @@
1
- import { H as conversationBriefSchema, U as parseBriefInput, V as briefOutcomeStatusSchema } from "./conversation-CZfyQvdm.js";
2
- import { z } from "zod";
1
+ import { H as conversationBriefSchema, U as parseBriefInput, V as briefOutcomeStatusSchema } from "./conversation-DExTZw8B.js";
2
+ import * as z from "zod";
3
3
  // src/chat/briefs/generate.ts
4
4
  const MAX_INPUT_CHARS = 6e4;
5
5
  const MAX_MESSAGE_TEXT_CHARS = 4e3;
@@ -0,0 +1,15 @@
1
+ // src/chat/sandbox/egress/proxy-path.ts
2
+ const SANDBOX_EGRESS_PROXY_PATH = "/api/internal/sandbox-egress";
3
+ const PROXY_PATH_PREFIX = `${SANDBOX_EGRESS_PROXY_PATH}/`;
4
+ const SIGNALS_SEGMENT = "signals";
5
+ /**
6
+ * Replace the credential token and everything after it in a sandbox egress
7
+ * proxy path or URL. Other values are returned unchanged.
8
+ */
9
+ function redactSandboxEgressProxyPath(value) {
10
+ const index = value.indexOf(PROXY_PATH_PREFIX);
11
+ if (index === -1) return value;
12
+ if (value.slice(index + PROXY_PATH_PREFIX.length).split(/[/?#]/, 1)[0] === SIGNALS_SEGMENT) return value;
13
+ return `${value.slice(0, index)}${PROXY_PATH_PREFIX}<token>`;
14
+ }
15
+ export { redactSandboxEgressProxyPath as n, SANDBOX_EGRESS_PROXY_PATH as t };
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  /** Validate the v2 conversation work hint sent through Vercel Queue. */
3
3
  declare const conversationQueueMessageSchema: z.ZodObject<{
4
4
  schemaVersion: z.ZodLiteral<2>;
@@ -1,9 +1,9 @@
1
- import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-dFaXvBRK.js";
2
- import { o as isUserActor, s as parseActorUserId } from "./actor-B4DYygOB.js";
3
- import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJBompdd.js";
1
+ import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-CGnh65_X.js";
2
+ import { o as isUserActor, s as parseActorUserId } from "./actor-6jsm_v96.js";
3
+ import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJhGdS4c.js";
4
4
  import path from "node:path";
5
5
  import { randomUUID } from "node:crypto";
6
- import { z } from "zod";
6
+ import * as z from "zod";
7
7
  import { parse } from "yaml";
8
8
  import { readFileSync, readdirSync, statSync } from "node:fs";
9
9
  // src/chat/plugins/inline-manifest-source.ts
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  // src/api/schema/user-customization.ts
3
3
  /** Longest customization text one user can save. */
4
4
  const USER_CUSTOMIZATION_MAX_CHARS = 1e3;
@@ -6,6 +6,32 @@ const USER_CUSTOMIZATION_MAX_CHARS = 1e3;
6
6
  const userCustomizationTextSchema = z.string().trim().max(USER_CUSTOMIZATION_MAX_CHARS);
7
7
  /** Request and response body for the viewer's customization. */
8
8
  const userCustomizationSchema = z.object({ customization: userCustomizationTextSchema }).strict();
9
+ // src/chat/agent-invocations/statuses.ts
10
+ const AGENT_INVOCATION_STATUSES = [
11
+ "pending",
12
+ "running",
13
+ "paused",
14
+ "blocked",
15
+ "completed",
16
+ "failed",
17
+ "stopped"
18
+ ];
19
+ const AGENT_INVOCATION_MAILBOX_STATUSES = ["pending", "appended"];
20
+ /**
21
+ * Parent mailbox append state. Only terminal invocations have a value.
22
+ * `replaced` means the child still had open work, so a later agent invocation
23
+ * on the same child sends the result instead. `skipped` means a stop ended
24
+ * the work, so the result is never used. `steered` means the agent invocation
25
+ * that was running read the input as a steering message, so its result covers
26
+ * this one.
27
+ */
28
+ const AGENT_INVOCATION_PARENT_MAILBOX_STATUSES = [
29
+ "pending",
30
+ "appended",
31
+ "replaced",
32
+ "skipped",
33
+ "steered"
34
+ ];
9
35
  // src/chat/conversations/web-message-id.ts
10
36
  /**
11
37
  * Build the retry-stable Message id shared by web ingress and browser sends.
@@ -266,4 +292,4 @@ function sumUtcHoursIntoSixHours(args) {
266
292
  rows: bySix
267
293
  });
268
294
  }
269
- export { userCustomizationTextSchema as C, userCustomizationSchema as S, isEmptyUserInputAnswer as _, fillUtcSixHours as a, webMessageId as b, trailingUtcDayWindow as c, utcDayKey as d, utcHourKey as f, formatUserInputAnswer as g, buttonUserInputField as h, fillUtcHours as i, trailingUtcHourWindow as l, USER_INPUT_NOTE as m, HOUR_MS as n, startOfUtcHour as o, USER_INPUT_LIMITS as p, fillUtcDays as r, sumUtcHoursIntoSixHours as s, DAY_MS as t, trailingUtcSixHourWindow as u, normalizeUserInputAnswer as v, USER_CUSTOMIZATION_MAX_CHARS as x, userInputRequestSchema as y };
295
+ export { AGENT_INVOCATION_STATUSES as C, userCustomizationTextSchema as E, AGENT_INVOCATION_PARENT_MAILBOX_STATUSES as S, userCustomizationSchema as T, isEmptyUserInputAnswer as _, fillUtcSixHours as a, webMessageId as b, trailingUtcDayWindow as c, utcDayKey as d, utcHourKey as f, formatUserInputAnswer as g, buttonUserInputField as h, fillUtcHours as i, trailingUtcHourWindow as l, USER_INPUT_NOTE as m, HOUR_MS as n, startOfUtcHour as o, USER_INPUT_LIMITS as p, fillUtcDays as r, sumUtcHoursIntoSixHours as s, DAY_MS as t, trailingUtcSixHourWindow as u, normalizeUserInputAnswer as v, USER_CUSTOMIZATION_MAX_CHARS as w, AGENT_INVOCATION_MAILBOX_STATUSES as x, userInputRequestSchema as y };
@@ -1,7 +1,7 @@
1
- import { Oa as runNonInteractiveCommand, Sa as SANDBOX_WORKSPACE_ROOT, _a as SANDBOX_COMMAND_PATH, ai as create, da as sleep, li as getSandboxProvider, si as isStale } from "./projection-BTge9wrH.js";
2
- import { E as withSpan, b as setSpanAttributes } from "./logging-dFaXvBRK.js";
3
- import { r as getStateAdapter } from "./adapter-BXosqTMx.js";
4
- import { z } from "zod";
1
+ import { Oa as runNonInteractiveCommand, Sa as SANDBOX_WORKSPACE_ROOT, _a as SANDBOX_COMMAND_PATH, ai as create, da as sleep, li as getSandboxProvider, si as isStale } from "./projection-C1MghKyI.js";
2
+ import { E as withSpan, b as setSpanAttributes } from "./logging-CGnh65_X.js";
3
+ import { r as getStateAdapter } from "./adapter-DVN3iwf9.js";
4
+ import * as z from "zod";
5
5
  // src/chat/sandbox/resources.ts
6
6
  let configuredResources;
7
7
  function resourcesFromEnv() {
@@ -1,15 +1,15 @@
1
- import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { nt as listTurnSummaries, tt as getTurnRecord } from "./projection-BTge9wrH.js";
3
- import { t as createActor } from "./actor-B4DYygOB.js";
4
- import { F as SYSTEM_IDENTITY_ID } from "./viewer-DLXajQZE.js";
5
- import { f as credentialContextForActor } from "./registry-Cp6CNmtP.js";
6
- import { wt as listUnreportedSiblingAgents } from "./agent-runner-DE-43MPb.js";
7
- import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-DDtCnlHP.js";
8
- import { _ as getLatestAgentInvocationForConversation, c as getAgentInvocation, d as getAgentInvocationIdForResult, l as getAgentInvocationIdForEvents, o as createAgentInvocationFromLatest, p as getAgentInvocationResultMessageId, u as getAgentInvocationIdForMessage, w as markAgentInvocationParentMailboxAppended, y as isTerminalAgentInvocation } from "./store-BGBzQWNf.js";
9
- import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-BsS4qFS2.js";
10
- import { r as appendAndEnqueueInboundMessage } from "./store-CGJZTEVz.js";
11
- import { a as resolveAgentInvocationId, i as enqueueAgentInvocation, t as createAgentInvocationWorker } from "./work-DRGSlfia.js";
12
- import { z } from "zod";
1
+ import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
+ import { nt as listTurnSummaries, tt as getTurnRecord } from "./projection-C1MghKyI.js";
3
+ import { t as createActor } from "./actor-6jsm_v96.js";
4
+ import { F as SYSTEM_IDENTITY_ID } from "./viewer-BZ0Hp5Nb.js";
5
+ import { f as credentialContextForActor } from "./registry-DR7DjX9H.js";
6
+ import { wt as listUnreportedSiblingAgents } from "./agent-runner-_PYLv4Qo.js";
7
+ import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-BcHg-BMy.js";
8
+ import { _ as getLatestAgentInvocationForConversation, c as getAgentInvocation, d as getAgentInvocationIdForResult, l as getAgentInvocationIdForEvents, o as createAgentInvocationFromLatest, p as getAgentInvocationResultMessageId, u as getAgentInvocationIdForMessage, w as markAgentInvocationParentMailboxAppended, y as isTerminalAgentInvocation } from "./store-Dlio-o6u.js";
9
+ import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-CDEMsNtv.js";
10
+ import { r as appendAndEnqueueInboundMessage } from "./store-QzOfDwKA.js";
11
+ import { a as resolveAgentInvocationId, i as enqueueAgentInvocation, t as createAgentInvocationWorker } from "./work-BTcCIbWu.js";
12
+ import * as z from "zod";
13
13
  import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
14
14
  // src/chat/conversations/web-mailbox.ts
15
15
  /** Parse web mailbox metadata written before Source and Actor were complete. */
@@ -1,14 +1,14 @@
1
- import { B as authorizationId, D as buildConversationContext, I as upsertConversationMessage, M as markConversationMessage, N as normalizeConversationText, P as recordDeliveredAssistantMessage, Ut as persistWithRetry, Z as saveTurnCheckpoint, a as loadProjection, d as recordAuthorizationCompleted, t as commitAcceptedReply, v as hydrateConversationMessages, y as persistConversationMessages } from "./projection-BTge9wrH.js";
2
- import { S as setTags, T as withLogContext, p as logException } from "./logging-dFaXvBRK.js";
3
- import { F as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-DLXajQZE.js";
4
- import { f as credentialContextForActor } from "./registry-Cp6CNmtP.js";
5
- import { j as messageCardText } from "./conversation-CZfyQvdm.js";
6
- import { $ as markTurnFailed, et as startActiveTurn } from "./store-BGBzQWNf.js";
7
- import { n as getAssistantReplyText } from "./assistant-reply-pauL6qyn.js";
8
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-Bo4Trccw.js";
9
- import { a as persistThreadStateById, n as getPersistedSandboxState, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BSu6rM6p.js";
10
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-noxjOjkM.js";
11
- import { i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent, u as loadPendingMessageCards } from "./turn-failure-response-wahwyPrZ.js";
1
+ import { B as authorizationId, D as buildConversationContext, I as upsertConversationMessage, M as markConversationMessage, N as normalizeConversationText, P as recordDeliveredAssistantMessage, Ut as persistWithRetry, Z as saveTurnCheckpoint, a as loadProjection, d as recordAuthorizationCompleted, t as commitAcceptedReply, v as hydrateConversationMessages, y as persistConversationMessages } from "./projection-C1MghKyI.js";
2
+ import { S as setTags, T as withLogContext, p as logException } from "./logging-CGnh65_X.js";
3
+ import { F as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-BZ0Hp5Nb.js";
4
+ import { f as credentialContextForActor } from "./registry-DR7DjX9H.js";
5
+ import { j as messageCardText } from "./conversation-DExTZw8B.js";
6
+ import { $ as markTurnFailed, et as startActiveTurn } from "./store-Dlio-o6u.js";
7
+ import { n as getAssistantReplyText } from "./assistant-reply-DbebsAxi.js";
8
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-CJJsOhXB.js";
9
+ import { a as persistThreadStateById, n as getPersistedSandboxState, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-Bn87cfzE.js";
10
+ import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-CQkkUj3o.js";
11
+ import { i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent, u as loadPendingMessageCards } from "./turn-failure-response-CQebxByj.js";
12
12
  import { randomUUID } from "node:crypto";
13
13
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
14
14
  // src/chat/local/runner.ts
@@ -1,4 +1,4 @@
1
- import { oa as sandboxEgressSignalsResponseSchema } from "./projection-BTge9wrH.js";
1
+ import { oa as sandboxEgressSignalsResponseSchema } from "./projection-C1MghKyI.js";
2
2
  // src/chat/local/sandbox-egress-signals.ts
3
3
  const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
4
4
  const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;