@sentry/junior 0.298.0 → 0.300.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 (95) hide show
  1. package/dist/{actor-6jsm_v96.js → actor-D2iXzvlN.js} +2 -1
  2. package/dist/{state-CSuA2J1V.js → adapter-S5UkjNK3.js} +53 -136
  3. package/dist/{admin-BF3DbYGf.js → admin-UrTniSPO.js} +2 -2
  4. package/dist/{agent-runner-Q9GkoerG.js → agent-runner-bY4_0UPm.js} +1444 -1478
  5. package/dist/api/schema.d.ts +2 -2
  6. package/dist/api/schema.js +7 -7
  7. package/dist/api.d.ts +1 -1
  8. package/dist/api.js +382 -68
  9. package/dist/{app-DOg_mCtV.d.ts → app-D-AcIcCV.d.ts} +17 -4
  10. package/dist/app.d.ts +1 -1
  11. package/dist/app.js +148 -483
  12. package/dist/{automation-Cn8qmbdr.js → automation-Dw82oQ-h.js} +2 -2
  13. package/dist/{background-compaction-queue-BZhGFOK6.js → background-compaction-queue-B6U3060-.js} +9 -5
  14. package/dist/{briefs-CQrCRF6-.js → briefs-DqiwWu-n.js} +4 -4
  15. package/dist/{catalog-runtime-DZeD2WbL.js → catalog-runtime-D1oYNv04.js} +1 -1
  16. package/dist/cli/chat.js +17 -17
  17. package/dist/cli/check.js +3 -3
  18. package/dist/cli/main.js +3 -3
  19. package/dist/cli/plugins.js +5 -5
  20. package/dist/cli/snapshot-create.js +4 -4
  21. package/dist/cli/upgrade.d.ts +1 -1
  22. package/dist/cli/upgrade.js +4 -4
  23. package/dist/{config-BOByVnxe.js → config-9nHoFiJP.js} +117 -12
  24. package/dist/{connections-BNN5cJam.js → connections-DZjTN3JC.js} +6 -6
  25. package/dist/continue-in-slack-Dtv7_U42.js +176 -0
  26. package/dist/{conversation-DCkzvxqB.js → conversation-Dyjq2CZ8.js} +36 -13
  27. package/dist/{conversation-feed-CMA12Rjs.js → conversation-feed-CcDxlrlQ.js} +109 -3
  28. package/dist/{conversation-privacy-C0eRxsgb.js → conversation-privacy-D-5HTXjS.js} +1 -1
  29. package/dist/{conversation-turn-D9qvcDX6.js → conversation-turn-Cxl8WZD7.js} +85 -68
  30. package/dist/{credential-sync-B_iUpxGL.js → credential-sync-C49ClwDX.js} +18 -18
  31. package/dist/{db-DoMcnYol.d.ts → db-2resqBh1.d.ts} +1 -1
  32. package/dist/{db-CoMNr2Zm.js → db-BJNo6fK5.js} +176 -12
  33. package/dist/{executor-C-m8VrzX.js → executor-DBIaOeJ_.js} +47 -13
  34. package/dist/{media-BepyEUNm.js → history-IjdmO_r6.js} +1 -85
  35. package/dist/instrumentation.js +14 -5
  36. package/dist/lineage-0dereG7H.js +37 -0
  37. package/dist/{logging-CJTi5niy.js → logging-BIclibct.js} +1 -1
  38. package/dist/{message-Q6_5DAWR.js → message-dkOl-Iii.js} +9 -10
  39. package/dist/model-input-CLo9TaUd.js +82 -0
  40. package/dist/nitro.d.ts +1 -1
  41. package/dist/nitro.js +17 -9
  42. package/dist/{oauth-callback-server-CH5XAyo-.js → oauth-callback-server-WmpjfJgQ.js} +2 -2
  43. package/dist/{plugins-HYh_JOdw.js → plugins-BBX07Jzt.js} +1 -1
  44. package/dist/{projection-BgwEE36_.js → projection-w_X-zi7v.js} +1035 -692
  45. package/dist/{prompt-DXc9DYT9.js → prompt-B1Xw46-S.js} +4 -4
  46. package/dist/{registry-9XwqSnM-.js → registry-BmP5vnlj.js} +4 -4
  47. package/dist/{resolve-DUIAbcRL.js → resolve-goo34bJK.js} +3 -3
  48. package/dist/{result-C2Vn8QGn.js → result-PVBeU0Wf.js} +158 -69
  49. package/dist/{runner-CXGtw-Mc.js → runner-DKrfvNV6.js} +9 -9
  50. package/dist/{sandbox-egress-signals-Di3S_dO7.js → sandbox-egress-signals-DsUcqrI0.js} +1 -1
  51. package/dist/{schema-Dyp7racy.js → schema-C9iNFz5n.js} +51 -7
  52. package/dist/{schema-BnbZ-rKv.d.ts → schema-Dns-sTas.d.ts} +1285 -761
  53. package/dist/{service-account-DM3KBBeG.js → service-account-CMAAloAL.js} +3 -3
  54. package/dist/{service-account-GzAMUQ8a.js → service-account-CmowamcB.js} +4 -4
  55. package/dist/session-stop-BcAXze8a.js +3330 -0
  56. package/dist/{skills-DCK9SD_l.js → skills-DfsazET6.js} +3 -3
  57. package/dist/slack-conversation-unfurl-CzQonuWz.js +370 -0
  58. package/dist/spawn-C7o0FDDp.js +73 -0
  59. package/dist/state-zSilNpbi.js +132 -0
  60. package/dist/{user-input-request-CXNIov9n.js → statuses-Hn-HsOph.js} +115 -26
  61. package/dist/{stop-Dh2DfwpK.js → stop-CFOujp8C.js} +9105 -6007
  62. package/dist/{store-DrA17Fbz.js → store-Dkeis_8o.js} +10 -10
  63. package/dist/{store-B1zepKG8.js → store-E3x2Fg_F.js} +24 -4
  64. package/dist/{task-queue-D1rXWfFN.js → task-queue-D-hCqdZW.js} +4 -4
  65. package/dist/{task-runner-CT4M8oDz.js → task-runner-vohUPLHe.js} +10 -10
  66. package/dist/{thread-context-DnqUkbzN.js → thread-context-BzvdkgI9.js} +18 -18
  67. package/dist/{turn-session-routing-VXDVXLRl.js → turn-session-routing-Bo_LxFum.js} +5 -5
  68. package/dist/turn-user-message-D5RnVmxQ.js +355 -0
  69. package/dist/users-2bggndVg.js +424 -0
  70. package/dist/{validation-zxAJBDDy.js → validation-BbWikeSa.js} +1 -1
  71. package/dist/{version-DcZ40a0g.js → version-GVBMW2jA.js} +1 -1
  72. package/dist/version.js +1 -1
  73. package/dist/{viewer-CgiGjW10.js → viewer-BpxRliyO.js} +36 -163
  74. package/dist/{warmup-CwKbxQLl.js → warmup-BW2qwnal.js} +1140 -145
  75. package/dist/{worker-CbDUzaBA.js → worker-Cbd-iuwZ.js} +25 -20
  76. package/migrations/0104_code_change_draft.sql +1 -0
  77. package/migrations/0105_attachment_uploads.sql +14 -0
  78. package/migrations/0106_conversation_agent_config.sql +1 -0
  79. package/migrations/0107_attachment_deferred_download.sql +2 -0
  80. package/migrations/meta/0104_snapshot.json +4516 -0
  81. package/migrations/meta/0105_snapshot.json +4611 -0
  82. package/migrations/meta/0106_snapshot.json +4617 -0
  83. package/migrations/meta/0107_snapshot.json +4617 -0
  84. package/migrations/meta/_journal.json +28 -0
  85. package/package.json +10 -8
  86. package/dist/attempt-selection-ClP3MMPr.js +0 -61
  87. package/dist/locks-D-0h111u.js +0 -48
  88. package/dist/notification-Bv25xbj0.js +0 -1284
  89. package/dist/prompt-input-BUr4J9RO.js +0 -1424
  90. package/dist/session-stop-D4i7e6iT.js +0 -181
  91. package/dist/spawn-6cX6xE9G.js +0 -80
  92. package/dist/turn-cancel-l460pfGW.js +0 -201
  93. package/dist/turn-user-message-BSPmkm7X.js +0 -608
  94. package/dist/turn-wake-DVFVXyhX.js +0 -161
  95. package/dist/{oauth-relay-CsfIazeF.js → oauth-relay-DRzq73b6.js} +1 -1
