@sentry/junior 0.156.0 → 0.157.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 (80) hide show
  1. package/dist/{agent-hooks-CCAR46PQ.js → agent-hooks-QI5EPOKQ.js} +10 -10
  2. package/dist/api/conversations/attachments.d.ts +32 -0
  3. package/dist/api/conversations/priority.d.ts +21 -0
  4. package/dist/api/conversations/routes.d.ts +4 -1
  5. package/dist/api/locations/detail.d.ts +3 -1
  6. package/dist/api/schema/conversation.d.ts +14 -4
  7. package/dist/api/schema/location.d.ts +3 -1
  8. package/dist/api/schema/person.d.ts +3 -1
  9. package/dist/api/schema/task.d.ts +8 -8
  10. package/dist/api/schema.js +1 -1
  11. package/dist/api.js +158 -36
  12. package/dist/app.js +35 -54
  13. package/dist/{catalog-runtime-3SNKYCBG.js → catalog-runtime-HUGHAFUN.js} +5 -5
  14. package/dist/chat/agent-invocations/types.d.ts +12 -12
  15. package/dist/chat/attachments/storage.d.ts +2 -0
  16. package/dist/chat/attachments/store.d.ts +16 -0
  17. package/dist/chat/event-tasks/tool-support.d.ts +1 -1
  18. package/dist/chat/event-tasks/types.d.ts +1 -1
  19. package/dist/chat/plugins/unfinished-work.d.ts +6 -1
  20. package/dist/chat/scheduled-tasks/tool-support.d.ts +5 -5
  21. package/dist/chat/scheduled-tasks/tools/create.d.ts +2 -2
  22. package/dist/chat/scheduled-tasks/tools/delete.d.ts +2 -2
  23. package/dist/chat/scheduled-tasks/tools/list.d.ts +2 -2
  24. package/dist/chat/scheduled-tasks/tools/run-now.d.ts +2 -2
  25. package/dist/chat/scheduled-tasks/tools/update.d.ts +2 -2
  26. package/dist/chat/task-execution/slack-work.d.ts +2 -2
  27. package/dist/{chunk-AIJRG227.js → chunk-3GS7O66Z.js} +1 -1
  28. package/dist/{chunk-KBGMYLSV.js → chunk-46ADYIPE.js} +1 -1
  29. package/dist/{chunk-SE3D225X.js → chunk-4M25PSFB.js} +1 -1
  30. package/dist/{chunk-TN4LVILT.js → chunk-5TIH5GOE.js} +5 -5
  31. package/dist/{chunk-EDJ64P2P.js → chunk-6MI43QZO.js} +1 -1
  32. package/dist/{chunk-WD7SEUZO.js → chunk-77QB5FNI.js} +1 -1
  33. package/dist/{chunk-CN2XSVKF.js → chunk-7J65DOBL.js} +6 -6
  34. package/dist/{chunk-4ZZDTHFC.js → chunk-AFQ47JQ7.js} +8 -8
  35. package/dist/{chunk-6CINHXIL.js → chunk-BLCVTEE7.js} +4 -4
  36. package/dist/{chunk-X5NZQH5U.js → chunk-CZCMFRUQ.js} +16 -0
  37. package/dist/{chunk-MJE7XKWP.js → chunk-D7BNWRYL.js} +1 -1
  38. package/dist/{chunk-OGZPRMZA.js → chunk-F7VOY4VQ.js} +1 -1
  39. package/dist/{chunk-IIO5PFZX.js → chunk-G2FN3I66.js} +3 -3
  40. package/dist/{chunk-3L2PMOSR.js → chunk-GEY6IFXH.js} +4 -4
  41. package/dist/{chunk-6JUU7J2B.js → chunk-GO2W3VZY.js} +4 -4
  42. package/dist/{chunk-KCA5MKHU.js → chunk-HJ3EZHIX.js} +351 -5
  43. package/dist/{chunk-MC57E5U5.js → chunk-I3OQVVMV.js} +1 -1
  44. package/dist/{chunk-NTNU6T2D.js → chunk-MDZQ62PB.js} +2 -2
  45. package/dist/{chunk-3FFUC32L.js → chunk-MGJW3SW4.js} +6 -6
  46. package/dist/{chunk-X7W45B5G.js → chunk-MKA3T2R6.js} +1 -1
  47. package/dist/{chunk-IZEBHYI4.js → chunk-MXO6VFB3.js} +1 -1
  48. package/dist/{chunk-53W3LZEW.js → chunk-OWASYHHV.js} +64 -361
  49. package/dist/{chunk-GSBPZHLQ.js → chunk-PP4UQTH3.js} +9 -9
  50. package/dist/{chunk-SRJA6QLM.js → chunk-RQBRGPUF.js} +2 -2
  51. package/dist/{chunk-A6WPDFHQ.js → chunk-S4PFOWRA.js} +1 -1
  52. package/dist/{chunk-OMQJB7YN.js → chunk-TA5R6BME.js} +18 -18
  53. package/dist/{chunk-GKC43TLS.js → chunk-UJYA75N5.js} +2 -2
  54. package/dist/{chunk-PMFGVLDU.js → chunk-VBKFO65J.js} +35 -10
  55. package/dist/{chunk-7RAETIYO.js → chunk-VDAEXEBB.js} +6 -6
  56. package/dist/{chunk-JUJR6WTL.js → chunk-VIBHFGQC.js} +4 -4
  57. package/dist/{chunk-CK2H7CFO.js → chunk-VYDM7HUF.js} +1 -1
  58. package/dist/{chunk-ZNWRYNCA.js → chunk-WNNYOPXX.js} +5 -5
  59. package/dist/{chunk-TNXGMFWV.js → chunk-XRERMHPN.js} +1 -1
  60. package/dist/cli/chat.js +30 -30
  61. package/dist/cli/check.js +6 -6
  62. package/dist/cli/plugins.js +13 -13
  63. package/dist/cli/snapshot-create.js +9 -9
  64. package/dist/cli/upgrade.js +7 -7
  65. package/dist/db/schema/agent-invocations.d.ts +4 -4
  66. package/dist/db/schema.d.ts +4 -4
  67. package/dist/{db-TYUUKGJX.js → db-VQAV4PJ3.js} +7 -7
  68. package/dist/instrumentation.js +4 -4
  69. package/dist/nitro.js +2 -2
  70. package/dist/{oauth-callback-server-AWVDKPR5.js → oauth-callback-server-K5KQAAAX.js} +23 -23
  71. package/dist/{runner-JUQXMACC.js → runner-U7QI7P4S.js} +14 -15
  72. package/dist/{skills-4GZTZX4V.js → skills-ENKRBZ7K.js} +6 -6
  73. package/dist/spawn-4XGNONLS.js +37 -0
  74. package/dist/{validation-DRLNJRND.js → validation-VKCDVGA6.js} +6 -6
  75. package/dist/version.js +1 -1
  76. package/dist/{work-TGIXRRJY.js → work-IBD6PWP2.js} +17 -17
  77. package/dist/worker-TJFXOZRC.js +24 -0
  78. package/package.json +4 -4
  79. package/dist/spawn-32SSRWU4.js +0 -37
  80. package/dist/worker-IFXZOYED.js +0 -24
