@sentry/junior 0.296.0 → 0.297.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 (82) hide show
  1. package/dist/{admin-z_lgDi-z.js → admin-tmGIw4KS.js} +2 -2
  2. package/dist/{agent-runner-HoQiUKLL.js → agent-runner-CneTquAE.js} +378 -1919
  3. package/dist/api/schema.d.ts +2 -2
  4. package/dist/api/schema.js +7 -7
  5. package/dist/api.d.ts +1 -1
  6. package/dist/api.js +38 -267
  7. package/dist/{app-C75Ft-A_.d.ts → app-BJojZ7HL.d.ts} +7 -2
  8. package/dist/app.d.ts +1 -1
  9. package/dist/app.js +64 -44
  10. package/dist/attempt-selection-ClP3MMPr.js +61 -0
  11. package/dist/{automation-yJX3C7i3.js → automation-BrP6ImrC.js} +1 -1
  12. package/dist/{background-compaction-queue-Cre1wFt9.js → background-compaction-queue-CwfJy3Cd.js} +4 -88
  13. package/dist/{briefs-BXECHduJ.js → briefs-uFTuhMqA.js} +3 -3
  14. package/dist/{catalog-runtime-CpCmlD9L.js → catalog-runtime-0kuQqYL4.js} +1 -1
  15. package/dist/cli/chat.js +19 -15
  16. package/dist/cli/check.js +3 -3
  17. package/dist/cli/main.js +3 -3
  18. package/dist/cli/plugins.js +4 -4
  19. package/dist/cli/snapshot-create.js +4 -4
  20. package/dist/cli/upgrade.d.ts +1 -1
  21. package/dist/cli/upgrade.js +3 -3
  22. package/dist/{config-CCPHvTqx.js → config-Dj9M_nqB.js} +2 -2
  23. package/dist/{connections-B5pWh8e2.js → connections-B96JUM5o.js} +6 -6
  24. package/dist/{conversation-CMkSmi02.js → conversation-CvcBU1z2.js} +2 -16
  25. package/dist/{conversation-feed-BVAOga0H.js → conversation-feed-BSMlGZnS.js} +1 -1
  26. package/dist/{conversation-privacy-CZD5soDW.js → conversation-privacy-DI29jbZV.js} +1 -1
  27. package/dist/conversation-turn-CZWBr091.js +805 -0
  28. package/dist/{credential-sync-DwLkIvXI.js → credential-sync-Blhx4_xf.js} +14 -13
  29. package/dist/{db-C1M1y-bh.js → db-Br0tfAo7.js} +43 -15
  30. package/dist/{db-B3iyr_Or.d.ts → db-CrtyFRz7.d.ts} +13 -1
  31. package/dist/{executor-DUSEwXaO.js → executor-BMPipFVA.js} +14 -6
  32. package/dist/instrumentation.js +2 -2
  33. package/dist/{logging-D0svFM8r.js → logging-CQjlDQYX.js} +1 -1
  34. package/dist/{message-BFnIwKpx.js → message-BOZEIuxy.js} +15 -13
  35. package/dist/nitro.d.ts +1 -1
  36. package/dist/nitro.js +3 -2
  37. package/dist/{session-stop-hYNTNpVf.js → notification-gusCgdQ6.js} +11 -930
  38. package/dist/{oauth-callback-server-BXRtD6Fk.js → oauth-callback-server-V_DuMuNX.js} +2 -2
  39. package/dist/{projection-B6VS7kbo.js → projection-B08mfi0u.js} +333 -106
  40. package/dist/{prompt-CD11tfG8.js → prompt-BlutWLNt.js} +4 -4
  41. package/dist/prompt-input-Dxn8cDC0.js +1424 -0
  42. package/dist/{registry-CHewwYEo.js → registry-BDWgCJDf.js} +1 -1
  43. package/dist/reporting-window-DopzcOHh.js +137 -0
  44. package/dist/{resolve-1owMH4qo.js → resolve-2Z_o_SsI.js} +3 -3
  45. package/dist/result-CAujiaci.js +463 -0
  46. package/dist/{runner-BtWvJslp.js → runner-D2Chc02N.js} +9 -8
  47. package/dist/{sandbox-egress-signals-ByftwJVt.js → sandbox-egress-signals-CFoJduFj.js} +1 -1
  48. package/dist/{schema-D2iGyYIp.js → schema-Bqa5NbcP.js} +11 -48
  49. package/dist/{schema-Ct1Zf2xy.d.ts → schema-Ce2XCS7O.d.ts} +8 -107
  50. package/dist/{service-account-DLoeoHww.js → service-account-C9kRQEb_.js} +3 -3
  51. package/dist/{service-account-BZEuMKdo.js → service-account-CERfXEVU.js} +3 -3
  52. package/dist/session-stop-B-I1rAS1.js +181 -0
  53. package/dist/{skills-DXgd5Inh.js → skills-B0m1nZ_j.js} +2 -2
  54. package/dist/{spawn-YeqlNDv8.js → spawn-CwMjRRtn.js} +6 -5
  55. package/dist/{state-C3CbtD_m.js → state-DFnmLmfn.js} +2 -2
  56. package/dist/{stop-Cze_pEL8.js → stop-BCH9VNGf.js} +63 -158
  57. package/dist/{store-CZ9vqR4P.js → store-B59rOYbS.js} +11 -4
  58. package/dist/{task-runner-CMiNGsER.js → store-m5bmdmsP.js} +939 -1593
  59. package/dist/task-queue-N0kuCknH.js +89 -0
  60. package/dist/task-runner-COOwR8qm.js +291 -0
  61. package/dist/thread-context-Cd44z_W5.js +248 -0
  62. package/dist/turn-cancel-DDu8TOwt.js +201 -0
  63. package/dist/turn-session-routing-BlCtVFRN.js +380 -0
  64. package/dist/{turn-failure-response-pXhZ2wMK.js → turn-user-message-ygLG3ylQ.js} +183 -361
  65. package/dist/turn-wake-DmQec4AG.js +161 -0
  66. package/dist/{reporting-window-B3Ze-Qnt.js → user-input-request-CXNIov9n.js} +24 -143
  67. package/dist/{validation-Du7NdkOR.js → validation-Ba2OcUse.js} +1 -1
  68. package/dist/{version-EN3Wnq-R.js → version-KNDzIAh6.js} +1 -1
  69. package/dist/version.js +1 -1
  70. package/dist/{viewer-Agxi_o5c.js → viewer-BPpuN2f9.js} +3 -3
  71. package/dist/warmup-Bskrwmk1.js +2697 -0
  72. package/dist/{worker-BALVdWbv.js → worker-B1skZlit.js} +20 -8
  73. package/migrations/0102_code_change_last_activity.sql +1 -0
  74. package/migrations/0103_agent_invocation_fork.sql +8 -0
  75. package/migrations/meta/0102_snapshot.json +4502 -0
  76. package/migrations/meta/0103_snapshot.json +4509 -0
  77. package/migrations/meta/_journal.json +14 -0
  78. package/package.json +4 -4
  79. package/dist/result-CEqQFrEf.js +0 -305
  80. package/dist/result-event-type-DD6BAgT7.js +0 -11
  81. package/dist/warmup-CY2ArYag.js +0 -2017
  82. package/dist/work-EA98F0ia.js +0 -768
