@sentry/junior 0.123.0 → 0.124.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 (53) hide show
  1. package/dist/{agent-hooks-7JCABN73.js → agent-hooks-RPQRUAGN.js} +7 -7
  2. package/dist/api/conversations/detail.d.ts +2 -2
  3. package/dist/api/conversations/event-list.d.ts +2 -2
  4. package/dist/api/conversations/events.d.ts +1 -1
  5. package/dist/api/schema/conversation.d.ts +8 -8
  6. package/dist/api/schema.js +1 -1
  7. package/dist/api.js +23 -22
  8. package/dist/app.js +21 -21
  9. package/dist/{catalog-runtime-SZAS6EVH.js → catalog-runtime-QM2W6BBD.js} +5 -5
  10. package/dist/chat/conversations/history.d.ts +7 -7
  11. package/dist/chat/conversations/projection.d.ts +13 -0
  12. package/dist/chat/conversations/structured-events.d.ts +31 -0
  13. package/dist/chat/services/provider-error.d.ts +2 -0
  14. package/dist/chat/tools/query-conversation-events.d.ts +1 -1
  15. package/dist/{chunk-QKYO7ZNS.js → chunk-4HQMMFRL.js} +1 -1
  16. package/dist/{chunk-3S2K7SYY.js → chunk-4OWSABFE.js} +39 -16
  17. package/dist/{chunk-7YOBVIHY.js → chunk-7S36LUYT.js} +1 -1
  18. package/dist/{chunk-XLPETJXX.js → chunk-APPWCJVJ.js} +1 -1
  19. package/dist/{chunk-JMUPEYKC.js → chunk-AYQZCJZJ.js} +4 -4
  20. package/dist/{chunk-DAMUPWYR.js → chunk-EKVBTUVM.js} +2 -2
  21. package/dist/{chunk-5P4QBMTY.js → chunk-GBIFLB5Y.js} +57 -11
  22. package/dist/{chunk-2DZD6HX2.js → chunk-HOVHXQQE.js} +4 -4
  23. package/dist/{chunk-JCJN6TPV.js → chunk-IYUHOYFA.js} +14 -1
  24. package/dist/{chunk-A3TUEGKH.js → chunk-MG3L3UGS.js} +1 -1
  25. package/dist/{chunk-DQQCWMA2.js → chunk-PBZEJRYY.js} +10 -8
  26. package/dist/{chunk-ZO4TL4OK.js → chunk-PGLSOXFU.js} +4 -4
  27. package/dist/{chunk-MU6HHZEN.js → chunk-PR3M62LK.js} +74 -0
  28. package/dist/{chunk-ZOOZ25BO.js → chunk-RW6MD6ZV.js} +1 -1
  29. package/dist/{chunk-5EUADEG3.js → chunk-TFO4SDCQ.js} +1 -1
  30. package/dist/{chunk-VTWLP6YS.js → chunk-UZAOIEAR.js} +1 -1
  31. package/dist/{chunk-JPG43UG7.js → chunk-VLAWZSCB.js} +9 -4
  32. package/dist/{chunk-THYOK2SL.js → chunk-W4YS2LXS.js} +3 -3
  33. package/dist/{chunk-RQ6BLJJD.js → chunk-WFIXN6UU.js} +7 -7
  34. package/dist/{chunk-K5DCMBUV.js → chunk-WKLA6WLW.js} +48 -6
  35. package/dist/{chunk-DVPWU77W.js → chunk-YYAQ5ZNK.js} +7 -7
  36. package/dist/{chunk-LEQXDCWK.js → chunk-ZV2K3WM4.js} +1 -1
  37. package/dist/cli/chat.js +22 -22
  38. package/dist/cli/check.js +6 -6
  39. package/dist/cli/plugins.js +10 -10
  40. package/dist/cli/snapshot-create.js +8 -8
  41. package/dist/cli/upgrade.js +5 -5
  42. package/dist/{db-XKB2CHDW.js → db-2W4KOPLN.js} +5 -5
  43. package/dist/instrumentation.js +2 -2
  44. package/dist/nitro.js +2 -2
  45. package/dist/{oauth-callback-server-EVMACH4G.js → oauth-callback-server-3TGRLQUD.js} +16 -16
  46. package/dist/{runner-BVHV5Y6L.js → runner-NAVNNKQY.js} +11 -11
  47. package/dist/{skills-QTI6GGJ4.js → skills-FIVS6EXW.js} +6 -6
  48. package/dist/{validation-SCQUYIUU.js → validation-NX4DAKNV.js} +6 -6
  49. package/dist/version.js +1 -1
  50. package/migrations/0012_structured_conversation_events.sql +4 -0
  51. package/migrations/meta/0012_snapshot.json +1244 -0
  52. package/migrations/meta/_journal.json +7 -0
  53. package/package.json +6 -6
