@sentry/junior 0.159.0 → 0.160.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 (64) hide show
  1. package/dist/{agent-hooks-IAD3AANZ.js → agent-hooks-U6R3O2V4.js} +10 -10
  2. package/dist/api/conversations/events.d.ts +1 -1
  3. package/dist/api/schema/conversation.d.ts +32 -0
  4. package/dist/api/schema.js +1 -1
  5. package/dist/api.js +32 -23
  6. package/dist/app.js +32 -32
  7. package/dist/{catalog-runtime-6VANKLH5.js → catalog-runtime-HIDNHGOP.js} +5 -5
  8. package/dist/chat/conversations/history.d.ts +31 -1
  9. package/dist/chat/conversations/projection.d.ts +13 -0
  10. package/dist/chat/slack/tools/send-files.d.ts +2 -2
  11. package/dist/chat/tool-support/action-review.d.ts +5 -4
  12. package/dist/chat/tools/search-conversation-events.d.ts +1 -1
  13. package/dist/{chunk-UP6KQVF5.js → chunk-2MK6S2UA.js} +1 -1
  14. package/dist/{chunk-CNHELV2P.js → chunk-2SFMRMDV.js} +1 -1
  15. package/dist/{chunk-UKKOKMRE.js → chunk-3AHIB66R.js} +5 -5
  16. package/dist/{chunk-YCBZ47LC.js → chunk-42E7432W.js} +1 -1
  17. package/dist/{chunk-UG673UVL.js → chunk-472VVYYV.js} +1 -1
  18. package/dist/{chunk-O2DZWUPQ.js → chunk-4UO3UAW7.js} +1 -1
  19. package/dist/{chunk-IJ6KWS3V.js → chunk-56TFPTZU.js} +1 -1
  20. package/dist/{chunk-X7AIXRVJ.js → chunk-756F567I.js} +5 -5
  21. package/dist/{chunk-PQWWCKNB.js → chunk-BGVQGEKB.js} +4 -4
  22. package/dist/{chunk-AIQKUJKK.js → chunk-FJR66CQT.js} +4 -4
  23. package/dist/{chunk-FWDN67U3.js → chunk-FKMWPA4A.js} +4 -4
  24. package/dist/{chunk-OGMHLKNO.js → chunk-HDPH4CHJ.js} +1 -1
  25. package/dist/{chunk-L2PEQ2PY.js → chunk-J77DLAPE.js} +2 -2
  26. package/dist/{chunk-QODFNKQS.js → chunk-JQZIUESN.js} +17 -3
  27. package/dist/{chunk-WTQ3CKC3.js → chunk-LNUZXEEI.js} +1 -1
  28. package/dist/{chunk-SQOVZSWF.js → chunk-M5HCOMDR.js} +88 -35
  29. package/dist/{chunk-YSMAMSOU.js → chunk-MBDWMEO6.js} +10 -10
  30. package/dist/{chunk-K2LAI7RW.js → chunk-OUAZDZTZ.js} +2 -2
  31. package/dist/{chunk-DJZPA72K.js → chunk-P7W3ZL5J.js} +6 -6
  32. package/dist/{chunk-AZW5HKC5.js → chunk-PVIM2RWO.js} +8 -8
  33. package/dist/{chunk-6IADZQJR.js → chunk-PZUJPPON.js} +1 -1
  34. package/dist/{chunk-NT6V5WEE.js → chunk-RJGRXDA7.js} +5 -5
  35. package/dist/{chunk-54O6IKUS.js → chunk-RLOXMHLA.js} +40 -4
  36. package/dist/{chunk-PT7B6A3O.js → chunk-TBRJGMTO.js} +1 -1
  37. package/dist/{chunk-DXSZJAVZ.js → chunk-TPFOVXRB.js} +18 -18
  38. package/dist/{chunk-EBP6IS66.js → chunk-U26KRMYX.js} +6 -6
  39. package/dist/{chunk-Q5X37U6G.js → chunk-UNDTW2PY.js} +1 -1
  40. package/dist/{chunk-NCJV265M.js → chunk-URPLKXLG.js} +9 -9
  41. package/dist/{chunk-EQXVKNLM.js → chunk-UYUS4L6F.js} +11 -0
  42. package/dist/{chunk-27UQ7UB3.js → chunk-WACYTIIK.js} +6 -6
  43. package/dist/{chunk-U7D4VLUF.js → chunk-XPX3DYG7.js} +2 -2
  44. package/dist/{chunk-LUIKMY35.js → chunk-YPMDNE7R.js} +1 -1
  45. package/dist/{chunk-TD7ZQZ5W.js → chunk-ZNBGWMVQ.js} +1 -1
  46. package/dist/cli/chat.js +30 -30
  47. package/dist/cli/check.js +6 -6
  48. package/dist/cli/plugins.js +13 -13
  49. package/dist/cli/snapshot-create.js +9 -9
  50. package/dist/cli/upgrade.js +7 -7
  51. package/dist/{db-BIIMAPFB.js → db-2JKT3BB5.js} +7 -7
  52. package/dist/instrumentation.js +4 -4
  53. package/dist/nitro.js +2 -2
  54. package/dist/{oauth-callback-server-4BENCPP3.js → oauth-callback-server-7MC2UMQC.js} +23 -23
  55. package/dist/{runner-TUBJLEYO.js → runner-GUU4G7XO.js} +13 -13
  56. package/dist/{skills-MBRLNBRV.js → skills-7NW5N3VM.js} +6 -6
  57. package/dist/spawn-WGK4W3XF.js +37 -0
  58. package/dist/{validation-YTJGRJYT.js → validation-AQLI6N2C.js} +6 -6
  59. package/dist/version.js +1 -1
  60. package/dist/{work-5MRHKA54.js → work-FLFK5XNU.js} +17 -17
  61. package/dist/worker-KSJIRBQJ.js +24 -0
  62. package/package.json +4 -4
  63. package/dist/spawn-ZWIXA46E.js +0 -37
  64. package/dist/worker-S2V7HZJ4.js +0 -24