@@ -15,32 +15,11 @@ function isAgentInvocationResultEventType(eventType) {
15
15
  const AGENT_REPLY_EVENT_TYPE = "agent.reply";
16
16
  /** Event type of a message that a child agent sends to its parent. */
17
17
  const AGENT_MESSAGE_EVENT_TYPE = "agent.message";
18
- // src/chat/agent-invocations/statuses.ts
19
- const AGENT_INVOCATION_STATUSES = [
20
- "pending",
21
- "running",
22
- "paused",
23
- "blocked",
24
- "completed",
25
- "failed",
26
- "stopped"
27
- ];
28
- const AGENT_INVOCATION_MAILBOX_STATUSES = ["pending", "appended"];
29
18
  /**
30
- * Parent mailbox append state. Only terminal invocations have a value.
31
- * `replaced` means the child still had open work, so a later agent invocation
32
- * on the same child sends the result instead. `skipped` means a stop ended
33
- * the work, so the result is never used. `steered` means the agent invocation
34
- * that was running read the input as a steering message, so its result covers
35
- * this one.
19
+ * Event type of a parent agent task or message to a child that no agent
20
+ * invocation names.
36
21
  */
37
- const AGENT_INVOCATION_PARENT_MAILBOX_STATUSES = [
38
- "pending",
39
- "appended",
40
- "replaced",
41
- "skipped",
42
- "steered"
43
- ];
22
+ const AGENT_PARENT_MESSAGE_EVENT_TYPE = "agent.parent_message";
44
23
  // src/api/schema/user-customization.ts
45
24
  /** Longest customization text one user can save. */
46
25
  const USER_CUSTOMIZATION_MAX_CHARS = 1e3;
@@ -48,6 +27,90 @@ const USER_CUSTOMIZATION_MAX_CHARS = 1e3;
48
27
  const userCustomizationTextSchema = z.string().trim().max(USER_CUSTOMIZATION_MAX_CHARS);
49
28
  /** Request and response body for the viewer's customization. */
50
29
  const userCustomizationSchema = z.object({ customization: userCustomizationTextSchema }).strict();
30
+ // src/chat/attachments/media.ts
31
+ const INPUT_IMAGE_TYPES = [
32
+ "image/png",
33
+ "image/jpeg",
34
+ "image/gif",
35
+ "image/webp"
36
+ ];
37
+ /** Video types that browsers play in a `<video>` element. */
38
+ const INLINE_VIDEO_TYPES = ["video/mp4", "video/webm"];
39
+ /** Leading bytes of each accepted image type. `null` matches any byte. */
40
+ const IMAGE_SIGNATURES = [
41
+ {
42
+ mediaType: "image/png",
43
+ bytes: [
44
+ 137,
45
+ 80,
46
+ 78,
47
+ 71,
48
+ 13,
49
+ 10,
50
+ 26,
51
+ 10
52
+ ]
53
+ },
54
+ {
55
+ mediaType: "image/jpeg",
56
+ bytes: [
57
+ 255,
58
+ 216,
59
+ 255
60
+ ]
61
+ },
62
+ {
63
+ mediaType: "image/gif",
64
+ bytes: [
65
+ 71,
66
+ 73,
67
+ 70,
68
+ 56,
69
+ 55,
70
+ 97
71
+ ]
72
+ },
73
+ {
74
+ mediaType: "image/gif",
75
+ bytes: [
76
+ 71,
77
+ 73,
78
+ 70,
79
+ 56,
80
+ 57,
81
+ 97
82
+ ]
83
+ },
84
+ {
85
+ mediaType: "image/webp",
86
+ bytes: [
87
+ 82,
88
+ 73,
89
+ 70,
90
+ 70,
91
+ null,
92
+ null,
93
+ null,
94
+ null,
95
+ 87,
96
+ 69,
97
+ 66,
98
+ 80
99
+ ]
100
+ }
101
+ ];
102
+ /**
103
+ * Detect an accepted image type from file bytes. Use this instead of a file
104
+ * name or declared content type, which can be wrong.
105
+ */
106
+ function detectImageMediaType(data) {
107
+ return IMAGE_SIGNATURES.find(({ bytes }) => data.length >= bytes.length && bytes.every((byte, index) => byte === null || data[index] === byte))?.mediaType;
108
+ }
109
+ /** Report whether a media type is a raster image accepted by vision models. */
110
+ function isVisionImageMediaType(mediaType) {
111
+ const normalized = mediaType.split(";", 1)[0]?.trim().toLowerCase();
112
+ return normalized ? INPUT_IMAGE_TYPES.some((type) => type === normalized) : false;
113
+ }
51
114
  // src/chat/tools/runtime/user-input-request.ts
52
115
  const USER_INPUT_LIMITS = {
53
116
  maxButtonOptions: 5,
@@ -64,7 +127,7 @@ const descriptionSchema = z.string().trim().min(1).max(USER_INPUT_LIMITS.maxDesc
64
127
  const optionSchema = z.object({
65
128
  label: labelSchema.describe("Short choice text, such as `Accept` or `Decline`. The answer uses this exact text."),
66
129
  description: descriptionSchema.describe("Optional short note about what this choice does."),
67
- recommended: z.boolean().optional().describe("Set true on the choice that you recommend, and say why in its description. A `choice` field can recommend one option.")
130
+ recommended: z.boolean().optional().describe("Set true on the choice that you recommend, put that choice first, and say why in its description. A `choice` field can recommend one option.")
68
131
  });
69
132
  const fieldBase = {
70
133
  id: z.string().regex(/^[a-z][a-z0-9_]{0,31}$/).describe("Stable key for this field, such as `approach`."),
@@ -176,4 +239,30 @@ function formatUserInputAnswer(request, answer) {
176
239
  if (normalized.other) lines.push(answerLine(`Other: ${normalized.other}`));
177
240
  return lines.join("\n");
178
241
  }
179
- export { agentInvocationResultEventType as _, isEmptyUserInputAnswer as a, USER_CUSTOMIZATION_MAX_CHARS as c, AGENT_INVOCATION_MAILBOX_STATUSES as d, AGENT_INVOCATION_PARENT_MAILBOX_STATUSES as f, AGENT_REPLY_EVENT_TYPE as g, AGENT_MESSAGE_EVENT_TYPE as h, formatUserInputAnswer as i, userCustomizationSchema as l, AGENT_INVOCATION_EVENT_NAMESPACE as m, USER_INPUT_NOTE as n, normalizeUserInputAnswer as o, AGENT_INVOCATION_STATUSES as p, buttonUserInputField as r, userInputRequestSchema as s, USER_INPUT_LIMITS as t, userCustomizationTextSchema as u, isAgentInvocationResultEventType as v };
242
+ // src/chat/agent-invocations/statuses.ts
243
+ const AGENT_INVOCATION_STATUSES = [
244
+ "pending",
245
+ "running",
246
+ "paused",
247
+ "blocked",
248
+ "completed",
249
+ "failed",
250
+ "stopped"
251
+ ];
252
+ const AGENT_INVOCATION_MAILBOX_STATUSES = ["pending", "appended"];
253
+ /**
254
+ * Parent mailbox append state. Only terminal invocations have a value.
255
+ * `replaced` means the child still had open work, so a later agent invocation
256
+ * on the same child sends the result instead. `skipped` means a stop ended
257
+ * the work, so the result is never used. `steered` means the agent invocation
258
+ * that was running read the input as a steering message, so its result covers
259
+ * this one.
260
+ */
261
+ const AGENT_INVOCATION_PARENT_MAILBOX_STATUSES = [
262
+ "pending",
263
+ "appended",
264
+ "replaced",
265
+ "skipped",
266
+ "steered"
267
+ ];
268
+ export { isAgentInvocationResultEventType as C, agentInvocationResultEventType as S, userCustomizationTextSchema as _, USER_INPUT_NOTE as a, AGENT_PARENT_MESSAGE_EVENT_TYPE as b, isEmptyUserInputAnswer as c, INLINE_VIDEO_TYPES as d, INPUT_IMAGE_TYPES as f, userCustomizationSchema as g, USER_CUSTOMIZATION_MAX_CHARS as h, USER_INPUT_LIMITS as i, normalizeUserInputAnswer as l, isVisionImageMediaType as m, AGENT_INVOCATION_PARENT_MAILBOX_STATUSES as n, buttonUserInputField as o, detectImageMediaType as p, AGENT_INVOCATION_STATUSES as r, formatUserInputAnswer as s, AGENT_INVOCATION_MAILBOX_STATUSES as t, userInputRequestSchema as u, AGENT_INVOCATION_EVENT_NAMESPACE as v, AGENT_REPLY_EVENT_TYPE as x, AGENT_MESSAGE_EVENT_TYPE as y };