@@ -11,20 +11,20 @@ import {
11
11
  getPlugins,
12
12
  setPlugins,
13
13
  validatePlugins
14
- } from "./chunk-ZO4TL4OK.js";
15
- import "./chunk-DVPWU77W.js";
14
+ } from "./chunk-PGLSOXFU.js";
15
+ import "./chunk-YYAQ5ZNK.js";
16
16
  import "./chunk-GCGJGSQL.js";
17
- import "./chunk-ZOOZ25BO.js";
18
- import "./chunk-JCJN6TPV.js";
17
+ import "./chunk-RW6MD6ZV.js";
18
+ import "./chunk-IYUHOYFA.js";
19
19
  import "./chunk-VFUK3X5B.js";
20
20
  import "./chunk-S7G34U75.js";
21
21
  import "./chunk-HZF5P5UN.js";
22
- import "./chunk-JPG43UG7.js";
22
+ import "./chunk-VLAWZSCB.js";
23
23
  import "./chunk-OB42YVAE.js";
24
24
  import "./chunk-F3B2YJ76.js";
25
25
  import "./chunk-6GWA276C.js";
26
- import "./chunk-VTWLP6YS.js";
27
- import "./chunk-7YOBVIHY.js";
26
+ import "./chunk-UZAOIEAR.js";
27
+ import "./chunk-7S36LUYT.js";
28
28
  import "./chunk-MLKGABMK.js";
29
29
  export {
30
30
  PluginHookDeniedError,
@@ -167,11 +167,11 @@ declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
167
167
  version: import("zod").ZodNumber;
168
168
  content: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
169
169
  }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
170
- type: import("zod").ZodLiteral<"plugin_event">;
170
+ type: import("zod").ZodLiteral<"structured_event">;
171
171
  namespace: import("zod").ZodString;
172
172
  name: import("zod").ZodString;
173
173
  version: import("zod").ZodNumber;
174
- turnId: import("zod").ZodString;
174
+ turnId: import("zod").ZodOptional<import("zod").ZodString>;
175
175
  presentation: import("zod").ZodObject<{
176
176
  details: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
177
177
  description: import("zod").ZodOptional<import("zod").ZodString>;
@@ -84,11 +84,11 @@ declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
84
84
  version: import("zod").ZodNumber;
85
85
  content: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
86
86
  }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
87
- type: import("zod").ZodLiteral<"plugin_event">;
87
+ type: import("zod").ZodLiteral<"structured_event">;
88
88
  namespace: import("zod").ZodString;
89
89
  name: import("zod").ZodString;
90
90
  version: import("zod").ZodNumber;
