@sentry/junior 0.153.0 → 0.155.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 (83) hide show
  1. package/dist/{agent-hooks-7BWOB7SN.js → agent-hooks-AWVTLAV2.js} +11 -12
  2. package/dist/api/conversations/list.d.ts +5 -3
  3. package/dist/api/conversations/membership.d.ts +16 -0
  4. package/dist/api/locations/detail.d.ts +1 -0
  5. package/dist/api/schema/conversation.d.ts +3 -0
  6. package/dist/api/schema/location.d.ts +1 -0
  7. package/dist/api/schema/person.d.ts +1 -0
  8. package/dist/api/schema.js +1 -1
  9. package/dist/api.js +318 -187
  10. package/dist/app.js +39 -39
  11. package/dist/catalog-runtime-V6YD6KH5.js +16 -0
  12. package/dist/chat/conversations/sql/event-actor.d.ts +14 -0
  13. package/dist/chat/conversations/sql/event-lock.d.ts +1 -1
  14. package/dist/chat/conversations/sql/participants.d.ts +17 -0
  15. package/dist/chat/plugins/unfinished-work.d.ts +2 -0
  16. package/dist/chat/runtime/agent-runner.d.ts +2 -0
  17. package/dist/chat/runtime/slack-resume.d.ts +1 -1
  18. package/dist/chat/state/conversation.d.ts +1 -0
  19. package/dist/{chunk-O2YXWWPM.js → chunk-2AHVM3HK.js} +92 -9
  20. package/dist/{chunk-VXWTGOLW.js → chunk-2WLJDM23.js} +1 -1
  21. package/dist/{chunk-4TWLKHOM.js → chunk-37G5HJ2X.js} +4 -4
  22. package/dist/{chunk-ISEROVYZ.js → chunk-4K5N6HTX.js} +5 -5
  23. package/dist/{chunk-ET54Q4TD.js → chunk-773XC7P4.js} +116 -82
  24. package/dist/{chunk-HUO3UTAQ.js → chunk-7MA4HV4W.js} +1 -1
  25. package/dist/{chunk-HMU2QP5M.js → chunk-7NYEB2TM.js} +1 -1
  26. package/dist/{chunk-URFV5RWN.js → chunk-AENPRXCG.js} +23 -56
  27. package/dist/{chunk-TIV3PX5H.js → chunk-APHDJYN7.js} +2 -2
  28. package/dist/{chunk-RUIXF3YQ.js → chunk-BDUENQD3.js} +1 -1
  29. package/dist/{chunk-5TXDKTET.js → chunk-CPQBTTI6.js} +7 -7
  30. package/dist/{chunk-A5SROS6H.js → chunk-ELOTIL5F.js} +5 -5
  31. package/dist/{chunk-JJAMURMR.js → chunk-EORR34UB.js} +1 -1
  32. package/dist/{chunk-5QBK3QHJ.js → chunk-J2SYI36O.js} +6 -8
  33. package/dist/{chunk-K4LK6KYO.js → chunk-J7MWZFFP.js} +4 -4
  34. package/dist/{chunk-COC65LIW.js → chunk-JFZBGFNX.js} +3 -1
  35. package/dist/{chunk-YECBSG77.js → chunk-JIC33O5L.js} +2 -2
  36. package/dist/{chunk-XAYXN4EG.js → chunk-JJX77MB7.js} +366 -138
  37. package/dist/{chunk-FLEY546A.js → chunk-KBT2I5ER.js} +7 -7
  38. package/dist/{chunk-37LMRT7G.js → chunk-KTVHAHUV.js} +1 -1
  39. package/dist/{chunk-PMJAY6JS.js → chunk-LQT3SWFA.js} +5 -5
  40. package/dist/{chunk-HYEAR6HL.js → chunk-MLBH7J7J.js} +1 -1
  41. package/dist/{chunk-5DMPHA4V.js → chunk-NKFRRZIT.js} +27 -37
  42. package/dist/{chunk-HOK7MEWG.js → chunk-NWSKFYOH.js} +1 -1
  43. package/dist/{chunk-JY2HJYJT.js → chunk-RN3AWYEP.js} +2 -2
  44. package/dist/{chunk-RKW5QGGN.js → chunk-RQ62VKM7.js} +1 -1
  45. package/dist/{chunk-XQPKMLRI.js → chunk-SDRJ2LE3.js} +1 -1
  46. package/dist/{chunk-JAJVUQV7.js → chunk-TKJ7277U.js} +3 -3
  47. package/dist/{chunk-EPOA52SD.js → chunk-TVXAN43I.js} +1 -1
  48. package/dist/{chunk-2NS3ACHB.js → chunk-UWTXAYBP.js} +11 -11
  49. package/dist/{chunk-2J4VCHRX.js → chunk-V57LZDHN.js} +8 -10
  50. package/dist/{chunk-HZF5P5UN.js → chunk-V7YE4WCP.js} +58 -7
  51. package/dist/{chunk-PGJBNO3I.js → chunk-XFZLQANQ.js} +2 -2
  52. package/dist/{chunk-5XBRH3N7.js → chunk-Y6MVGU7L.js} +12 -11
  53. package/dist/{chunk-WTKAALLV.js → chunk-Y7ZUBP2K.js} +6 -6
  54. package/dist/{chunk-UG5UCHHJ.js → chunk-ZLSFOSDK.js} +2 -1
  55. package/dist/cli/chat.js +36 -36
  56. package/dist/cli/check.js +8 -9
  57. package/dist/cli/init.js +41 -7
  58. package/dist/cli/plugins.js +15 -16
  59. package/dist/cli/snapshot-create.js +11 -12
  60. package/dist/cli/upgrade.js +9 -10
  61. package/dist/db/schema/conversation-events.d.ts +20 -0
  62. package/dist/db/schema/conversation-participants.d.ts +63 -0
  63. package/dist/db/schema.d.ts +77 -1
  64. package/dist/{db-QNQM5YRR.js → db-WT7P56AH.js} +8 -8
  65. package/dist/instrumentation.js +4 -4
  66. package/dist/nitro.js +2 -2
  67. package/dist/{oauth-callback-server-ERQPIR27.js → oauth-callback-server-R2PK2MCA.js} +26 -26
  68. package/dist/{runner-BX46SQIE.js → runner-O7YYUIHT.js} +15 -16
  69. package/dist/{sandbox-egress-signals-EKPAVWQL.js → sandbox-egress-signals-U3ZX7C5W.js} +3 -4
  70. package/dist/{skills-JL44EIRX.js → skills-S6HLQRH7.js} +8 -9
  71. package/dist/spawn-B4SBFFA2.js +37 -0
  72. package/dist/{validation-UU2AIJIY.js → validation-46WD2OAR.js} +8 -9
  73. package/dist/version.js +1 -1
  74. package/dist/{work-SS7RU5CH.js → work-YT5QUBS3.js} +20 -21
  75. package/dist/worker-4C5BEDWN.js +24 -0
  76. package/migrations/0026_conversation_event_actor_and_participants.sql +140 -0
  77. package/migrations/meta/0026_snapshot.json +2424 -0
  78. package/migrations/meta/_journal.json +7 -0
  79. package/package.json +8 -6
  80. package/dist/catalog-runtime-CGUDNL3D.js +0 -17
  81. package/dist/chunk-F3B2YJ76.js +0 -57
  82. package/dist/spawn-W6FO32T4.js +0 -38
  83. package/dist/worker-5P2E7LVI.js +0 -25