@@ -11,20 +11,20 @@ import {
11
11
  getPlugins,
12
12
  setPlugins,
13
13
  validatePlugins
14
- } from "./chunk-3FFUC32L.js";
15
- import "./chunk-NTNU6T2D.js";
16
- import "./chunk-IIO5PFZX.js";
17
- import "./chunk-AIJRG227.js";
14
+ } from "./chunk-MGJW3SW4.js";
15
+ import "./chunk-MDZQ62PB.js";
16
+ import "./chunk-G2FN3I66.js";
17
+ import "./chunk-3GS7O66Z.js";
18
18
  import "./chunk-EM225ITJ.js";
19
- import "./chunk-MC57E5U5.js";
20
- import "./chunk-GKC43TLS.js";
19
+ import "./chunk-I3OQVVMV.js";
20
+ import "./chunk-UJYA75N5.js";
21
21
  import "./chunk-VFUK3X5B.js";
22
- import "./chunk-MJE7XKWP.js";
22
+ import "./chunk-D7BNWRYL.js";
23
23
  import "./chunk-V7YE4WCP.js";
24
- import "./chunk-X7W45B5G.js";
24
+ import "./chunk-MKA3T2R6.js";
25
25
  import "./chunk-6GWA276C.js";
26
- import "./chunk-OGZPRMZA.js";
27
- import "./chunk-KBGMYLSV.js";
26
+ import "./chunk-F7VOY4VQ.js";
27
+ import "./chunk-46ADYIPE.js";
28
28
  import "./chunk-MLKGABMK.js";