@@ -11,20 +11,20 @@ import {
11
11
  getPlugins,
12
12
  setPlugins,
13
13
  validatePlugins
14
- } from "./chunk-EBP6IS66.js";
15
- import "./chunk-K2LAI7RW.js";
16
- import "./chunk-QODFNKQS.js";
17
- import "./chunk-O2DZWUPQ.js";
14
+ } from "./chunk-U26KRMYX.js";
15
+ import "./chunk-OUAZDZTZ.js";
16
+ import "./chunk-JQZIUESN.js";
17
+ import "./chunk-4UO3UAW7.js";
18
18
  import "./chunk-EM225ITJ.js";
19
- import "./chunk-Q5X37U6G.js";
20
- import "./chunk-L2PEQ2PY.js";
19
+ import "./chunk-UNDTW2PY.js";
20
+ import "./chunk-J77DLAPE.js";
21
21
  import "./chunk-VFUK3X5B.js";
22
- import "./chunk-PT7B6A3O.js";
22
+ import "./chunk-TBRJGMTO.js";
23
23
  import "./chunk-V7YE4WCP.js";
24
- import "./chunk-TD7ZQZ5W.js";
24
+ import "./chunk-ZNBGWMVQ.js";
25
25
  import "./chunk-6GWA276C.js";
26
- import "./chunk-OGMHLKNO.js";
27
- import "./chunk-LUIKMY35.js";
26
+ import "./chunk-HDPH4CHJ.js";
27
+ import "./chunk-YPMDNE7R.js";
28
28
  import "./chunk-MLKGABMK.js";