@@ -11,21 +11,20 @@ import {
11
11
  getPlugins,
12
12
  setPlugins,
13
13
  validatePlugins
14
- } from "./chunk-2J4VCHRX.js";
15
- import "./chunk-JAJVUQV7.js";
16
- import "./chunk-XAYXN4EG.js";
17
- import "./chunk-ET54Q4TD.js";
14
+ } from "./chunk-V57LZDHN.js";
15
+ import "./chunk-TKJ7277U.js";
16
+ import "./chunk-JJX77MB7.js";
17
+ import "./chunk-773XC7P4.js";
18
18
  import "./chunk-EM225ITJ.js";
19
- import "./chunk-XQPKMLRI.js";
20
- import "./chunk-PGJBNO3I.js";
19
+ import "./chunk-SDRJ2LE3.js";
20
+ import "./chunk-XFZLQANQ.js";
21
21
  import "./chunk-VFUK3X5B.js";
22
- import "./chunk-VXWTGOLW.js";
23
- import "./chunk-HZF5P5UN.js";
24
- import "./chunk-F3B2YJ76.js";
25
- import "./chunk-HMU2QP5M.js";
22
+ import "./chunk-2WLJDM23.js";
23
+ import "./chunk-V7YE4WCP.js";
24
+ import "./chunk-7NYEB2TM.js";
26
25
  import "./chunk-6GWA276C.js";
27
- import "./chunk-JJAMURMR.js";
28
- import "./chunk-COC65LIW.js";
26
+ import "./chunk-EORR34UB.js";
27
+ import "./chunk-JFZBGFNX.js";
29
28
  import "./chunk-MLKGABMK.js";