29
29
  export {
30
30
  PluginHookDeniedError,
@@ -0,0 +1,32 @@
1
+ import type { User } from "@sentry/junior-plugin-api";
2
+ import { type AttachmentRecord } from "@/chat/attachments/store";
3
+ import type { AttachmentStorage } from "@/chat/attachments/storage";
4
+ export interface OpenConversationAttachment {
5
+ attachment: AttachmentRecord;
6
+ body: ReadableStream<Uint8Array>;
7
+ }
8
+ /** Build response headers for one conversation attachment body. */
9
+ export declare function conversationAttachmentHeaders(args: {
10
+ bytes: number;
11
+ contentType: string;
12
+ filename: string;
13
+ }): Headers;
14
+ /**
15
+ * Open one live conversation attachment for an authorized viewer.
16
+ *
17
+ * Missing conversations, missing attachments, purge-marked rows, and viewers
18
+ * without private-content access all return null so the route can answer 404.
19
+ */
20
+ export declare function openConversationAttachment(args: {
21
+ attachmentId: string;
22
+ conversationId: string;
23
+ storage: AttachmentStorage;
24
+ viewer?: User;
25
+ }): Promise<OpenConversationAttachment | null>;
26
+ /** Open one attachment or throw the standard API not-found error. */
27
+ export declare function requireConversationAttachment(args: {
28
+ attachmentId: string;
29
+ conversationId: string;
30
+ storage: AttachmentStorage;
31
+ viewer?: User;
32
+ }): Promise<OpenConversationAttachment>;
@@ -0,0 +1,21 @@
1
+ /** Conversations with no known work leave Priority after this idle window. */
2
+ export declare const UNASSIGNED_PRIORITY_WINDOW_MS: number;
3
+ /** Unfinished work leaves Priority after this idle window. */
4
+ export declare const UNFINISHED_PRIORITY_WINDOW_MS: number;
5
+ export type ConversationPriorityInput = {
6
+ assignedWork?: boolean;
7
+ finishedWorkAt?: string;
8
+ lastSeenAt: string;
9
+ unfinishedWork?: boolean;
10
+ };
11
+ /**
12
+ * Decide whether a conversation belongs in the dashboard Priority section.
13
+ *
14
+ * Priority includes only:
15
+ * - unfinished work last seen within 48 hours
16
+ * - finished assigned work with conversation activity after the finish time
17
+ * - no known work last seen within 3 hours
18
+ *
19
+ * Finished assigned work with no later activity stays out of Priority.
20
+ */
21
+ export declare function isConversationPriority(conversation: ConversationPriorityInput, nowMs: number): boolean;
@@ -1,4 +1,7 @@
1
1
  import { Hono } from "hono";
2
+ import type { AttachmentStorage } from "@/chat/attachments/storage";
2
3
  import type { JuniorApiEnv } from "../route";
3
4
  /** Create the HTTP routes owned by the conversations API. */
4
- export declare function createConversationRoutes(): Hono<JuniorApiEnv>;
5
+ export declare function createConversationRoutes(options: {
6
+ attachmentStorage: AttachmentStorage;
7
+ }): Hono<JuniorApiEnv>;
@@ -73,7 +73,7 @@ export declare function readLocationDetail(locationId: string, options?: {
73
73
  namespace: string;
74
74
  }[];
75
75
  } | undefined;
76
- visibility?: "public" | "private" | undefined;
76
+ visibility?: "private" | "public" | undefined;
77
77
  actorIdentity?: {
78
78
  email?: string | undefined;
79
79
  fullName?: string | undefined;
@@ -89,6 +89,8 @@ export declare function readLocationDetail(locationId: string, options?: {
89
89
  sourceUrl?: string | undefined;
90
90
  traceId?: string | undefined;
91
91
  assignedWork?: boolean | undefined;
92
+ finishedWorkAt?: string | undefined;
93
+ isPriority?: boolean | undefined;
92
94
  unfinishedWork?: boolean | undefined;
93
95
  }[];
94
96
  source: "conversation_index";
@@ -35,6 +35,10 @@ export declare const conversationUsageSchema: z.ZodObject<{
35
35
  export declare const conversationParamsSchema: z.ZodObject<{
36
36
  conversationId: z.ZodString;
37
37
  }, z.core.$strict>;
38
+ export declare const conversationAttachmentParamsSchema: z.ZodObject<{
39
+ attachmentId: z.ZodString;
40
+ conversationId: z.ZodString;
41
+ }, z.core.$strict>;
38
42
  export declare const conversationDetailQuerySchema: z.ZodObject<{
39
43
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
40
44
  }, z.core.$strict>;
@@ -56,8 +60,8 @@ export declare const createConversationBodySchema: z.ZodObject<{
56
60
  idempotencyKey: z.ZodString;
57
61
  message: z.ZodString;
58
62
  visibility: z.ZodOptional<z.ZodEnum<{
59
- public: "public";
60
63
  private: "private";
64
+ public: "public";
61
65
  }>>;
62
66
  }, z.core.$strict>;
63
67
  export declare const createConversationMessageBodySchema: z.ZodObject<{
@@ -195,8 +199,8 @@ export declare const conversationSummaryReportSchema: z.ZodObject<{
195
199
  conversationId: z.ZodString;
196
200
  isParticipant: z.ZodBoolean;
197
201
  visibility: z.ZodOptional<z.ZodEnum<{
198
- public: "public";
199
202
  private: "private";
203
+ public: "public";
200
204
  }>>;
201
205
  status: z.ZodEnum<{
202
206
  completed: "completed";
@@ -227,6 +231,8 @@ export declare const conversationSummaryReportSchema: z.ZodObject<{
227
231
  sourceUrl: z.ZodOptional<z.ZodString>;
228
232
  traceId: z.ZodOptional<z.ZodString>;
229
233
  assignedWork: z.ZodOptional<z.ZodBoolean>;
234
+ finishedWorkAt: z.ZodOptional<z.ZodString>;
235
+ isPriority: z.ZodOptional<z.ZodBoolean>;
230
236
  unfinishedWork: z.ZodOptional<z.ZodBoolean>;
231
237
  }, z.core.$strict>;
232
238
  /** Privacy-safe event variants owned by the conversation reporting API. */
@@ -659,8 +665,8 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
659
665
  conversationId: z.ZodString;
660
666
  isParticipant: z.ZodBoolean;
661
667
  visibility: z.ZodOptional<z.ZodEnum<{
662
- public: "public";
663
668
  private: "private";
669
+ public: "public";
664
670
  }>>;
665
671
  status: z.ZodEnum<{
666
672
  completed: "completed";
@@ -691,6 +697,8 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
691
697
  sourceUrl: z.ZodOptional<z.ZodString>;
692
698
  traceId: z.ZodOptional<z.ZodString>;
693
699
  assignedWork: z.ZodOptional<z.ZodBoolean>;
700
+ finishedWorkAt: z.ZodOptional<z.ZodString>;
701
+ isPriority: z.ZodOptional<z.ZodBoolean>;
694
702
  unfinishedWork: z.ZodOptional<z.ZodBoolean>;
695
703
  annotations: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
696
704
  kind: z.ZodLiteral<"resource_link">;
@@ -1168,8 +1176,8 @@ export declare const conversationFeedSchema: z.ZodObject<{
1168
1176
  conversationId: z.ZodString;
1169
1177
  isParticipant: z.ZodBoolean;
1170
1178
  visibility: z.ZodOptional<z.ZodEnum<{
1171
- public: "public";
1172
1179
  private: "private";
1180
+ public: "public";
1173
1181
  }>>;
1174
1182
  status: z.ZodEnum<{
1175
1183
  completed: "completed";
@@ -1200,6 +1208,8 @@ export declare const conversationFeedSchema: z.ZodObject<{
1200
1208
  sourceUrl: z.ZodOptional<z.ZodString>;
1201
1209
  traceId: z.ZodOptional<z.ZodString>;
1202
1210
  assignedWork: z.ZodOptional<z.ZodBoolean>;
1211
+ finishedWorkAt: z.ZodOptional<z.ZodString>;
1212
+ isPriority: z.ZodOptional<z.ZodBoolean>;
1203
1213
  unfinishedWork: z.ZodOptional<z.ZodBoolean>;
1204
1214
  }, z.core.$strict>>;
1205
1215
  source: z.ZodLiteral<"conversation_index">;
@@ -164,8 +164,8 @@ export declare const locationDetailReportSchema: z.ZodObject<{
164
164
  conversationId: z.ZodString;
165
165
  isParticipant: z.ZodBoolean;
166
166
  visibility: z.ZodOptional<z.ZodEnum<{
167
- public: "public";
168
167
  private: "private";
168
+ public: "public";
169
169
  }>>;
170
170
  status: z.ZodEnum<{
171
171
  completed: "completed";
@@ -196,6 +196,8 @@ export declare const locationDetailReportSchema: z.ZodObject<{
196
196
  sourceUrl: z.ZodOptional<z.ZodString>;
197
197
  traceId: z.ZodOptional<z.ZodString>;
198
198
  assignedWork: z.ZodOptional<z.ZodBoolean>;
199
+ finishedWorkAt: z.ZodOptional<z.ZodString>;
200
+ isPriority: z.ZodOptional<z.ZodBoolean>;
199
201
  unfinishedWork: z.ZodOptional<z.ZodBoolean>;
200
202
  }, z.core.$strict>>;
201
203
  source: z.ZodLiteral<"conversation_index">;
@@ -131,8 +131,8 @@ export declare const actorProfileReportSchema: z.ZodObject<{
131
131
  conversationId: z.ZodString;
132
132
  isParticipant: z.ZodBoolean;
133
133
  visibility: z.ZodOptional<z.ZodEnum<{
134
- public: "public";
135
134
  private: "private";
135
+ public: "public";
136
136
  }>>;
137
137
  status: z.ZodEnum<{
138
138
  completed: "completed";
@@ -163,6 +163,8 @@ export declare const actorProfileReportSchema: z.ZodObject<{
163
163
  sourceUrl: z.ZodOptional<z.ZodString>;
164
164
  traceId: z.ZodOptional<z.ZodString>;
165
165
  assignedWork: z.ZodOptional<z.ZodBoolean>;
166
+ finishedWorkAt: z.ZodOptional<z.ZodString>;
167
+ isPriority: z.ZodOptional<z.ZodBoolean>;
166
168
  unfinishedWork: z.ZodOptional<z.ZodBoolean>;
167
169
  }, z.core.$strict>>;
168
170
  actor: z.ZodObject<{
@@ -8,8 +8,8 @@ export declare const scheduledTaskSummarySchema: z.ZodObject<{
8
8
  label: z.ZodString;
9
9
  teamId: z.ZodString;
10
10
  visibility: z.ZodEnum<{
11
- public: "public";
12
11
  private: "private";
12
+ public: "public";
13
13
  }>;
14
14
  }, z.core.$strict>;
15
15
  id: z.ZodString;
@@ -38,8 +38,8 @@ export declare const eventTaskSummarySchema: z.ZodObject<{
38
38
  label: z.ZodString;
39
39
  teamId: z.ZodString;
40
40
  visibility: z.ZodEnum<{
41
- public: "public";
42
41
  private: "private";
42
+ public: "public";
43
43
  }>;
44
44
  }, z.core.$strict>;
45
45
  id: z.ZodString;
@@ -65,8 +65,8 @@ export declare const taskSummarySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
65
65
  label: z.ZodString;
66
66
  teamId: z.ZodString;
67
67
  visibility: z.ZodEnum<{
68
- public: "public";
69
68
  private: "private";
69
+ public: "public";
70
70
  }>;
71
71
  }, z.core.$strict>;
72
72
  id: z.ZodString;
@@ -94,8 +94,8 @@ export declare const taskSummarySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
94
94
  label: z.ZodString;
95
95
  teamId: z.ZodString;
96
96
  visibility: z.ZodEnum<{
97
- public: "public";
98
97
  private: "private";
98
+ public: "public";
99
99
  }>;
100
100
  }, z.core.$strict>;
101
101
  id: z.ZodString;
@@ -133,8 +133,8 @@ export declare const taskListSchema: z.ZodObject<{
133
133
  label: z.ZodString;
134
134
  teamId: z.ZodString;
135
135
  visibility: z.ZodEnum<{
136
- public: "public";
137
136
  private: "private";
137
+ public: "public";
138
138
  }>;
139
139
  }, z.core.$strict>;
140
140
  id: z.ZodString;
@@ -162,8 +162,8 @@ export declare const taskListSchema: z.ZodObject<{
162
162
  label: z.ZodString;
163
163
  teamId: z.ZodString;
164
164
  visibility: z.ZodEnum<{
165
- public: "public";
166
165
  private: "private";
166
+ public: "public";
167
167
  }>;
168
168
  }, z.core.$strict>;
169
169
  id: z.ZodString;
@@ -239,8 +239,8 @@ export declare const taskExecutionListSchema: z.ZodObject<{
239
239
  label: z.ZodString;
240
240
  teamId: z.ZodString;
241
241
  visibility: z.ZodEnum<{
242
- public: "public";
243
242
  private: "private";
243
+ public: "public";
244
244
  }>;
245
245
  }, z.core.$strict>;
246
246
  id: z.ZodString;
@@ -268,8 +268,8 @@ export declare const taskExecutionListSchema: z.ZodObject<{
268
268
  label: z.ZodString;
269
269
  teamId: z.ZodString;
270
270
  visibility: z.ZodEnum<{
271
- public: "public";
272
271
  private: "private";
272
+ public: "public";
273
273
  }>;
274
274
  }, z.core.$strict>;
275
275
  id: z.ZodString;
@@ -50,7 +50,7 @@ import {
50
50
  taskRunListSchema,
51
51
  taskRunSchema,
52
52
  taskSummarySchema
53
- } from "../chunk-X5NZQH5U.js";
53
+ } from "../chunk-CZCMFRUQ.js";
54
54
  import {
55
55
  healthReportSchema,
56
56
  pluginOperationalReportFeedSchema,