29
29
  export {
30
30
  PluginHookDeniedError,
@@ -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", "structured_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", "attachments_delivered", "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
  /**
@@ -359,6 +359,14 @@ export declare const conversationReportEventDataSchema: z.ZodDiscriminatedUnion<
359
359
  preview: z.ZodOptional<z.ZodString>;
360
360
  title: z.ZodString;
361
361
  }, z.core.$strict>;
362
+ }, z.core.$strict>, z.ZodObject<{
363
+ type: z.ZodLiteral<"attachments_delivered">;
364
+ attachments: z.ZodArray<z.ZodObject<{
365
+ id: z.ZodString;
366
+ filename: z.ZodString;
367
+ contentType: z.ZodString;
368
+ bytes: z.ZodNumber;
369
+ }, z.core.$strict>>;
362
370
  }, z.core.$strict>, z.ZodObject<{
363
371
  type: z.ZodLiteral<"turn_routed">;
364
372
  turnId: z.ZodString;
@@ -546,6 +554,14 @@ export declare const conversationReportEventSchema: z.ZodObject<{
546
554
  preview: z.ZodOptional<z.ZodString>;
547
555
  title: z.ZodString;
548
556
  }, z.core.$strict>;
557
+ }, z.core.$strict>, z.ZodObject<{
558
+ type: z.ZodLiteral<"attachments_delivered">;
559
+ attachments: z.ZodArray<z.ZodObject<{
560
+ id: z.ZodString;
561
+ filename: z.ZodString;
562
+ contentType: z.ZodString;
563
+ bytes: z.ZodNumber;
564
+ }, z.core.$strict>>;
549
565
  }, z.core.$strict>, z.ZodObject<{
550
566
  type: z.ZodLiteral<"turn_routed">;
551
567
  turnId: z.ZodString;
@@ -862,6 +878,14 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
862
878
  preview: z.ZodOptional<z.ZodString>;
863
879
  title: z.ZodString;
864
880
  }, z.core.$strict>;
881
+ }, z.core.$strict>, z.ZodObject<{
882
+ type: z.ZodLiteral<"attachments_delivered">;
883
+ attachments: z.ZodArray<z.ZodObject<{
884
+ id: z.ZodString;
885
+ filename: z.ZodString;
886
+ contentType: z.ZodString;
887
+ bytes: z.ZodNumber;
888
+ }, z.core.$strict>>;
865
889
  }, z.core.$strict>, z.ZodObject<{
866
890
  type: z.ZodLiteral<"turn_routed">;
867
891
  turnId: z.ZodString;
@@ -1072,6 +1096,14 @@ export declare const conversationEventPageSchema: z.ZodObject<{
1072
1096
  preview: z.ZodOptional<z.ZodString>;
1073
1097
  title: z.ZodString;
1074
1098
  }, z.core.$strict>;
1099
+ }, z.core.$strict>, z.ZodObject<{
1100
+ type: z.ZodLiteral<"attachments_delivered">;
1101
+ attachments: z.ZodArray<z.ZodObject<{
1102
+ id: z.ZodString;
1103
+ filename: z.ZodString;
1104
+ contentType: z.ZodString;
1105
+ bytes: z.ZodNumber;
1106
+ }, z.core.$strict>>;
1075
1107
  }, z.core.$strict>, z.ZodObject<{
1076
1108
  type: z.ZodLiteral<"turn_routed">;
1077
1109
  turnId: z.ZodString;
@@ -52,7 +52,7 @@ import {
52
52
  taskRunListSchema,
53
53
  taskRunSchema,
54
54
  taskSummarySchema
55
- } from "../chunk-EQXVKNLM.js";
55
+ } from "../chunk-UYUS4L6F.js";
56
56
  import {
57
57
  healthReportSchema,
58
58
  pluginOperationalReportFeedSchema,
package/dist/api.js CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  taskListSchema,
37
37
  taskParamsSchema,
38
38
  taskRunListSchema
39
- } from "./chunk-EQXVKNLM.js";
39
+ } from "./chunk-UYUS4L6F.js";
40
40
  import {
41
41
  appendAndEnqueueApiConversationMessage,
42
42
  createAndEnqueueApiConversation,
@@ -46,15 +46,15 @@ import {
46
46
  readHealthReport,
47
47
  resolveSlackConversationContextFromThreadId,
48
48
  webActorFromEmail
49
- } from "./chunk-YSMAMSOU.js";
49
+ } from "./chunk-MBDWMEO6.js";
50
50
  import {
51
51
  buildSentryConversationUrl,
52
52
  getWebAuthorization
53
- } from "./chunk-UG673UVL.js";
53
+ } from "./chunk-472VVYYV.js";
54
54
  import {
55
55
  cancelHumanFacingPendingMessages,
56
56
  getConversation
57
- } from "./chunk-FWDN67U3.js";
57
+ } from "./chunk-FKMWPA4A.js";
58
58
  import {
59
59
  readTaskExecutionByConversationId,
60
60
  readTaskExecutionDays,
@@ -62,8 +62,8 @@ import {
62
62
  readTaskExecutionSummaries,
63
63
  readTaskExecutions,
64
64
  readTaskRuns
65
- } from "./chunk-NCJV265M.js";
66
- import "./chunk-UKKOKMRE.js";
65
+ } from "./chunk-URPLKXLG.js";
66
+ import "./chunk-3AHIB66R.js";
67
67
  import {
68
68
  healthReportSchema,
69
69
  pluginOperationalReportFeedSchema,
@@ -88,16 +88,16 @@ import {
88
88
  listPublicScheduledTasksForTeams,
89
89
  readLiveAttachment,
90
90
  readStats
91
- } from "./chunk-NT6V5WEE.js";
91
+ } from "./chunk-RJGRXDA7.js";
92
92
  import {
93
93
  parseSlackThreadId
94
- } from "./chunk-IJ6KWS3V.js";
94
+ } from "./chunk-56TFPTZU.js";
95
95
  import {
96
96
  agentTurnUsageSchema,
97
97
  fallbackShortTitle,
98
98
  hasAgentTurnUsage,
99
99
  renderJuniorNativeConversationEvent
100
- } from "./chunk-54O6IKUS.js";
100
+ } from "./chunk-RLOXMHLA.js";
101
101
  import "./chunk-3Y47VMHV.js";
102
102
  import "./chunk-PDO5BLNM.js";
103
103
  import {
@@ -107,11 +107,11 @@ import {
107
107
  renderPluginConversationEvent,
108
108
  resolveViewerUser,
109
109
  updateViewerDisplayName
110
- } from "./chunk-EBP6IS66.js";
110
+ } from "./chunk-U26KRMYX.js";
111
111
  import {
112
112
  getSlackClient,
113
113
  withSlackRetries
114
- } from "./chunk-K2LAI7RW.js";
114
+ } from "./chunk-OUAZDZTZ.js";
115
115
  import {
116
116
  decodeStoredConversationEvent,
117
117
  getConversationStore,
@@ -119,7 +119,7 @@ import {
119
119
  getSqlExecutor,
120
120
  locationFromRow,
121
121
  parseSessionSource
122
- } from "./chunk-QODFNKQS.js";
122
+ } from "./chunk-JQZIUESN.js";
123
123
  import {
124
124
  juniorApiTokens,
125
125
  juniorConversationEvents,
@@ -127,16 +127,16 @@ import {
127
127
  juniorConversations,
128
128
  juniorIdentities,
129
129
  juniorUsers
130
- } from "./chunk-O2DZWUPQ.js";
130
+ } from "./chunk-4UO3UAW7.js";
131
131
  import "./chunk-EM225ITJ.js";
132
- import "./chunk-Q5X37U6G.js";
133
- import "./chunk-L2PEQ2PY.js";
132
+ import "./chunk-UNDTW2PY.js";
133
+ import "./chunk-J77DLAPE.js";
134
134
  import {
135
135
  juniorDestinations
136
136
  } from "./chunk-VFUK3X5B.js";
137
137
  import {
138
138
  canExposeConversationPayload
139
- } from "./chunk-PT7B6A3O.js";
139
+ } from "./chunk-TBRJGMTO.js";
140
140
  import "./chunk-BDUENQD3.js";
141
141
  import {
142
142
  parseSlackChannelId,
@@ -146,10 +146,10 @@ import {
146
146
  import {
147
147
  logException,
148
148
  logWarn
149
- } from "./chunk-TD7ZQZ5W.js";
149
+ } from "./chunk-ZNBGWMVQ.js";
150
150
  import "./chunk-6GWA276C.js";
151
- import "./chunk-OGMHLKNO.js";
152
- import "./chunk-LUIKMY35.js";
151
+ import "./chunk-HDPH4CHJ.js";
152
+ import "./chunk-YPMDNE7R.js";
153
153
  import "./chunk-MLKGABMK.js";
154
154
 
155
155
  // src/api.ts
@@ -768,6 +768,7 @@ var conversationReportSourceEventTypes = [
768
768
  "turn_started",
769
769
  "turn_context",
770
770
  "structured_event",
771
+ "attachments_delivered",
771
772
  "turn_routed",
772
773
  "turn_completed",
773
774
  "turn_failed",
@@ -987,6 +988,14 @@ function reportEventData(args) {
987
988
  version: data.version,
988
989
  content: data.content
989
990
  };
991
+ case "attachments_delivered":
992
+ if (!args.canExposePayload) {
993
+ return void 0;
994
+ }
995
+ return {
996
+ type: "attachments_delivered",
997
+ attachments: data.attachments
998
+ };
990
999
  case "turn_routed":
991
1000
  return {
992
1001
  type: "turn_routed",
@@ -4724,7 +4733,7 @@ function readDescriptionText(home) {
4724
4733
  }
4725
4734
  }
4726
4735
  async function readSkillReports() {
4727
- const { discoverSkills } = await import("./skills-MBRLNBRV.js");
4736
+ const { discoverSkills } = await import("./skills-7NW5N3VM.js");
4728
4737
  const skills = await discoverSkills();
4729
4738
  return skillReportsSchema.parse(
4730
4739
  skills.map((skill) => ({
@@ -4734,7 +4743,7 @@ async function readSkillReports() {
4734
4743
  );
4735
4744
  }
4736
4745
  async function readPlugins() {
4737
- const { pluginCatalogRuntime } = await import("./catalog-runtime-6VANKLH5.js");
4746
+ const { pluginCatalogRuntime } = await import("./catalog-runtime-HIDNHGOP.js");
4738
4747
  return pluginsSchema.parse(
4739
4748
  pluginCatalogRuntime.getProviders().map((plugin) => ({
4740
4749
  configKeys: plugin.manifest.configKeys ?? [],
@@ -4747,7 +4756,7 @@ async function readPlugins() {
4747
4756
  async function readRuntimeInfoReport() {
4748
4757
  const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
4749
4758
  import("./discovery-GUFTFBTL.js"),
4750
- import("./catalog-runtime-6VANKLH5.js"),
4759
+ import("./catalog-runtime-HIDNHGOP.js"),
4751
4760
  readPlugins(),
4752
4761
  readSkillReports()
4753
4762
  ]);
@@ -4763,7 +4772,7 @@ async function readRuntimeInfoReport() {
4763
4772
  }
4764
4773
  async function readPluginOperationalReportFeed() {
4765
4774
  const nowMs = Date.now();
4766
- const { getPluginOperationalReports } = await import("./agent-hooks-IAD3AANZ.js");
4775
+ const { getPluginOperationalReports } = await import("./agent-hooks-U6R3O2V4.js");
4767
4776
  return pluginOperationalReportFeedSchema.parse({
4768
4777
  source: "plugins",
4769
4778
  generatedAt: new Date(nowMs).toISOString(),
package/dist/app.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  processConversationWork
3
- } from "./chunk-AIQKUJKK.js";
3
+ } from "./chunk-FJR66CQT.js";
4
4
  import {
5
5
  bindSpawnAgent
6
- } from "./chunk-UP6KQVF5.js";
6
+ } from "./chunk-2MK6S2UA.js";
7
7
  import {
8
8
  createAgentInvocationWorker,
9
9
  enqueueAgentInvocation,
10
10
  listPendingAgentInvocationMailboxAppends,
11
11
  routeAgentInvocationWork
12
- } from "./chunk-27UQ7UB3.js";
12
+ } from "./chunk-WACYTIIK.js";
13
13
  import {
14
14
  GET as GET2,
15
15
  GET2 as GET3,
@@ -36,12 +36,12 @@ import {
36
36
  startSlackProcessingReaction,
37
37
  stripLeadingBotMention,
38
38
  wakePausedTurn
39
- } from "./chunk-DXSZJAVZ.js";
39
+ } from "./chunk-TPFOVXRB.js";
40
40
  import "./chunk-FA6POGLH.js";
41
41
  import {
42
42
  getTurnRequestDeadline,
43
43
  runWithTurnRequestDeadline
44
- } from "./chunk-WTQ3CKC3.js";
44
+ } from "./chunk-LNUZXEEI.js";
45
45
  import {
46
46
  GET,
47
47
  conversationVisibilityFromSlackChannelType,
@@ -51,8 +51,8 @@ import {
51
51
  resolveSlackChannelTypeFromMessage,
52
52
  resolveSlackConversationContext,
53
53
  routeApiTurnWork
54
- } from "./chunk-YSMAMSOU.js";
55
- import "./chunk-UG673UVL.js";
54
+ } from "./chunk-MBDWMEO6.js";
55
+ import "./chunk-472VVYYV.js";
56
56
  import {
57
57
  CONVERSATION_WORK_STALE_ENQUEUE_MS,
58
58
  appendAndEnqueueInboundMessage,
@@ -63,7 +63,7 @@ import {
63
63
  isInvalidConversationRecordError,
64
64
  listActiveConversationIds,
65
65
  removeActiveConversation
66
- } from "./chunk-FWDN67U3.js";
66
+ } from "./chunk-FKMWPA4A.js";
67
67
  import {
68
68
  buildDeliveredTurnStatePatch,
69
69
  claimDispatchMailboxAppend,
@@ -94,7 +94,7 @@ import {
94
94
  requireTurnFailureEventId,
95
95
  resolveTurnSessionRouting,
96
96
  scheduleSessionCompletedPluginTasks
97
- } from "./chunk-NCJV265M.js";
97
+ } from "./chunk-URPLKXLG.js";
98
98
  import {
99
99
  ConversationTurnLifecycleService,
100
100
  coerceThreadConversationState,
@@ -104,7 +104,7 @@ import {
104
104
  persistThreadRuntimeState,
105
105
  persistThreadState,
106
106
  persistThreadStateById
107
- } from "./chunk-UKKOKMRE.js";
107
+ } from "./chunk-3AHIB66R.js";
108
108
  import "./chunk-UTL3MHPC.js";
109
109
  import {
110
110
  getVercelConversationWorkQueue,
@@ -123,7 +123,7 @@ import {
123
123
  import {
124
124
  validatePluginEgressCredentialHooks,
125
125
  validatePluginRegistrations
126
- } from "./chunk-6IADZQJR.js";
126
+ } from "./chunk-PZUJPPON.js";
127
127
  import {
128
128
  defineJuniorPlugins,
129
129
  pluginCatalogConfigFromEnv,
@@ -155,11 +155,11 @@ import {
155
155
  setConfigDefaults,
156
156
  shouldEmitDevAgentTrace,
157
157
  shouldPropagateSandboxEgressTrace
158
- } from "./chunk-SQOVZSWF.js";
158
+ } from "./chunk-M5HCOMDR.js";
159
159
  import {
160
160
  AuthorizationFlowDisabledError,
161
161
  PluginCredentialFailureError
162
- } from "./chunk-X7AIXRVJ.js";
162
+ } from "./chunk-756F567I.js";
163
163
  import "./chunk-DIB4GX3G.js";
164
164
  import {
165
165
  createAgentRunner,
@@ -167,7 +167,7 @@ import {
167
167
  deleteMcpAuthSessionsForUserProvider,
168
168
  deleteMcpServerSessionId,
169
169
  deleteMcpStoredOAuthCredentials
170
- } from "./chunk-AZW5HKC5.js";
170
+ } from "./chunk-PVIM2RWO.js";
171
171
  import {
172
172
  RetryableDeliveryError
173
173
  } from "./chunk-RF6J3DIO.js";
@@ -175,7 +175,7 @@ import {
175
175
  formatProviderLabel,
176
176
  postSlackMessage,
177
177
  startOAuthFlow
178
- } from "./chunk-DJZPA72K.js";
178
+ } from "./chunk-P7W3ZL5J.js";
179
179
  import "./chunk-7MA4HV4W.js";
180
180
  import {
181
181
  getExperimentalFeatures,
@@ -184,7 +184,7 @@ import {
184
184
  import {
185
185
  getSandboxResourceConfig,
186
186
  setSandboxResourceConfig
187
- } from "./chunk-PQWWCKNB.js";
187
+ } from "./chunk-BGVQGEKB.js";
188
188
  import {
189
189
  collectAttachmentGarbage,
190
190
  createSchedulerSqlStore,
@@ -192,10 +192,10 @@ import {
192
192
  logScheduledTaskRunSkipped,
193
193
  requestAttachmentDeletion,
194
194
  scheduledTaskRunAttributes
195
- } from "./chunk-NT6V5WEE.js";
195
+ } from "./chunk-RJGRXDA7.js";
196
196
  import {
197
197
  parseSlackThreadId
198
- } from "./chunk-IJ6KWS3V.js";
198
+ } from "./chunk-56TFPTZU.js";
199
199
  import {
200
200
  ConversationTurnBoundaryError,
201
201
  CooperativeTurnYieldError,
@@ -245,7 +245,7 @@ import {
245
245
  trimTrailingAssistantMessages,
246
246
  turnHasReply,
247
247
  upsertConversationMessage
248
- } from "./chunk-54O6IKUS.js";
248
+ } from "./chunk-RLOXMHLA.js";
249
249
  import "./chunk-3Y47VMHV.js";
250
250
  import "./chunk-PDO5BLNM.js";
251
251
  import "./chunk-UIE3R5XU.js";
@@ -265,7 +265,7 @@ import {
265
265
  verifyEventTaskCredentialSubject,
266
266
  verifyScheduledTaskCredentialSubject,
267
267
  verifySlackDirectCredentialSubject
268
- } from "./chunk-EBP6IS66.js";
268
+ } from "./chunk-U26KRMYX.js";
269
269
  import {
270
270
  SlackActionError,
271
271
  downloadPrivateSlackFile,
@@ -275,7 +275,7 @@ import {
275
275
  normalizeSlackConversationId,
276
276
  runWithSlackInstallationToken,
277
277
  runWithWorkspaceTeamId
278
- } from "./chunk-K2LAI7RW.js";
278
+ } from "./chunk-OUAZDZTZ.js";
279
279
  import {
280
280
  contextProvenance,
281
281
  createSlackDestination,
@@ -288,19 +288,19 @@ import {
288
288
  requireSlackDestination,
289
289
  withConversationEventLock,
290
290
  withConversationMutationLock
291
- } from "./chunk-QODFNKQS.js";
291
+ } from "./chunk-JQZIUESN.js";
292
292
  import {
293
293
  juniorAgentBindings,
294
294
  juniorAgentInvocations,
295
295
  juniorConversationEvents,
296
296
  juniorConversations
297
- } from "./chunk-O2DZWUPQ.js";
297
+ } from "./chunk-4UO3UAW7.js";
298
298
  import "./chunk-EM225ITJ.js";
299
299
  import {
300
300
  acquireActiveLock,
301
301
  getStateAdapter,
302
302
  withActiveLock
303
- } from "./chunk-Q5X37U6G.js";
303
+ } from "./chunk-UNDTW2PY.js";
304
304
  import {
305
305
  STANDARD_MODEL_PROFILE,
306
306
  botConfig,
@@ -318,16 +318,16 @@ import {
318
318
  modelIdForProfile,
319
319
  setSlackReactionConfig,
320
320
  standardModelId
321
- } from "./chunk-L2PEQ2PY.js";
321
+ } from "./chunk-J77DLAPE.js";
322
322
  import {
323
323
  juniorDestinations
324
324
  } from "./chunk-VFUK3X5B.js";
325
- import "./chunk-PT7B6A3O.js";
326
- import "./chunk-U7D4VLUF.js";
325
+ import "./chunk-TBRJGMTO.js";
326
+ import "./chunk-XPX3DYG7.js";
327
327
  import {
328
328
  pluginCatalogRuntime
329
- } from "./chunk-CNHELV2P.js";
330
- import "./chunk-YCBZ47LC.js";
329
+ } from "./chunk-2SFMRMDV.js";
330
+ import "./chunk-42E7432W.js";
331
331
  import {
332
332
  credentialContextForActor
333
333
  } from "./chunk-BDUENQD3.js";
@@ -359,7 +359,7 @@ import {
359
359
  withContext,
360
360
  withLogContext,
361
361
  withSpan
362
- } from "./chunk-TD7ZQZ5W.js";
362
+ } from "./chunk-ZNBGWMVQ.js";
363
363
  import {
364
364
  continueTrace
365
365
  } from "./chunk-6GWA276C.js";
@@ -367,10 +367,10 @@ import "./chunk-OOUNJNMR.js";
367
367
  import "./chunk-H4HBKISO.js";
368
368
  import {
369
369
  JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
370
- } from "./chunk-OGMHLKNO.js";
370
+ } from "./chunk-HDPH4CHJ.js";
371
371
  import {
372
372
  JUNIOR_VERSION
373
- } from "./chunk-LUIKMY35.js";
373
+ } from "./chunk-YPMDNE7R.js";
374
374
  import "./chunk-MLKGABMK.js";
375
375
 
376
376
  // src/app.ts
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-CNHELV2P.js";
4
- import "./chunk-YCBZ47LC.js";
3
+ } from "./chunk-2SFMRMDV.js";
4
+ import "./chunk-42E7432W.js";
5
5
  import "./chunk-BDUENQD3.js";
6
6
  import "./chunk-V7YE4WCP.js";
7
- import "./chunk-TD7ZQZ5W.js";
7
+ import "./chunk-ZNBGWMVQ.js";
8
8
  import "./chunk-6GWA276C.js";
9
9
  import "./chunk-OOUNJNMR.js";
10
10
  import "./chunk-H4HBKISO.js";
11
- import "./chunk-OGMHLKNO.js";
12
- import "./chunk-LUIKMY35.js";
11
+ import "./chunk-HDPH4CHJ.js";
12
+ import "./chunk-YPMDNE7R.js";
13
13
  import "./chunk-MLKGABMK.js";
14
14
  export {
15
15
  pluginCatalogRuntime
@@ -307,6 +307,16 @@ export declare const conversationEventDataSchema: z.ZodUnion<readonly [z.ZodUnio
307
307
  version: z.ZodNumber;
308
308
  turnId: z.ZodOptional<z.ZodString>;
309
309
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
310
+ }, z.core.$strict>, z.ZodObject<{
311
+ type: z.ZodLiteral<"attachments_delivered">;
312
+ attachments: z.ZodArray<z.ZodObject<{
313
+ id: z.ZodString;
314
+ filename: z.ZodString;
315
+ contentType: z.ZodString;
316
+ bytes: z.ZodNumber;
317
+ }, z.core.$strict>>;
318
+ toolCallId: z.ZodOptional<z.ZodString>;
319
+ turnId: z.ZodOptional<z.ZodString>;
310
320
  }, z.core.$strict>, z.ZodObject<{
311
321
  type: z.ZodLiteral<"turn_routed">;
312
322
  turnId: z.ZodString;
@@ -463,7 +473,7 @@ export declare const conversationEventDataSchema: z.ZodUnion<readonly [z.ZodUnio
463
473
  /** One durable conversation event's validated data. */
464
474
  export type ConversationEventData = z.output<typeof conversationEventDataSchema>;
465
475
  /** Event type names recognized by current readers and observational queries. */
466
- export declare const KNOWN_CONVERSATION_EVENT_TYPES: readonly ["message", "message_updated", "user_message", "assistant_message", "tool_result", "mcp_provider_connected", "mcp_provider_connected_unowned", "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"];
476
+ export declare const KNOWN_CONVERSATION_EVENT_TYPES: readonly ["message", "message_updated", "user_message", "assistant_message", "tool_result", "mcp_provider_connected", "mcp_provider_connected_unowned", "authorization_requested", "authorization_completed", "tool_execution_started", "guardian_action_reviewed", "message_handled", "messages_summarized", "turn_started", "turn_context", "structured_event", "attachments_delivered", "turn_routed", "turn_completed", "turn_failed", "subagent_started", "subagent_ended", "handoff", "compaction"];
467
477
  /** One known durable conversation event type name. */
468
478
  export type KnownConversationEventType = (typeof KNOWN_CONVERSATION_EVENT_TYPES)[number];
469
479
  declare const unknownConversationEventDataSchema: z.ZodObject<{
@@ -612,6 +622,16 @@ export declare const conversationEventSchema: z.ZodUnion<readonly [z.ZodObject<{
612
622
  version: z.ZodNumber;
613
623
  turnId: z.ZodOptional<z.ZodString>;
614
624
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
625
+ }, z.core.$strict>, z.ZodObject<{
626
+ type: z.ZodLiteral<"attachments_delivered">;
627
+ attachments: z.ZodArray<z.ZodObject<{
628
+ id: z.ZodString;
629
+ filename: z.ZodString;
630
+ contentType: z.ZodString;
631
+ bytes: z.ZodNumber;
632
+ }, z.core.$strict>>;
633
+ toolCallId: z.ZodOptional<z.ZodString>;
634
+ turnId: z.ZodOptional<z.ZodString>;
615
635
  }, z.core.$strict>, z.ZodObject<{
616
636
  type: z.ZodLiteral<"turn_routed">;
617
637
  turnId: z.ZodString;
@@ -940,6 +960,16 @@ export declare const newConversationEventSchema: z.ZodObject<{
940
960
  version: z.ZodNumber;
941
961
  turnId: z.ZodOptional<z.ZodString>;
942
962
  content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
963
+ }, z.core.$strict>, z.ZodObject<{
964
+ type: z.ZodLiteral<"attachments_delivered">;
965
+ attachments: z.ZodArray<z.ZodObject<{
966
+ id: z.ZodString;
967
+ filename: z.ZodString;
968
+ contentType: z.ZodString;
969
+ bytes: z.ZodNumber;
970
+ }, z.core.$strict>>;
971
+ toolCallId: z.ZodOptional<z.ZodString>;
972
+ turnId: z.ZodOptional<z.ZodString>;
943
973
  }, z.core.$strict>, z.ZodObject<{
944
974
  type: z.ZodLiteral<"turn_routed">;
945
975
  turnId: z.ZodString;
@@ -170,6 +170,19 @@ export declare function recordToolExecutionStarted(args: {
170
170
  toolCallId: string;
171
171
  toolName: string;
172
172
  }): Promise<void>;
173
+ /** Record files delivered for humans without adding them to Pi replay. */
174
+ export declare function recordAttachmentsDelivered(args: {
175
+ attachments: Array<{
176
+ bytes: number;
177
+ contentType: string;
178
+ filename: string;
179
+ id: string;
180
+ }>;
181
+ conversationId: string;
182
+ createdAtMs?: number;
183
+ toolCallId?: string;
184
+ turnId?: string;
185
+ }): Promise<void>;
173
186
  /** Record one privacy-safe Guardian decision before the reviewed action continues. */
174
187
  export declare function recordGuardianActionReviewed(args: {
175
188
  conversationId: string;
@@ -25,7 +25,7 @@ export declare function createSendFilesTool(context: SlackToolContext, state: To
25
25
  [x: string]: unknown;
26
26
  attachment_refs: {
27
27
  id: string;
28
- name: string;
28
+ filename: string;
29
29
  }[];
30
30
  target?: string | undefined;
31
31
  truncated?: boolean | undefined;
@@ -39,7 +39,7 @@ export declare function createSendFilesTool(context: SlackToolContext, state: To
39
39
  [x: string]: unknown;
40
40
  attachment_refs: {
41
41
  id: string;
42
- name: string;
42
+ filename: string;
43
43
  }[];
44
44
  target?: string | undefined;
45
45
  truncated?: boolean | undefined;
@@ -4,7 +4,7 @@
4
4
  * Deterministic host checks establish authority before the model evaluates
5
5
  * untrusted action evidence.
6
6
  */
7
- import type { Destination, Source, ToolAnnotations } from "@sentry/junior-plugin-api";
7
+ import { type Destination, type Source, type ToolAnnotations } from "@sentry/junior-plugin-api";
8
8
  import type { Actor } from "@/chat/actor";
9
9
  import type { CredentialContext } from "@/chat/credentials/context";
10
10
  import type { AnyToolDefinition } from "@/chat/tools/definition";
@@ -111,6 +111,7 @@ export declare class ToolActionRejectedError extends Error {
111
111
  readonly riskLevel?: ToolActionReviewDecision["riskLevel"];
112
112
  readonly userAuthorization?: ToolActionReviewDecision["userAuthorization"];
113
113
  constructor(decision: Exclude<ToolActionDecision, "allow">, reason: string, assessment?: Partial<Pick<ToolActionReviewDecision, "riskLevel" | "userAuthorization">> & {
114
+ instructions?: string;
114
115
  reviewedAction?: ToolActionPriorRejection;
115
116
  });
116
117
  }
@@ -120,7 +121,7 @@ export declare class ToolActionReviewUnavailableError extends Error {
120
121
  cause?: unknown;
121
122
  });
122
123
  }
123
- /** The execution slice exceeded its bounded sequence of rejected actions. */
124
+ /** Telemetry-only marker when action review exhausts consecutive rejections. */
124
125
  export declare class ToolActionReviewLimitError extends Error {
125
126
  constructor();
126
127
  }
@@ -133,8 +134,8 @@ export declare function createToolActionReview(options: {
133
134
  toolName: string;
134
135
  decision: ToolActionReviewDecision;
135
136
  }): Promise<void>;
136
- /** Escalate terminal review failures to the owning agent-run boundary. */
137
- onFatal(error: ToolActionReviewUnavailableError | ToolActionReviewLimitError): void;
137
+ /** Escalate unavailable review to the owning agent-run boundary. */
138
+ onFatal(error: ToolActionReviewUnavailableError): void;
138
139
  priorRejections?: ToolActionPriorRejection[];
139
140
  reviewer: ToolActionReviewer;
140
141
  }): ToolActionReview;