30
29
  export {
31
30
  PluginHookDeniedError,
@@ -2,13 +2,14 @@ import type { User } from "@sentry/junior-plugin-api";
2
2
  import type { Conversation } from "@/chat/conversations/store";
3
3
  import type { JuniorDatabase } from "@/db/db";
4
4
  import type { ConversationFeed } from "../schema/conversation";
5
- declare function conversationRows(db: JuniorDatabase, limit: number, filter?: {
5
+ type ConversationFeedMembership = {
6
6
  kind: "viewer";
7
7
  userId: string;
8
8
  } | {
9
9
  kind: "actorEmail";
10
10
  email: string;
11
- }): Promise<{
11
+ };
12
+ declare function conversationRows(db: JuniorDatabase, limit: number, filter?: ConversationFeedMembership): Promise<{
12
13
  conversation: {
13
14
  conversationId: string;
14
15
  schemaVersion: number;
@@ -117,7 +118,8 @@ export declare function readConversationRecordFromSql(conversationId: string): P
117
118
  } | undefined>;
118
119
  /**
119
120
  * Build a bounded dashboard feed. Prefer the viewer user when present; otherwise
120
- * keep only roots linked to actorEmail before applying the limit.
121
+ * keep only roots linked to actorEmail before applying the limit. Membership is
122
+ * root-actor ownership or a materialized participant row for that person.
121
123
  */
122
124
  export declare function readConversationFeedFromSql(options?: {
123
125
  actorEmail?: string;
@@ -0,0 +1,16 @@
1
+ import { type SQL } from "drizzle-orm";
2
+ import type { JuniorDatabase } from "@/db/db";
3
+ /** True when the viewer is a materialized participant on this root conversation. */
4
+ export declare function conversationHasParticipantUser(userId: string): SQL;
5
+ /**
6
+ * True when a verified primary-email user participates on this root
7
+ * conversation. Used only for the actorEmail feed fallback.
8
+ */
9
+ export declare function conversationHasParticipantEmail(email: string): SQL;
10
+ /** Root-actor ownership or a materialized participant row for the same person. */
11
+ export declare function viewerConversationMembership(args: {
12
+ actorMatch: SQL | undefined;
13
+ participantMatch: SQL | undefined;
14
+ }): SQL | undefined;
15
+ /** Find which of the supplied roots include the linked viewer as a participant. */
16
+ export declare function conversationIdsWithParticipantUser(db: JuniorDatabase, conversationIds: readonly string[], userId: string): Promise<Set<string>>;
@@ -88,6 +88,7 @@ export declare function readLocationDetail(locationId: string, options?: {
88
88
  sentryTraceUrl?: string | undefined;
89
89
  sourceUrl?: string | undefined;
90
90
  traceId?: string | undefined;
91
+ unfinishedWork?: boolean | undefined;
91
92
  }[];
92
93
  source: "conversation_index";
93
94
  windowEnd: string;
@@ -226,6 +226,7 @@ export declare const conversationSummaryReportSchema: z.ZodObject<{
226
226
  sentryTraceUrl: z.ZodOptional<z.ZodString>;
227
227
  sourceUrl: z.ZodOptional<z.ZodString>;
228
228
  traceId: z.ZodOptional<z.ZodString>;
229
+ unfinishedWork: z.ZodOptional<z.ZodBoolean>;
229
230
  }, z.core.$strict>;
230
231
  /** Privacy-safe event variants owned by the conversation reporting API. */
231
232
  export declare const conversationReportEventDataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -682,6 +683,7 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
682
683
  sentryTraceUrl: z.ZodOptional<z.ZodString>;
683
684
  sourceUrl: z.ZodOptional<z.ZodString>;
684
685
  traceId: z.ZodOptional<z.ZodString>;
686
+ unfinishedWork: z.ZodOptional<z.ZodBoolean>;
685
687
  annotations: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
686
688
  kind: z.ZodLiteral<"resource_link">;
687
689
  key: z.ZodString;
@@ -1183,6 +1185,7 @@ export declare const conversationFeedSchema: z.ZodObject<{
1183
1185
  sentryTraceUrl: z.ZodOptional<z.ZodString>;
1184
1186
  sourceUrl: z.ZodOptional<z.ZodString>;
1185
1187
  traceId: z.ZodOptional<z.ZodString>;
1188
+ unfinishedWork: z.ZodOptional<z.ZodBoolean>;
1186
1189
  }, z.core.$strict>>;
1187
1190
  source: z.ZodLiteral<"conversation_index">;
1188
1191
  generatedAt: z.ZodString;
@@ -195,6 +195,7 @@ export declare const locationDetailReportSchema: z.ZodObject<{
195
195
  sentryTraceUrl: z.ZodOptional<z.ZodString>;
196
196
  sourceUrl: z.ZodOptional<z.ZodString>;
197
197
  traceId: z.ZodOptional<z.ZodString>;
198
+ unfinishedWork: z.ZodOptional<z.ZodBoolean>;
198
199
  }, z.core.$strict>>;
199
200
  source: z.ZodLiteral<"conversation_index">;
200
201
  windowEnd: z.ZodString;
@@ -162,6 +162,7 @@ export declare const actorProfileReportSchema: z.ZodObject<{
162
162
  sentryTraceUrl: z.ZodOptional<z.ZodString>;
163
163
  sourceUrl: z.ZodOptional<z.ZodString>;
164
164
  traceId: z.ZodOptional<z.ZodString>;
165
+ unfinishedWork: z.ZodOptional<z.ZodBoolean>;
165
166
  }, z.core.$strict>>;
166
167
  actor: z.ZodObject<{
167
168
  fullName: z.ZodOptional<z.ZodString>;
@@ -50,7 +50,7 @@ import {
50
50
  taskRunListSchema,
51
51
  taskRunSchema,
52
52
  taskSummarySchema
53
- } from "../chunk-UG5UCHHJ.js";
53
+ } from "../chunk-ZLSFOSDK.js";
54
54
  import {
55
55
  healthReportSchema,
56
56
  pluginOperationalReportFeedSchema,