@@ -1,6 +1,6 @@
1
- import { i as getChatConfig } from "../config-CCPHvTqx.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-DUSEwXaO.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-CHewwYEo.js";
1
+ import { i as getChatConfig } from "../config-Dj9M_nqB.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-BMPipFVA.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-BDWgCJDf.js";
4
4
  import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-HYh_JOdw.js";
5
5
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
6
6
  import { basename, dirname, join, resolve } from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-D0svFM8r.js";
3
- import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-CZD5soDW.js";
2
+ import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-CQjlDQYX.js";
3
+ import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-DI29jbZV.js";
4
4
  import { AwsClient } from "aws4fetch";
5
5
  import { del, get, put } from "@vercel/blob";
6
6
  import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
@@ -1,9 +1,9 @@
1
- import { Ii as startOAuthFlow } from "./projection-B6VS7kbo.js";
2
- import { n as botConfig } from "./config-CCPHvTqx.js";
3
- import { I as deleteProviderIdentityForSlackUser, L as deleteProviderIdentityForUser, s as getSqlExecutor } from "./db-C1M1y-bh.js";
4
- import { u as hasRequiredOAuthScope } from "./registry-CHewwYEo.js";
5
- import { n as pluginCatalogRuntime } from "./catalog-runtime-CpCmlD9L.js";
6
- import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-HoQiUKLL.js";
1
+ import { Qi as startOAuthFlow } from "./projection-B08mfi0u.js";
2
+ import { n as botConfig } from "./config-Dj9M_nqB.js";
3
+ import { I as deleteProviderIdentityForSlackUser, L as deleteProviderIdentityForUser, s as getSqlExecutor } from "./db-Br0tfAo7.js";
4
+ import { u as hasRequiredOAuthScope } from "./registry-BDWgCJDf.js";
5
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-0kuQqYL4.js";
6
+ import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-CneTquAE.js";
7
7
  import { randomBytes } from "node:crypto";