91
- turnId: import("zod").ZodString;
91
+ turnId: import("zod").ZodOptional<import("zod").ZodString>;
92
92
  presentation: import("zod").ZodObject<{
93
93
  details: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
94
94
  description: import("zod").ZodOptional<import("zod").ZodString>;
@@ -1,7 +1,7 @@
1
1
  import type { ConversationEvent } from "@/chat/conversations/history";
2
2
  import { type ConversationReportEvent } from "../schema/conversation";
3
3
  /** Canonical event types that can contribute to the reporting projection. */
4
- export declare const conversationReportSourceEventTypes: readonly ["message", "message_handled", "assistant_message", "tool_result", "tool_execution_started", "guardian_action_reviewed", "turn_started", "turn_context", "plugin_event", "turn_routed", "turn_completed", "turn_failed", "compaction", "handoff", "subagent_started", "subagent_ended"];
4
+ export declare const conversationReportSourceEventTypes: readonly ["message", "message_handled", "assistant_message", "tool_result", "tool_execution_started", "guardian_action_reviewed", "turn_started", "turn_context", "structured_event", "turn_routed", "turn_completed", "turn_failed", "compaction", "handoff", "subagent_started", "subagent_ended"];
5
5
  /** Return tool result ids that may need start metadata from outside a page. */
6
6
  export declare function conversationReportToolResultIds(events: ConversationEvent[]): string[];
7
7
  /**
@@ -183,11 +183,11 @@ export declare const conversationReportEventDataSchema: z.ZodDiscriminatedUnion<
183
183
  version: z.ZodNumber;
184
184
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
185
185
  }, z.core.$strict>, z.ZodObject<{
186
- type: z.ZodLiteral<"plugin_event">;
186
+ type: z.ZodLiteral<"structured_event">;
187
187
  namespace: z.ZodString;
188
188
  name: z.ZodString;
189
189
  version: z.ZodNumber;
190
- turnId: z.ZodString;
190
+ turnId: z.ZodOptional<z.ZodString>;
191
191
  presentation: z.ZodObject<{
192
192
  details: z.ZodOptional<z.ZodArray<z.ZodObject<{
193
193
  description: z.ZodOptional<z.ZodString>;
@@ -359,11 +359,11 @@ export declare const conversationReportEventSchema: z.ZodObject<{
359
359
  version: z.ZodNumber;
360
360
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
361
361
  }, z.core.$strict>, z.ZodObject<{
362
- type: z.ZodLiteral<"plugin_event">;
362
+ type: z.ZodLiteral<"structured_event">;
363
363
  namespace: z.ZodString;
364
364
  name: z.ZodString;
365
365
  version: z.ZodNumber;
366
- turnId: z.ZodString;
366
+ turnId: z.ZodOptional<z.ZodString>;
367
367
  presentation: z.ZodObject<{
368
368
  details: z.ZodOptional<z.ZodArray<z.ZodObject<{
369
369
  description: z.ZodOptional<z.ZodString>;
@@ -646,11 +646,11 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
646
646
  version: z.ZodNumber;
647
647
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
648
648
  }, z.core.$strict>, z.ZodObject<{
649
- type: z.ZodLiteral<"plugin_event">;
649
+ type: z.ZodLiteral<"structured_event">;
650
650
  namespace: z.ZodString;
651
651
  name: z.ZodString;
652
652
  version: z.ZodNumber;
653
- turnId: z.ZodString;
653
+ turnId: z.ZodOptional<z.ZodString>;
654
654
  presentation: z.ZodObject<{
655
655
  details: z.ZodOptional<z.ZodArray<z.ZodObject<{
656
656
  description: z.ZodOptional<z.ZodString>;
@@ -836,11 +836,11 @@ export declare const conversationEventPageSchema: z.ZodObject<{
836
836
  version: z.ZodNumber;
837
837
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
838
838
  }, z.core.$strict>, z.ZodObject<{
839
- type: z.ZodLiteral<"plugin_event">;
839
+ type: z.ZodLiteral<"structured_event">;
840
840
  namespace: z.ZodString;
841
841
  name: z.ZodString;
842
842
  version: z.ZodNumber;
843
- turnId: z.ZodString;
843
+ turnId: z.ZodOptional<z.ZodString>;
844
844
  presentation: z.ZodObject<{
845
845
  details: z.ZodOptional<z.ZodArray<z.ZodObject<{
846
846
  description: z.ZodOptional<z.ZodString>;
@@ -30,7 +30,7 @@ import {
30
30
  revokePersonalTokenResponseSchema,
31
31
  statSchema,
32
32
  statsReportSchema
33
- } from "../chunk-JMUPEYKC.js";
33
+ } from "../chunk-AYQZCJZJ.js";
34
34
  import {
35
35
  healthReportSchema,
36
36
  pluginOperationalReportFeedSchema,
package/dist/api.js CHANGED
@@ -24,18 +24,18 @@ import {
24
24
  personalTokenParamsSchema,
25
25
  revokePersonalTokenResponseSchema,
26
26
  statsReportSchema
27
- } from "./chunk-JMUPEYKC.js";
27
+ } from "./chunk-AYQZCJZJ.js";
28
28
  import {
29
29
  formatSlackConversationRedactedLabel,
30
30
  readHealthReport,
31
31
  resolveSlackConversationContextFromThreadId
32
- } from "./chunk-LEQXDCWK.js";
32
+ } from "./chunk-ZV2K3WM4.js";
33
33
  import {
34
34
  buildSentryConversationUrl
35
35
  } from "./chunk-4CODA7P5.js";
36
36
  import {
37
37
  renderPluginConversationEvent
38
- } from "./chunk-THYOK2SL.js";
38
+ } from "./chunk-W4YS2LXS.js";
39
39
  import {
40
40
  healthReportSchema,
41
41
  pluginOperationalReportFeedSchema,
@@ -45,23 +45,24 @@ import {
45
45
  } from "./chunk-PE44LDDQ.js";
46
46
  import {
47
47
  readStats
48
- } from "./chunk-5EUADEG3.js";
48
+ } from "./chunk-TFO4SDCQ.js";
49
49
  import {
50
50
  agentTurnUsageSchema,
51
- hasAgentTurnUsage
52
- } from "./chunk-MU6HHZEN.js";
51
+ hasAgentTurnUsage,
52
+ renderJuniorNativeConversationEvent
53
+ } from "./chunk-PR3M62LK.js";
53
54
  import "./chunk-PDO5BLNM.js";
54
55
  import {
55
56
  createPluginLogger,
56
57
  getPlugins,
57
58
  listConversationAnnotations,
58
59
  readViewerActors
59
- } from "./chunk-ZO4TL4OK.js";
60
+ } from "./chunk-PGLSOXFU.js";
60
61
  import {
61
62
  decodeStoredConversationEvent,
62
63
  getDb,
63
64
  getSqlExecutor
64
- } from "./chunk-DVPWU77W.js";
65
+ } from "./chunk-YYAQ5ZNK.js";
65
66
  import {
66
67
  juniorApiTokens,
67
68
  juniorConversationEvents,
@@ -69,8 +70,8 @@ import {
69
70
  juniorIdentities,
70
71
  juniorUsers
71
72
  } from "./chunk-GCGJGSQL.js";
72
- import "./chunk-ZOOZ25BO.js";
73
- import "./chunk-JCJN6TPV.js";
73
+ import "./chunk-RW6MD6ZV.js";
74
+ import "./chunk-IYUHOYFA.js";
74
75
  import {
75
76
  juniorDestinations
76
77
  } from "./chunk-VFUK3X5B.js";
@@ -79,12 +80,12 @@ import {
79
80
  parseSlackThreadId
80
81
  } from "./chunk-S7G34U75.js";
81
82
  import "./chunk-HZF5P5UN.js";
82
- import "./chunk-JPG43UG7.js";
83
+ import "./chunk-VLAWZSCB.js";
83
84
  import "./chunk-OB42YVAE.js";
84
85
  import "./chunk-F3B2YJ76.js";
85
86
  import "./chunk-6GWA276C.js";
86
- import "./chunk-VTWLP6YS.js";
87
- import "./chunk-7YOBVIHY.js";
87
+ import "./chunk-UZAOIEAR.js";
88
+ import "./chunk-7S36LUYT.js";
88
89
  import "./chunk-MLKGABMK.js";
89
90
 
90
91
  // src/api.ts
@@ -366,7 +367,7 @@ var conversationReportSourceEventTypes = [
366
367
  "guardian_action_reviewed",
367
368
  "turn_started",
368
369
  "turn_context",
369
- "plugin_event",
370
+ "structured_event",
370
371
  "turn_routed",
371
372
  "turn_completed",
372
373
  "turn_failed",
@@ -535,16 +536,16 @@ function conversationReportToolResultIds(events) {
535
536
  }
536
537
  function reportEventData(args) {
537
538
  const { data } = args;
538
- if (data.type === "plugin_event") {
539
+ if (data.type === "structured_event") {
539
540
  if (!args.canExposePayload) return void 0;
540
- const presentation = renderPluginConversationEvent(data);
541
+ const presentation = data.namespace === "junior" ? renderJuniorNativeConversationEvent(data) : renderPluginConversationEvent(data);
541
542
  if (!presentation) return void 0;
542
543
  return {
543
- type: "plugin_event",
544
+ type: "structured_event",
544
545
  namespace: data.namespace,
545
546
  name: data.name,
546
547
  version: data.version,
547
- turnId: data.turnId,
548
+ ...data.turnId ? { turnId: data.turnId } : {},
548
549
  presentation
549
550
  };
550
551
  }
@@ -1854,7 +1855,7 @@ function readDescriptionText(home) {
1854
1855
  }
1855
1856
  }
1856
1857
  async function readSkillReports() {
1857
- const { discoverSkills } = await import("./skills-QTI6GGJ4.js");
1858
+ const { discoverSkills } = await import("./skills-FIVS6EXW.js");
1858
1859
  const skills = await discoverSkills();
1859
1860
  return skillReportsSchema.parse(
1860
1861
  skills.map((skill) => ({
@@ -1864,7 +1865,7 @@ async function readSkillReports() {
1864
1865
  );
1865
1866
  }
1866
1867
  async function readPlugins() {
1867
- const { pluginCatalogRuntime } = await import("./catalog-runtime-SZAS6EVH.js");
1868
+ const { pluginCatalogRuntime } = await import("./catalog-runtime-QM2W6BBD.js");
1868
1869
  return pluginsSchema.parse(
1869
1870
  pluginCatalogRuntime.getProviders().map((plugin) => ({
1870
1871
  configKeys: plugin.manifest.configKeys ?? [],
@@ -1877,7 +1878,7 @@ async function readPlugins() {
1877
1878
  async function readRuntimeInfoReport() {
1878
1879
  const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
1879
1880
  import("./discovery-GUFTFBTL.js"),
1880
- import("./catalog-runtime-SZAS6EVH.js"),
1881
+ import("./catalog-runtime-QM2W6BBD.js"),
1881
1882
  readPlugins(),
1882
1883
  readSkillReports()
1883
1884
  ]);
@@ -1893,7 +1894,7 @@ async function readRuntimeInfoReport() {
1893
1894
  }
1894
1895
  async function readPluginOperationalReportFeed() {
1895
1896
  const nowMs = Date.now();
1896
- const { getPluginOperationalReports } = await import("./agent-hooks-7JCABN73.js");
1897
+ const { getPluginOperationalReports } = await import("./agent-hooks-RPQRUAGN.js");
1897
1898
  return pluginOperationalReportFeedSchema.parse({
1898
1899
  source: "plugins",
1899
1900
  generatedAt: new Date(nowMs).toISOString(),
package/dist/app.js CHANGED
@@ -50,7 +50,7 @@ import {
50
50
  startConversationWork,
51
51
  startSlackProcessingReaction,
52
52
  stripLeadingBotMention
53
- } from "./chunk-5P4QBMTY.js";
53
+ } from "./chunk-GBIFLB5Y.js";
54
54
  import "./chunk-FA6POGLH.js";
55
55
  import {
56
56
  ConversationTurnLifecycleService,
@@ -65,15 +65,15 @@ import {
65
65
  processPluginTask,
66
66
  requireTurnFailureEventId,
67
67
  scheduleSessionCompletedPluginTasks
68
- } from "./chunk-DQQCWMA2.js";
68
+ } from "./chunk-PBZEJRYY.js";
69
69
  import {
70
70
  GET,
71
71
  conversationVisibilityFromSlackChannelType,
72
72
  resolveSlackChannelTypeFromMessage,
73
73
  resolveSlackConversationContext
74
- } from "./chunk-LEQXDCWK.js";
74
+ } from "./chunk-ZV2K3WM4.js";
75
75
  import "./chunk-4CODA7P5.js";
76
- import "./chunk-THYOK2SL.js";
76
+ import "./chunk-W4YS2LXS.js";
77
77
  import "./chunk-PE44LDDQ.js";
78
78
  import {
79
79
  ConversationQueueMessageRejectedError,
@@ -91,7 +91,7 @@ import {
91
91
  import {
92
92
  validatePluginEgressCredentialHooks,
93
93
  validatePluginRegistrations
94
- } from "./chunk-A3TUEGKH.js";
94
+ } from "./chunk-MG3L3UGS.js";
95
95
  import {
96
96
  defineJuniorPlugins,
97
97
  pluginCatalogConfigFromEnv,
@@ -124,7 +124,7 @@ import {
124
124
  setConfigDefaults,
125
125
  shouldEmitDevAgentTrace,
126
126
  shouldPropagateSandboxEgressTrace
127
- } from "./chunk-3S2K7SYY.js";
127
+ } from "./chunk-4OWSABFE.js";
128
128
  import "./chunk-DIB4GX3G.js";
129
129
  import {
130
130
  RetryableDeliveryError,
@@ -135,7 +135,7 @@ import {
135
135
  formatProviderLabel,
136
136
  postSlackMessage,
137
137
  startOAuthFlow
138
- } from "./chunk-RQ6BLJJD.js";
138
+ } from "./chunk-WFIXN6UU.js";
139
139
  import {
140
140
  ConversationTurnBoundaryError,
141
141
  CooperativeTurnYieldError,
@@ -191,11 +191,11 @@ import {
191
191
  trimTrailingAssistantMessages,
192
192
  updateConversationStats,
193
193
  upsertConversationMessage
194
- } from "./chunk-K5DCMBUV.js";
194
+ } from "./chunk-WKLA6WLW.js";
195
195
  import "./chunk-HDSDCEPK.js";
196
- import "./chunk-2DZD6HX2.js";
197
- import "./chunk-5EUADEG3.js";
198
- import "./chunk-MU6HHZEN.js";
196
+ import "./chunk-HOVHXQQE.js";
197
+ import "./chunk-TFO4SDCQ.js";
198
+ import "./chunk-PR3M62LK.js";
199
199
  import "./chunk-PDO5BLNM.js";
200
200
  import "./chunk-UIE3R5XU.js";
201
201
  import {
@@ -219,7 +219,7 @@ import {
219
219
  validatePlugins,
220
220
  verifyScheduledTaskCredentialSubject,
221
221
  verifySlackDirectCredentialSubject
222
- } from "./chunk-ZO4TL4OK.js";
222
+ } from "./chunk-PGLSOXFU.js";
223
223
  import {
224
224
  contextProvenance,
225
225
  createSlackDestination,
@@ -230,7 +230,7 @@ import {
230
230
  instructionProvenanceFor,
231
231
  requireSlackDestination,
232
232
  withConversationEventLock
233
- } from "./chunk-DVPWU77W.js";
233
+ } from "./chunk-YYAQ5ZNK.js";
234
234
  import {
235
235
  juniorConversationEvents,
236
236
  juniorConversations
@@ -239,7 +239,7 @@ import {
239
239
  acquireActiveLock,
240
240
  getStateAdapter,
241
241
  sleep
242
- } from "./chunk-ZOOZ25BO.js";
242
+ } from "./chunk-RW6MD6ZV.js";
243
243
  import {
244
244
  STANDARD_MODEL_PROFILE,
245
245
  botConfig,
@@ -257,18 +257,18 @@ import {
257
257
  modelIdForProfile,
258
258
  setSlackReactionConfig,
259
259
  standardModelId
260
- } from "./chunk-JCJN6TPV.js";
260
+ } from "./chunk-IYUHOYFA.js";
261
261
  import {
262
262
  juniorDestinations
263
263
  } from "./chunk-VFUK3X5B.js";
264
264
  import {
265
265
  parseSlackThreadId
266
266
  } from "./chunk-S7G34U75.js";
267
- import "./chunk-DAMUPWYR.js";
267
+ import "./chunk-EKVBTUVM.js";
268
268
  import {
269
269
  pluginCatalogRuntime
270
- } from "./chunk-QKYO7ZNS.js";
271
- import "./chunk-XLPETJXX.js";
270
+ } from "./chunk-4HQMMFRL.js";
271
+ import "./chunk-APPWCJVJ.js";
272
272
  import {
273
273
  credentialSubjectSchema
274
274
  } from "./chunk-W3U3YQYI.js";
@@ -295,7 +295,7 @@ import {
295
295
  withContext,
296
296
  withLogContext,
297
297
  withSpan
298
- } from "./chunk-JPG43UG7.js";
298
+ } from "./chunk-VLAWZSCB.js";
299
299
  import {
300
300
  toOptionalString
301
301
  } from "./chunk-OB42YVAE.js";
@@ -310,10 +310,10 @@ import "./chunk-OOUNJNMR.js";
310
310
  import "./chunk-H4HBKISO.js";
311
311
  import {
312
312
  JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
313
- } from "./chunk-VTWLP6YS.js";
313
+ } from "./chunk-UZAOIEAR.js";
314
314
  import {
315
315
  JUNIOR_VERSION
316
- } from "./chunk-7YOBVIHY.js";
316
+ } from "./chunk-7S36LUYT.js";
317
317
  import "./chunk-MLKGABMK.js";
318
318
 
319
319
  // src/app.ts
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-QKYO7ZNS.js";
4
- import "./chunk-XLPETJXX.js";
3
+ } from "./chunk-4HQMMFRL.js";
4
+ import "./chunk-APPWCJVJ.js";
5
5
  import "./chunk-W3U3YQYI.js";
6
6
  import "./chunk-HZF5P5UN.js";
7
- import "./chunk-JPG43UG7.js";
7
+ import "./chunk-VLAWZSCB.js";
8
8
  import "./chunk-OB42YVAE.js";
9
9
  import "./chunk-F3B2YJ76.js";
10
10
  import "./chunk-6GWA276C.js";
11
11
  import "./chunk-OOUNJNMR.js";
12
12
  import "./chunk-H4HBKISO.js";
13
- import "./chunk-VTWLP6YS.js";
14
- import "./chunk-7YOBVIHY.js";
13
+ import "./chunk-UZAOIEAR.js";
14
+ import "./chunk-7S36LUYT.js";
15
15
  import "./chunk-MLKGABMK.js";
16
16
  export {
17
17
  pluginCatalogRuntime
@@ -276,11 +276,11 @@ export declare const conversationEventDataSchema: z.ZodUnion<readonly [z.ZodUnio
276
276
  version: z.ZodNumber;
277
277
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
278
278
  }, z.core.$strict>, z.ZodObject<{
279
- type: z.ZodLiteral<"plugin_event">;
279
+ type: z.ZodLiteral<"structured_event">;
280
280
  namespace: z.ZodString;
281
281
  name: z.ZodString;
282
282
  version: z.ZodNumber;
283
- turnId: z.ZodString;
283
+ turnId: z.ZodOptional<z.ZodString>;
284
284
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
285
285
  }, z.core.$strict>, z.ZodObject<{
286
286
  type: z.ZodLiteral<"turn_routed">;
@@ -422,7 +422,7 @@ export declare const conversationEventDataSchema: z.ZodUnion<readonly [z.ZodUnio
422
422
  /** One durable conversation event's validated data. */
423
423
  export type ConversationEventData = z.output<typeof conversationEventDataSchema>;
424
424
  /** Event type names recognized by current readers and observational queries. */
425
- export declare const KNOWN_CONVERSATION_EVENT_TYPES: readonly ["message", "message_updated", "user_message", "assistant_message", "tool_result", "mcp_provider_connected", "authorization_requested", "authorization_completed", "tool_execution_started", "guardian_action_reviewed", "message_handled", "messages_summarized", "turn_started", "turn_context", "plugin_event", "turn_routed", "turn_completed", "turn_failed", "subagent_started", "subagent_ended", "handoff", "compaction"];
425
+ export declare const KNOWN_CONVERSATION_EVENT_TYPES: readonly ["message", "message_updated", "user_message", "assistant_message", "tool_result", "mcp_provider_connected", "authorization_requested", "authorization_completed", "tool_execution_started", "guardian_action_reviewed", "message_handled", "messages_summarized", "turn_started", "turn_context", "structured_event", "turn_routed", "turn_completed", "turn_failed", "subagent_started", "subagent_ended", "handoff", "compaction"];
426
426
  /** One known durable conversation event type name. */
427
427
  export type KnownConversationEventType = (typeof KNOWN_CONVERSATION_EVENT_TYPES)[number];
428
428
  declare const unknownConversationEventDataSchema: z.ZodObject<{
@@ -558,11 +558,11 @@ export declare const conversationEventSchema: z.ZodUnion<readonly [z.ZodObject<{
558
558
  version: z.ZodNumber;
559
559
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
560
560
  }, z.core.$strict>, z.ZodObject<{
561
- type: z.ZodLiteral<"plugin_event">;
561
+ type: z.ZodLiteral<"structured_event">;
562
562
  namespace: z.ZodString;
563
563
  name: z.ZodString;
564
564
  version: z.ZodNumber;
565
- turnId: z.ZodString;
565
+ turnId: z.ZodOptional<z.ZodString>;
566
566
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
567
567
  }, z.core.$strict>, z.ZodObject<{
568
568
  type: z.ZodLiteral<"turn_routed">;
@@ -863,11 +863,11 @@ export declare const newConversationEventSchema: z.ZodObject<{
863
863
  version: z.ZodNumber;
864
864
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
865
865
  }, z.core.$strict>, z.ZodObject<{
866
- type: z.ZodLiteral<"plugin_event">;
866
+ type: z.ZodLiteral<"structured_event">;
867
867
  namespace: z.ZodString;
868
868
  name: z.ZodString;
869
869
  version: z.ZodNumber;
870
- turnId: z.ZodString;
870
+ turnId: z.ZodOptional<z.ZodString>;
871
871
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
872
872
  }, z.core.$strict>, z.ZodObject<{
873
873
  type: z.ZodLiteral<"turn_routed">;
@@ -101,6 +101,19 @@ export declare function recordAuthorizationCompleted(args: {
101
101
  actorId: string;
102
102
  authorizationId: string;
103
103
  }): Promise<void>;
104
+ type AuthenticationAccountChangeArgs = {
105
+ accountLabel?: string;
106
+ actorId: string;
107
+ authorizationId?: string;
108
+ conversationId: string;
109
+ provider: string;
110
+ providerLabel?: string;
111
+ turnId?: string;
112
+ };
113
+ /** Record a successful conversation-bound account link as host transcript metadata. */
114
+ export declare function recordAuthenticationLinked(args: AuthenticationAccountChangeArgs): Promise<void>;
115
+ /** Record a successful conversation-bound account unlink as host transcript metadata. */
116
+ export declare function recordAuthenticationUnlinked(args: AuthenticationAccountChangeArgs): Promise<void>;
104
117
  /** Load a previously selected execution profile for a resumed turn. */
105
118
  export declare function loadTurnRoute(args: {
106
119
  conversationId: string;
@@ -0,0 +1,31 @@
1
+ import { type ConversationEventPresentation, type PluginConversationEventDefinition } from "@sentry/junior-plugin-api";
2
+ /** Reserved namespace for Junior-owned conversation metadata events. */
3
+ export declare const JUNIOR_NATIVE_EVENT_NAMESPACE: "junior";
4
+ /** Junior-owned account-link transcript event. */
5
+ export declare const authenticationLinkedEvent: import("@sentry/junior-plugin-api").DefinedConversationEvent<{
6
+ actorId: string;
7
+ provider: string;
8
+ accountLabel?: string | undefined;
9
+ authorizationId?: string | undefined;
10
+ providerLabel?: string | undefined;
11
+ }>;
12
+ /** Junior-owned account-unlink transcript event. */
13
+ export declare const authenticationUnlinkedEvent: import("@sentry/junior-plugin-api").DefinedConversationEvent<{
14
+ actorId: string;
15
+ provider: string;
16
+ accountLabel?: string | undefined;
17
+ authorizationId?: string | undefined;
18
+ providerLabel?: string | undefined;
19
+ }>;
20
+ /** Resolve a registered Junior-native conversation event definition. */
21
+ export declare function getJuniorNativeEventDefinition(args: {
22
+ name: string;
23
+ version: number;
24
+ }): PluginConversationEventDefinition | undefined;
25
+ /** Render one Junior-native event through its active definition. */
26
+ export declare function renderJuniorNativeConversationEvent(args: {
27
+ content: Record<string, unknown>;
28
+ name: string;
29
+ namespace: string;
30
+ version: number;
31
+ }): ConversationEventPresentation | undefined;
@@ -33,6 +33,8 @@ export declare class ProviderError extends Error {
33
33
  export declare function createProviderError(error: unknown, options?: ProviderErrorOptions): ProviderError;
34
34
  /** Return whether a provider-boundary error should be retried. */
35
35
  export declare function isProviderRetryError(error: unknown): error is ProviderError;
36
+ /** Find the provider failure preserved inside a domain error cause chain. */
37
+ export declare function findProviderError(error: unknown): ProviderError | undefined;
36
38
  /** Return stable, sanitized copy suitable for a terminal user response. */
37
39
  export declare function getProviderErrorUserMessage(error: ProviderError): string;
38
40
  /** Return safe structured fields for terminal failure telemetry. */
@@ -9,7 +9,7 @@ export declare function createQueryConversationEventsTool(context: ToolRuntimeCo
9
9
  after_seq?: number | null | undefined;
10
10
  before_seq?: number | null | undefined;
11
11
  limit?: number | null | undefined;
12
- types?: ("message" | "handoff" | "user_message" | "assistant_message" | "tool_result" | "compaction" | "mcp_provider_connected" | "authorization_requested" | "authorization_completed" | "tool_execution_started" | "guardian_action_reviewed" | "message_updated" | "message_handled" | "messages_summarized" | "turn_started" | "turn_routed" | "turn_context" | "plugin_event" | "turn_completed" | "turn_failed" | "subagent_started" | "subagent_ended")[] | null | undefined;
12
+ types?: ("message" | "handoff" | "user_message" | "assistant_message" | "tool_result" | "compaction" | "mcp_provider_connected" | "authorization_requested" | "authorization_completed" | "tool_execution_started" | "guardian_action_reviewed" | "message_updated" | "message_handled" | "messages_summarized" | "turn_started" | "turn_routed" | "turn_context" | "structured_event" | "turn_completed" | "turn_failed" | "subagent_started" | "subagent_ended")[] | null | undefined;
13
13
  };
14
14
  execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
15
15
  [x: string]: unknown;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createPluginCatalogRuntime
3
- } from "./chunk-XLPETJXX.js";
3
+ } from "./chunk-APPWCJVJ.js";
4
4
 
5
5
  // src/chat/plugins/catalog-runtime.ts
6
6
  var pluginCatalogRuntime = createPluginCatalogRuntime();