8
8
  // src/handlers/oauth-html.ts
9
9
  /** Build pre-escaped callback HTML with the shared response security policy. */
@@ -264,16 +264,9 @@ const reviewItemChangeRecordSchema = z.object({
264
264
  *
265
265
  * `lastReadSeq` is the event sequence of the last transcript row the viewer
266
266
  * saw. Reports only move it forward: the server keeps the highest value it
267
- * receives. Only Mark as unread moves it back. It is never before the
268
- * viewer's own latest Message.
267
+ * receives. It is never before the viewer's own latest Message.
269
268
  */
270
269
  const conversationReadPositionSchema = z.object({ lastReadSeq: z.number().int().nonnegative() }).strict();
271
- /**
272
- * The reply to a read report: the stored read position and whether Junior's
273
- * latest visible reply is still after it. The dashboard clears the unread
274
- * flag from this, so it does not refetch the feed after each report.
275
- */
276
- const conversationReadReportSchema = conversationReadPositionSchema.extend({ unreadReply: z.boolean() }).strict();
277
270
  // src/api/schema/conversation-title.ts
278
271
  /** Longest Conversation title that a rename can save. */
279
272
  const CONVERSATION_TITLE_MAX_LENGTH = 200;
@@ -468,13 +461,6 @@ const conversationSummaryReportSchema = z.object({
468
461
  pinnedAt: z.string().datetime().nullable().optional(),
469
462
  /** The viewer's place in Pinned. Unset until they reorder their pins. */
470
463
  pinPosition: z.number().int().optional(),
471
- /**
472
- * True when the conversation is idle and Junior's latest reply that the
473
- * transcript shows is after the viewer's read position. Quiet replies do
474
- * not count. Opening the conversation does not move the position; reading
475
- * in it, replying, archiving, or Mark as read does.
476
- */
477
- unread: z.boolean().optional(),
478
464
  channel: z.string().optional(),
479
465
  channelName: z.string().optional(),
480
466
  channelNameRedacted: z.boolean().optional(),
@@ -957,4 +943,4 @@ const conversationDetailReportSchema = conversationSummaryReportSchema.extend({
957
943
  sentryConversationUrl: z.string().optional(),
958
944
  sourceTask: conversationSourceTaskSchema.optional()
959
945
  }).strict().superRefine(validateConversationEvents);
960
- export { renameConversationResponseSchema as A, MAX_INPUT_IMAGES as B, createConversationMessageBodySchema as C, CONVERSATION_TITLE_MAX_LENGTH as D, conversationChildAgentTotalsSchema as E, messageCardRef as F, briefLinkSchema as G, messageAttachmentSchema as H, messageCardText as I, conversationBriefSchema as J, briefOutcomeStatusSchema as K, readMessageCardRefs as L, conversationReadReportSchema as M, reviewItemChangeRecordSchema as N, conversationTitleSchema as O, annotationCard as P, removedCardSchema as R, createConversationBodySchema as S, forkConversationResponseSchema as T, readMessageAttachments as U, MAX_INPUT_IMAGE_BYTES as V, briefCodeChangeSchema as W, parseStoredBrief as X, parseBriefInput as Y, conversationReportMessageEventSchema as _, conversationActivityPreviewSchema as a, conversationSurfaceSchema as b, conversationDetailQuerySchema as c, conversationEventPageSchema as d, conversationEventsQuerySchema as f, conversationReportEventSchema as g, conversationReportEventDataSchema as h, actorIdentitySchema as i, conversationReadPositionSchema as j, renameConversationBodySchema as k, conversationDetailReportSchema as l, conversationParamsSchema as m, CONVERSATION_VERSION_HEADER as n, conversationAttachmentParamsSchema as o, conversationFeedQuerySchema as p, briefResourceLabel as q, acceptedConversationMessageSchema as r, conversationAuxiliaryCostsSchema as s, CONVERSATION_DETAIL_VERSION_HEADER as t, conversationEventHistorySchema as u, conversationReportStatusSchema as v, forkConversationBodySchema as w, conversationUsageSchema as x, conversationSummaryReportSchema as y, resolveMessageCards as z };
946
+ export { renameConversationResponseSchema as A, MAX_INPUT_IMAGE_BYTES as B, createConversationMessageBodySchema as C, CONVERSATION_TITLE_MAX_LENGTH as D, conversationChildAgentTotalsSchema as E, messageCardText as F, briefOutcomeStatusSchema as G, readMessageAttachments as H, readMessageCardRefs as I, parseBriefInput as J, briefResourceLabel as K, removedCardSchema as L, reviewItemChangeRecordSchema as M, annotationCard as N, conversationTitleSchema as O, messageCardRef as P, resolveMessageCards as R, createConversationBodySchema as S, forkConversationResponseSchema as T, briefCodeChangeSchema as U, messageAttachmentSchema as V, briefLinkSchema as W, parseStoredBrief as Y, conversationReportMessageEventSchema as _, conversationActivityPreviewSchema as a, conversationSurfaceSchema as b, conversationDetailQuerySchema as c, conversationEventPageSchema as d, conversationEventsQuerySchema as f, conversationReportEventSchema as g, conversationReportEventDataSchema as h, actorIdentitySchema as i, conversationReadPositionSchema as j, renameConversationBodySchema as k, conversationDetailReportSchema as l, conversationParamsSchema as m, CONVERSATION_VERSION_HEADER as n, conversationAttachmentParamsSchema as o, conversationFeedQuerySchema as p, conversationBriefSchema as q, acceptedConversationMessageSchema as r, conversationAuxiliaryCostsSchema as s, CONVERSATION_DETAIL_VERSION_HEADER as t, conversationEventHistorySchema as u, conversationReportStatusSchema as v, forkConversationBodySchema as w, conversationUsageSchema as x, conversationSummaryReportSchema as y, MAX_INPUT_IMAGES as z };
@@ -1,4 +1,4 @@
1
- import { H as messageAttachmentSchema, K as briefOutcomeStatusSchema, N as reviewItemChangeRecordSchema, i as actorIdentitySchema, l as conversationDetailReportSchema, y as conversationSummaryReportSchema } from "./conversation-CMkSmi02.js";
1
+ import { G as briefOutcomeStatusSchema, M as reviewItemChangeRecordSchema, V as messageAttachmentSchema, i as actorIdentitySchema, l as conversationDetailReportSchema, y as conversationSummaryReportSchema } from "./conversation-CvcBU1z2.js";
2
2
  import * as z from "zod";
3
3
  // src/reporting-schema.ts
4
4
  const healthReportSchema = z.object({
@@ -1,4 +1,4 @@
1
- import { h as logWarn } from "./logging-D0svFM8r.js";
1
+ import { h as logWarn } from "./logging-CQjlDQYX.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  // src/chat/conversation-privacy.ts
4
4
  const SAFE_METADATA_KEY_LIMIT = 20;