@sentry/junior 0.160.0 → 0.162.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.
- package/dist/{agent-hooks-U6R3O2V4.js → agent-hooks-TL2SGC5W.js} +13 -10
- package/dist/api/locations/detail.d.ts +17 -0
- package/dist/api/people/plugin-reports.d.ts +7 -0
- package/dist/api/schema/conversation.d.ts +80 -8
- package/dist/api/schema/location.d.ts +30 -0
- package/dist/api/schema/person.d.ts +30 -0
- package/dist/api/schema.js +1 -1
- package/dist/api.js +128 -27
- package/dist/app.js +73 -42
- package/dist/{catalog-runtime-HIDNHGOP.js → catalog-runtime-IGSMIADJ.js} +5 -5
- package/dist/chat/artifacts/store.d.ts +42 -0
- package/dist/chat/conversations/message-search.d.ts +6 -0
- package/dist/chat/plugins/agent-hooks.d.ts +9 -1
- package/dist/chat/plugins/annotations.d.ts +3 -0
- package/dist/chat/plugins/conversation-sidebar.d.ts +3 -0
- package/dist/chat/plugins/viewer.d.ts +4 -0
- package/dist/chat/slack/mrkdwn.d.ts +3 -4
- package/dist/chat/slack/tools/conversation-message-search.d.ts +9 -0
- package/dist/chat/tools/publish-image.d.ts +44 -0
- package/dist/chat/tools/unpublish-image.d.ts +35 -0
- package/dist/{chunk-RJGRXDA7.js → chunk-4WYGQ47U.js} +5 -5
- package/dist/{chunk-FKMWPA4A.js → chunk-5NEBOHRG.js} +4 -4
- package/dist/{chunk-BGVQGEKB.js → chunk-6BJFIWEV.js} +4 -4
- package/dist/{chunk-TBRJGMTO.js → chunk-7DTPFFQX.js} +1 -1
- package/dist/{chunk-WACYTIIK.js → chunk-AJ7J2HWY.js} +6 -6
- package/dist/{chunk-YPMDNE7R.js → chunk-BPZQWAZJ.js} +1 -1
- package/dist/{chunk-TPFOVXRB.js → chunk-C3KUKA27.js} +19 -21
- package/dist/{chunk-4UO3UAW7.js → chunk-CZ6EHOU5.js} +239 -199
- package/dist/{chunk-JQZIUESN.js → chunk-DDQ43S5Q.js} +49 -4
- package/dist/{chunk-UNDTW2PY.js → chunk-DZC3F2UI.js} +1 -1
- package/dist/{chunk-42E7432W.js → chunk-EBEHJPFF.js} +1 -1
- package/dist/{chunk-M5HCOMDR.js → chunk-EHQLTK3X.js} +450 -115
- package/dist/{chunk-2SFMRMDV.js → chunk-FESUWAYU.js} +1 -1
- package/dist/{chunk-XPX3DYG7.js → chunk-FEWT5KPP.js} +2 -2
- package/dist/{chunk-2MK6S2UA.js → chunk-H2KW7AZC.js} +1 -1
- package/dist/{chunk-FJR66CQT.js → chunk-HW4BW3PC.js} +4 -4
- package/dist/{chunk-PZUJPPON.js → chunk-JJ3VXFDI.js} +1 -1
- package/dist/{chunk-MBDWMEO6.js → chunk-JRVURR3H.js} +10 -10
- package/dist/{chunk-756F567I.js → chunk-K7IV6UV3.js} +5 -5
- package/dist/{chunk-URPLKXLG.js → chunk-KQSO4DJ4.js} +9 -9
- package/dist/{chunk-LNUZXEEI.js → chunk-MMBMDSRK.js} +1 -1
- package/dist/{chunk-J77DLAPE.js → chunk-MNCEGXEH.js} +2 -2
- package/dist/{chunk-P7W3ZL5J.js → chunk-O6P7DZ6O.js} +8 -36
- package/dist/{chunk-PVIM2RWO.js → chunk-OBFRMQBY.js} +8 -10
- package/dist/{chunk-3AHIB66R.js → chunk-OPNJRQDP.js} +5 -5
- package/dist/{chunk-U26KRMYX.js → chunk-QHCIZLIX.js} +537 -27
- package/dist/{chunk-472VVYYV.js → chunk-RDV4BQRZ.js} +1 -1
- package/dist/{chunk-UYUS4L6F.js → chunk-SA6BEEAB.js} +16 -9
- package/dist/{chunk-HDPH4CHJ.js → chunk-THXMSSFZ.js} +1 -1
- package/dist/{chunk-RLOXMHLA.js → chunk-V7QL4QMW.js} +4 -4
- package/dist/{chunk-56TFPTZU.js → chunk-WHAJ3QVY.js} +1 -1
- package/dist/{chunk-ZNBGWMVQ.js → chunk-Y75ZDQB5.js} +1 -1
- package/dist/cli/chat.js +29 -30
- package/dist/cli/check.js +6 -6
- package/dist/cli/plugins.js +12 -13
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +7 -7
- package/dist/db/schema/artifacts.d.ts +178 -0
- package/dist/db/schema.d.ts +179 -1
- package/dist/{db-2JKT3BB5.js → db-66XZ4HHQ.js} +7 -7
- package/dist/handlers/artifacts.d.ts +8 -0
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-7MC2UMQC.js → oauth-callback-server-FMLKDUUF.js} +22 -23
- package/dist/{runner-GUU4G7XO.js → runner-YZONUMNY.js} +12 -13
- package/dist/{skills-7NW5N3VM.js → skills-3UDJJXSO.js} +6 -6
- package/dist/spawn-TBPVA5S2.js +37 -0
- package/dist/{validation-AQLI6N2C.js → validation-3HTDBONC.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-FLFK5XNU.js → work-O4YTIS54.js} +17 -17
- package/dist/worker-WHURUEYX.js +24 -0
- package/migrations/0028_artifacts.sql +16 -0
- package/migrations/meta/0028_snapshot.json +2685 -0
- package/migrations/meta/_journal.json +8 -1
- package/package.json +4 -4
- package/dist/chunk-OUAZDZTZ.js +0 -441
- package/dist/spawn-WGK4W3XF.js +0 -37
- package/dist/worker-KSJIRBQJ.js +0 -24
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PluginHookDeniedError,
|
|
3
|
+
applyPluginFormatMarkdown,
|
|
3
4
|
createPluginHookRunner,
|
|
4
5
|
getPluginApiRoutes,
|
|
5
6
|
getPluginOperationalReports,
|
|
7
|
+
getPluginProfileReports,
|
|
6
8
|
getPluginRoutes,
|
|
7
9
|
getPluginSlackConversationLink,
|
|
8
10
|
getPluginSystemPromptContributions,
|
|
@@ -11,26 +13,27 @@ import {
|
|
|
11
13
|
getPlugins,
|
|
12
14
|
setPlugins,
|
|
13
15
|
validatePlugins
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-4UO3UAW7.js";
|
|
16
|
+
} from "./chunk-QHCIZLIX.js";
|
|
17
|
+
import "./chunk-DDQ43S5Q.js";
|
|
18
|
+
import "./chunk-CZ6EHOU5.js";
|
|
18
19
|
import "./chunk-EM225ITJ.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-DZC3F2UI.js";
|
|
21
|
+
import "./chunk-MNCEGXEH.js";
|
|
21
22
|
import "./chunk-VFUK3X5B.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-7DTPFFQX.js";
|
|
23
24
|
import "./chunk-V7YE4WCP.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-Y75ZDQB5.js";
|
|
25
26
|
import "./chunk-6GWA276C.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-THXMSSFZ.js";
|
|
28
|
+
import "./chunk-BPZQWAZJ.js";
|
|
28
29
|
import "./chunk-MLKGABMK.js";
|
|
29
30
|
export {
|
|
30
31
|
PluginHookDeniedError,
|
|
32
|
+
applyPluginFormatMarkdown,
|
|
31
33
|
createPluginHookRunner,
|
|
32
34
|
getPluginApiRoutes,
|
|
33
35
|
getPluginOperationalReports,
|
|
36
|
+
getPluginProfileReports,
|
|
34
37
|
getPluginRoutes,
|
|
35
38
|
getPluginSlackConversationLink,
|
|
36
39
|
getPluginSystemPromptContributions,
|
|
@@ -88,6 +88,23 @@ export declare function readLocationDetail(locationId: string, options?: {
|
|
|
88
88
|
sentryTraceUrl?: string | undefined;
|
|
89
89
|
sourceUrl?: string | undefined;
|
|
90
90
|
traceId?: string | undefined;
|
|
91
|
+
annotations?: ({
|
|
92
|
+
kind: "resource_link";
|
|
93
|
+
key: string;
|
|
94
|
+
label: string;
|
|
95
|
+
url: string;
|
|
96
|
+
description?: string | undefined;
|
|
97
|
+
status?: "open" | "draft" | "closed" | "merged" | "warning" | undefined;
|
|
98
|
+
} & {
|
|
99
|
+
plugin: string;
|
|
100
|
+
createdAt: string;
|
|
101
|
+
updatedAt: string;
|
|
102
|
+
})[] | undefined;
|
|
103
|
+
sidebarAnnotations?: {
|
|
104
|
+
key: string;
|
|
105
|
+
label: string;
|
|
106
|
+
icon?: "circle-dot" | "circle-dashed" | "circle-x" | "git-merge" | "git-pull-request" | "triangle-alert" | undefined;
|
|
107
|
+
}[] | undefined;
|
|
91
108
|
assignedWork?: boolean | undefined;
|
|
92
109
|
finishedWorkAt?: string | undefined;
|
|
93
110
|
isPriority?: boolean | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { User } from "@sentry/junior-plugin-api";
|
|
2
|
+
import { type PluginOperationalReportFeed } from "@/reporting-schema";
|
|
3
|
+
/** Read sanitized person-scoped plugin reports for one profile subject. */
|
|
4
|
+
export declare function readPeoplePluginReports(args: {
|
|
5
|
+
email: string;
|
|
6
|
+
viewer: User;
|
|
7
|
+
}): Promise<PluginOperationalReportFeed>;
|
|
@@ -241,6 +241,36 @@ export declare const conversationSummaryReportSchema: z.ZodObject<{
|
|
|
241
241
|
sentryTraceUrl: z.ZodOptional<z.ZodString>;
|
|
242
242
|
sourceUrl: z.ZodOptional<z.ZodString>;
|
|
243
243
|
traceId: z.ZodOptional<z.ZodString>;
|
|
244
|
+
annotations: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
245
|
+
kind: z.ZodLiteral<"resource_link">;
|
|
246
|
+
key: z.ZodString;
|
|
247
|
+
label: z.ZodString;
|
|
248
|
+
url: z.ZodString;
|
|
249
|
+
description: z.ZodOptional<z.ZodString>;
|
|
250
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
251
|
+
open: "open";
|
|
252
|
+
draft: "draft";
|
|
253
|
+
closed: "closed";
|
|
254
|
+
merged: "merged";
|
|
255
|
+
warning: "warning";
|
|
256
|
+
}>>;
|
|
257
|
+
}, z.core.$strict>], "kind">, z.ZodObject<{
|
|
258
|
+
plugin: z.ZodString;
|
|
259
|
+
createdAt: z.ZodString;
|
|
260
|
+
updatedAt: z.ZodString;
|
|
261
|
+
}, z.core.$strip>>>>;
|
|
262
|
+
sidebarAnnotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
263
|
+
icon: z.ZodOptional<z.ZodEnum<{
|
|
264
|
+
"circle-dot": "circle-dot";
|
|
265
|
+
"circle-dashed": "circle-dashed";
|
|
266
|
+
"circle-x": "circle-x";
|
|
267
|
+
"git-merge": "git-merge";
|
|
268
|
+
"git-pull-request": "git-pull-request";
|
|
269
|
+
"triangle-alert": "triangle-alert";
|
|
270
|
+
}>>;
|
|
271
|
+
key: z.ZodString;
|
|
272
|
+
label: z.ZodString;
|
|
273
|
+
}, z.core.$strict>>>;
|
|
244
274
|
assignedWork: z.ZodOptional<z.ZodBoolean>;
|
|
245
275
|
finishedWorkAt: z.ZodOptional<z.ZodString>;
|
|
246
276
|
isPriority: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -347,13 +377,13 @@ export declare const conversationReportEventDataSchema: z.ZodDiscriminatedUnion<
|
|
|
347
377
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
348
378
|
check: "check";
|
|
349
379
|
key: "key";
|
|
380
|
+
link: "link";
|
|
350
381
|
warning: "warning";
|
|
351
382
|
activity: "activity";
|
|
352
383
|
brain: "brain";
|
|
353
384
|
calendar: "calendar";
|
|
354
385
|
database: "database";
|
|
355
386
|
info: "info";
|
|
356
|
-
link: "link";
|
|
357
387
|
sparkles: "sparkles";
|
|
358
388
|
}>>;
|
|
359
389
|
preview: z.ZodOptional<z.ZodString>;
|
|
@@ -542,13 +572,13 @@ export declare const conversationReportEventSchema: z.ZodObject<{
|
|
|
542
572
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
543
573
|
check: "check";
|
|
544
574
|
key: "key";
|
|
575
|
+
link: "link";
|
|
545
576
|
warning: "warning";
|
|
546
577
|
activity: "activity";
|
|
547
578
|
brain: "brain";
|
|
548
579
|
calendar: "calendar";
|
|
549
580
|
database: "database";
|
|
550
581
|
info: "info";
|
|
551
|
-
link: "link";
|
|
552
582
|
sparkles: "sparkles";
|
|
553
583
|
}>>;
|
|
554
584
|
preview: z.ZodOptional<z.ZodString>;
|
|
@@ -723,10 +753,6 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
723
753
|
sentryTraceUrl: z.ZodOptional<z.ZodString>;
|
|
724
754
|
sourceUrl: z.ZodOptional<z.ZodString>;
|
|
725
755
|
traceId: z.ZodOptional<z.ZodString>;
|
|
726
|
-
assignedWork: z.ZodOptional<z.ZodBoolean>;
|
|
727
|
-
finishedWorkAt: z.ZodOptional<z.ZodString>;
|
|
728
|
-
isPriority: z.ZodOptional<z.ZodBoolean>;
|
|
729
|
-
unfinishedWork: z.ZodOptional<z.ZodBoolean>;
|
|
730
756
|
annotations: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
731
757
|
kind: z.ZodLiteral<"resource_link">;
|
|
732
758
|
key: z.ZodString;
|
|
@@ -745,6 +771,22 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
745
771
|
createdAt: z.ZodString;
|
|
746
772
|
updatedAt: z.ZodString;
|
|
747
773
|
}, z.core.$strip>>>>;
|
|
774
|
+
sidebarAnnotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
775
|
+
icon: z.ZodOptional<z.ZodEnum<{
|
|
776
|
+
"circle-dot": "circle-dot";
|
|
777
|
+
"circle-dashed": "circle-dashed";
|
|
778
|
+
"circle-x": "circle-x";
|
|
779
|
+
"git-merge": "git-merge";
|
|
780
|
+
"git-pull-request": "git-pull-request";
|
|
781
|
+
"triangle-alert": "triangle-alert";
|
|
782
|
+
}>>;
|
|
783
|
+
key: z.ZodString;
|
|
784
|
+
label: z.ZodString;
|
|
785
|
+
}, z.core.$strict>>>;
|
|
786
|
+
assignedWork: z.ZodOptional<z.ZodBoolean>;
|
|
787
|
+
finishedWorkAt: z.ZodOptional<z.ZodString>;
|
|
788
|
+
isPriority: z.ZodOptional<z.ZodBoolean>;
|
|
789
|
+
unfinishedWork: z.ZodOptional<z.ZodBoolean>;
|
|
748
790
|
modelUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
749
791
|
modelId: z.ZodString;
|
|
750
792
|
usage: z.ZodObject<{
|
|
@@ -866,13 +908,13 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
866
908
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
867
909
|
check: "check";
|
|
868
910
|
key: "key";
|
|
911
|
+
link: "link";
|
|
869
912
|
warning: "warning";
|
|
870
913
|
activity: "activity";
|
|
871
914
|
brain: "brain";
|
|
872
915
|
calendar: "calendar";
|
|
873
916
|
database: "database";
|
|
874
917
|
info: "info";
|
|
875
|
-
link: "link";
|
|
876
918
|
sparkles: "sparkles";
|
|
877
919
|
}>>;
|
|
878
920
|
preview: z.ZodOptional<z.ZodString>;
|
|
@@ -1084,13 +1126,13 @@ export declare const conversationEventPageSchema: z.ZodObject<{
|
|
|
1084
1126
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
1085
1127
|
check: "check";
|
|
1086
1128
|
key: "key";
|
|
1129
|
+
link: "link";
|
|
1087
1130
|
warning: "warning";
|
|
1088
1131
|
activity: "activity";
|
|
1089
1132
|
brain: "brain";
|
|
1090
1133
|
calendar: "calendar";
|
|
1091
1134
|
database: "database";
|
|
1092
1135
|
info: "info";
|
|
1093
|
-
link: "link";
|
|
1094
1136
|
sparkles: "sparkles";
|
|
1095
1137
|
}>>;
|
|
1096
1138
|
preview: z.ZodOptional<z.ZodString>;
|
|
@@ -1250,6 +1292,36 @@ export declare const conversationFeedSchema: z.ZodObject<{
|
|
|
1250
1292
|
sentryTraceUrl: z.ZodOptional<z.ZodString>;
|
|
1251
1293
|
sourceUrl: z.ZodOptional<z.ZodString>;
|
|
1252
1294
|
traceId: z.ZodOptional<z.ZodString>;
|
|
1295
|
+
annotations: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1296
|
+
kind: z.ZodLiteral<"resource_link">;
|
|
1297
|
+
key: z.ZodString;
|
|
1298
|
+
label: z.ZodString;
|
|
1299
|
+
url: z.ZodString;
|
|
1300
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1301
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1302
|
+
open: "open";
|
|
1303
|
+
draft: "draft";
|
|
1304
|
+
closed: "closed";
|
|
1305
|
+
merged: "merged";
|
|
1306
|
+
warning: "warning";
|
|
1307
|
+
}>>;
|
|
1308
|
+
}, z.core.$strict>], "kind">, z.ZodObject<{
|
|
1309
|
+
plugin: z.ZodString;
|
|
1310
|
+
createdAt: z.ZodString;
|
|
1311
|
+
updatedAt: z.ZodString;
|
|
1312
|
+
}, z.core.$strip>>>>;
|
|
1313
|
+
sidebarAnnotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1314
|
+
icon: z.ZodOptional<z.ZodEnum<{
|
|
1315
|
+
"circle-dot": "circle-dot";
|
|
1316
|
+
"circle-dashed": "circle-dashed";
|
|
1317
|
+
"circle-x": "circle-x";
|
|
1318
|
+
"git-merge": "git-merge";
|
|
1319
|
+
"git-pull-request": "git-pull-request";
|
|
1320
|
+
"triangle-alert": "triangle-alert";
|
|
1321
|
+
}>>;
|
|
1322
|
+
key: z.ZodString;
|
|
1323
|
+
label: z.ZodString;
|
|
1324
|
+
}, z.core.$strict>>>;
|
|
1253
1325
|
assignedWork: z.ZodOptional<z.ZodBoolean>;
|
|
1254
1326
|
finishedWorkAt: z.ZodOptional<z.ZodString>;
|
|
1255
1327
|
isPriority: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -195,6 +195,36 @@ 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
|
+
annotations: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
199
|
+
kind: z.ZodLiteral<"resource_link">;
|
|
200
|
+
key: z.ZodString;
|
|
201
|
+
label: z.ZodString;
|
|
202
|
+
url: z.ZodString;
|
|
203
|
+
description: z.ZodOptional<z.ZodString>;
|
|
204
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
205
|
+
open: "open";
|
|
206
|
+
draft: "draft";
|
|
207
|
+
closed: "closed";
|
|
208
|
+
merged: "merged";
|
|
209
|
+
warning: "warning";
|
|
210
|
+
}>>;
|
|
211
|
+
}, z.core.$strict>], "kind">, z.ZodObject<{
|
|
212
|
+
plugin: z.ZodString;
|
|
213
|
+
createdAt: z.ZodString;
|
|
214
|
+
updatedAt: z.ZodString;
|
|
215
|
+
}, z.core.$strip>>>>;
|
|
216
|
+
sidebarAnnotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
217
|
+
icon: z.ZodOptional<z.ZodEnum<{
|
|
218
|
+
"circle-dot": "circle-dot";
|
|
219
|
+
"circle-dashed": "circle-dashed";
|
|
220
|
+
"circle-x": "circle-x";
|
|
221
|
+
"git-merge": "git-merge";
|
|
222
|
+
"git-pull-request": "git-pull-request";
|
|
223
|
+
"triangle-alert": "triangle-alert";
|
|
224
|
+
}>>;
|
|
225
|
+
key: z.ZodString;
|
|
226
|
+
label: z.ZodString;
|
|
227
|
+
}, z.core.$strict>>>;
|
|
198
228
|
assignedWork: z.ZodOptional<z.ZodBoolean>;
|
|
199
229
|
finishedWorkAt: z.ZodOptional<z.ZodString>;
|
|
200
230
|
isPriority: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -162,6 +162,36 @@ 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
|
+
annotations: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
166
|
+
kind: z.ZodLiteral<"resource_link">;
|
|
167
|
+
key: z.ZodString;
|
|
168
|
+
label: z.ZodString;
|
|
169
|
+
url: z.ZodString;
|
|
170
|
+
description: z.ZodOptional<z.ZodString>;
|
|
171
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
172
|
+
open: "open";
|
|
173
|
+
draft: "draft";
|
|
174
|
+
closed: "closed";
|
|
175
|
+
merged: "merged";
|
|
176
|
+
warning: "warning";
|
|
177
|
+
}>>;
|
|
178
|
+
}, z.core.$strict>], "kind">, z.ZodObject<{
|
|
179
|
+
plugin: z.ZodString;
|
|
180
|
+
createdAt: z.ZodString;
|
|
181
|
+
updatedAt: z.ZodString;
|
|
182
|
+
}, z.core.$strip>>>>;
|
|
183
|
+
sidebarAnnotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
184
|
+
icon: z.ZodOptional<z.ZodEnum<{
|
|
185
|
+
"circle-dot": "circle-dot";
|
|
186
|
+
"circle-dashed": "circle-dashed";
|
|
187
|
+
"circle-x": "circle-x";
|
|
188
|
+
"git-merge": "git-merge";
|
|
189
|
+
"git-pull-request": "git-pull-request";
|
|
190
|
+
"triangle-alert": "triangle-alert";
|
|
191
|
+
}>>;
|
|
192
|
+
key: z.ZodString;
|
|
193
|
+
label: z.ZodString;
|
|
194
|
+
}, z.core.$strict>>>;
|
|
165
195
|
assignedWork: z.ZodOptional<z.ZodBoolean>;
|
|
166
196
|
finishedWorkAt: z.ZodOptional<z.ZodString>;
|
|
167
197
|
isPriority: z.ZodOptional<z.ZodBoolean>;
|
package/dist/api/schema.js
CHANGED
package/dist/api.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
taskListSchema,
|
|
37
37
|
taskParamsSchema,
|
|
38
38
|
taskRunListSchema
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-SA6BEEAB.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-
|
|
49
|
+
} from "./chunk-JRVURR3H.js";
|
|
50
50
|
import {
|
|
51
51
|
buildSentryConversationUrl,
|
|
52
52
|
getWebAuthorization
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-RDV4BQRZ.js";
|
|
54
54
|
import {
|
|
55
55
|
cancelHumanFacingPendingMessages,
|
|
56
56
|
getConversation
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-5NEBOHRG.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-
|
|
66
|
-
import "./chunk-
|
|
65
|
+
} from "./chunk-KQSO4DJ4.js";
|
|
66
|
+
import "./chunk-OPNJRQDP.js";
|
|
67
67
|
import {
|
|
68
68
|
healthReportSchema,
|
|
69
69
|
pluginOperationalReportFeedSchema,
|
|
@@ -88,30 +88,30 @@ import {
|
|
|
88
88
|
listPublicScheduledTasksForTeams,
|
|
89
89
|
readLiveAttachment,
|
|
90
90
|
readStats
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-4WYGQ47U.js";
|
|
92
92
|
import {
|
|
93
93
|
parseSlackThreadId
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-WHAJ3QVY.js";
|
|
95
95
|
import {
|
|
96
96
|
agentTurnUsageSchema,
|
|
97
97
|
fallbackShortTitle,
|
|
98
98
|
hasAgentTurnUsage,
|
|
99
99
|
renderJuniorNativeConversationEvent
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-V7QL4QMW.js";
|
|
101
101
|
import "./chunk-3Y47VMHV.js";
|
|
102
102
|
import "./chunk-PDO5BLNM.js";
|
|
103
103
|
import {
|
|
104
104
|
createPluginLogger,
|
|
105
|
+
findUserByEmail,
|
|
105
106
|
getPlugins,
|
|
107
|
+
getSlackClient,
|
|
106
108
|
listConversationAnnotations,
|
|
109
|
+
listConversationAnnotationsById,
|
|
107
110
|
renderPluginConversationEvent,
|
|
108
111
|
resolveViewerUser,
|
|
109
|
-
updateViewerDisplayName
|
|
110
|
-
} from "./chunk-U26KRMYX.js";
|
|
111
|
-
import {
|
|
112
|
-
getSlackClient,
|
|
112
|
+
updateViewerDisplayName,
|
|
113
113
|
withSlackRetries
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-QHCIZLIX.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-
|
|
122
|
+
} from "./chunk-DDQ43S5Q.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-
|
|
130
|
+
} from "./chunk-CZ6EHOU5.js";
|
|
131
131
|
import "./chunk-EM225ITJ.js";
|
|
132
|
-
import "./chunk-
|
|
133
|
-
import "./chunk-
|
|
132
|
+
import "./chunk-DZC3F2UI.js";
|
|
133
|
+
import "./chunk-MNCEGXEH.js";
|
|
134
134
|
import {
|
|
135
135
|
juniorDestinations
|
|
136
136
|
} from "./chunk-VFUK3X5B.js";
|
|
137
137
|
import {
|
|
138
138
|
canExposeConversationPayload
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-7DTPFFQX.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-
|
|
149
|
+
} from "./chunk-Y75ZDQB5.js";
|
|
150
150
|
import "./chunk-6GWA276C.js";
|
|
151
|
-
import "./chunk-
|
|
152
|
-
import "./chunk-
|
|
151
|
+
import "./chunk-THXMSSFZ.js";
|
|
152
|
+
import "./chunk-BPZQWAZJ.js";
|
|
153
153
|
import "./chunk-MLKGABMK.js";
|
|
154
154
|
|
|
155
155
|
// src/api.ts
|
|
@@ -1660,6 +1660,53 @@ async function readConversationAuxiliaryCostsFromSql(db, conversationIds, option
|
|
|
1660
1660
|
return result;
|
|
1661
1661
|
}
|
|
1662
1662
|
|
|
1663
|
+
// src/chat/plugins/conversation-sidebar.ts
|
|
1664
|
+
import {
|
|
1665
|
+
conversationSidebarAnnotationSchema
|
|
1666
|
+
} from "@sentry/junior-plugin-api";
|
|
1667
|
+
async function listConversationSidebarAnnotations(conversationIds, annotationsByConversation) {
|
|
1668
|
+
const candidates = new Set(conversationIds);
|
|
1669
|
+
const selected = {};
|
|
1670
|
+
for (const plugin of getPlugins()) {
|
|
1671
|
+
const hook = plugin.hooks?.conversationSidebar;
|
|
1672
|
+
if (!hook) continue;
|
|
1673
|
+
const annotationsByConversationId = Object.fromEntries(
|
|
1674
|
+
conversationIds.flatMap((conversationId) => {
|
|
1675
|
+
const annotations = (annotationsByConversation.get(conversationId) ?? []).filter(
|
|
1676
|
+
(annotation) => annotation.plugin === plugin.manifest.name
|
|
1677
|
+
);
|
|
1678
|
+
return annotations.length > 0 ? [[conversationId, annotations]] : [];
|
|
1679
|
+
})
|
|
1680
|
+
);
|
|
1681
|
+
try {
|
|
1682
|
+
const result = await hook({
|
|
1683
|
+
annotationsByConversationId,
|
|
1684
|
+
conversationIds,
|
|
1685
|
+
db: getDb(),
|
|
1686
|
+
log: createPluginLogger(plugin.manifest.name),
|
|
1687
|
+
plugin: { name: plugin.manifest.name }
|
|
1688
|
+
});
|
|
1689
|
+
for (const [conversationId, annotations] of Object.entries(
|
|
1690
|
+
result.annotationsByConversationId
|
|
1691
|
+
)) {
|
|
1692
|
+
if (!candidates.has(conversationId)) continue;
|
|
1693
|
+
const parsed = conversationSidebarAnnotationSchema.array().safeParse(annotations);
|
|
1694
|
+
if (!parsed.success || parsed.data.length === 0) continue;
|
|
1695
|
+
selected[conversationId] = [
|
|
1696
|
+
...selected[conversationId] ?? [],
|
|
1697
|
+
...parsed.data
|
|
1698
|
+
];
|
|
1699
|
+
}
|
|
1700
|
+
} catch (error) {
|
|
1701
|
+
logWarn("plugin.conversation_sidebar.hook.failed", {
|
|
1702
|
+
"app.plugin.name": plugin.manifest.name,
|
|
1703
|
+
"exception.message": error instanceof Error ? error.message : String(error)
|
|
1704
|
+
});
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
return selected;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1663
1710
|
// src/chat/plugins/unfinished-work.ts
|
|
1664
1711
|
async function listConversationWork(conversationIds) {
|
|
1665
1712
|
if (conversationIds.length === 0) {
|
|
@@ -1910,6 +1957,7 @@ async function readConversationFeedFromSql(options = {}) {
|
|
|
1910
1957
|
);
|
|
1911
1958
|
const [
|
|
1912
1959
|
accessByConversation,
|
|
1960
|
+
annotationsByConversation,
|
|
1913
1961
|
auxiliaryCostsByRoot,
|
|
1914
1962
|
metricsByRoot,
|
|
1915
1963
|
teamDomainByTeamId,
|
|
@@ -1917,6 +1965,7 @@ async function readConversationFeedFromSql(options = {}) {
|
|
|
1917
1965
|
lastUserMessageAtByConversation
|
|
1918
1966
|
] = await Promise.all([
|
|
1919
1967
|
readConversationAccessFromSql(db, conversationIds, options.viewer),
|
|
1968
|
+
listConversationAnnotationsById(db, conversationIds),
|
|
1920
1969
|
readConversationAuxiliaryCostsFromSql(db, conversationIds, {
|
|
1921
1970
|
includeDescendants: true
|
|
1922
1971
|
}),
|
|
@@ -1929,15 +1978,26 @@ async function readConversationFeedFromSql(options = {}) {
|
|
|
1929
1978
|
listConversationWork(conversationIds),
|
|
1930
1979
|
readLastUserMessageAtByConversation(db, conversationIds)
|
|
1931
1980
|
]);
|
|
1981
|
+
const visibleAnnotationsByConversation = new Map(
|
|
1982
|
+
conversationIds.map((conversationId) => [
|
|
1983
|
+
conversationId,
|
|
1984
|
+
accessByConversation.get(conversationId)?.canViewPrivateContent ? annotationsByConversation.get(conversationId) ?? [] : []
|
|
1985
|
+
])
|
|
1986
|
+
);
|
|
1987
|
+
const sidebarAnnotationsByConversation = await listConversationSidebarAnnotations(
|
|
1988
|
+
conversationIds,
|
|
1989
|
+
visibleAnnotationsByConversation
|
|
1990
|
+
);
|
|
1932
1991
|
const assignedWork = new Set(conversationWork.assignedIds);
|
|
1933
1992
|
const unfinishedWork = new Set(conversationWork.unfinishedIds);
|
|
1934
1993
|
return {
|
|
1935
1994
|
conversations: conversations.map((conversation, index) => {
|
|
1936
1995
|
const row = rows[index];
|
|
1996
|
+
const access = accessByConversation.get(conversation.conversationId);
|
|
1937
1997
|
const metrics = metricsByRoot.get(conversation.conversationId);
|
|
1938
1998
|
const summary = conversationSummaryFromStoredConversation({
|
|
1939
1999
|
conversation,
|
|
1940
|
-
access
|
|
2000
|
+
access,
|
|
1941
2001
|
auxiliaryCosts: auxiliaryCostsByRoot.get(conversation.conversationId),
|
|
1942
2002
|
durationMs: metrics?.durationMs ?? row.conversation.durationMs,
|
|
1943
2003
|
teamDomainByTeamId,
|
|
@@ -1951,9 +2011,14 @@ async function readConversationFeedFromSql(options = {}) {
|
|
|
1951
2011
|
} : {},
|
|
1952
2012
|
...unfinishedWork.has(conversation.conversationId) ? { unfinishedWork: true } : {}
|
|
1953
2013
|
};
|
|
2014
|
+
const annotations = access?.canViewPrivateContent ? annotationsByConversation.get(conversation.conversationId) ?? [] : [];
|
|
1954
2015
|
return {
|
|
1955
2016
|
...summary,
|
|
1956
2017
|
...work,
|
|
2018
|
+
...annotations.length > 0 ? { annotations } : {},
|
|
2019
|
+
...sidebarAnnotationsByConversation[conversation.conversationId] ? {
|
|
2020
|
+
sidebarAnnotations: sidebarAnnotationsByConversation[conversation.conversationId]
|
|
2021
|
+
} : {},
|
|
1957
2022
|
isPriority: isConversationPriority(
|
|
1958
2023
|
{
|
|
1959
2024
|
lastSeenAt: summary.lastSeenAt,
|
|
@@ -4100,6 +4165,29 @@ async function readPeopleList() {
|
|
|
4100
4165
|
return actorDirectoryReportSchema.parse(await readPeopleListFromSql());
|
|
4101
4166
|
}
|
|
4102
4167
|
|
|
4168
|
+
// src/api/people/plugin-reports.ts
|
|
4169
|
+
async function readPeoplePluginReports(args) {
|
|
4170
|
+
const nowMs = Date.now();
|
|
4171
|
+
const subject = await findUserByEmail(args.email);
|
|
4172
|
+
if (!subject) {
|
|
4173
|
+
return pluginOperationalReportFeedSchema.parse({
|
|
4174
|
+
generatedAt: new Date(nowMs).toISOString(),
|
|
4175
|
+
reports: [],
|
|
4176
|
+
source: "plugins"
|
|
4177
|
+
});
|
|
4178
|
+
}
|
|
4179
|
+
const { getPluginProfileReports } = await import("./agent-hooks-TL2SGC5W.js");
|
|
4180
|
+
return pluginOperationalReportFeedSchema.parse({
|
|
4181
|
+
generatedAt: new Date(nowMs).toISOString(),
|
|
4182
|
+
reports: await getPluginProfileReports({
|
|
4183
|
+
nowMs,
|
|
4184
|
+
subject,
|
|
4185
|
+
viewer: args.viewer
|
|
4186
|
+
}),
|
|
4187
|
+
source: "plugins"
|
|
4188
|
+
});
|
|
4189
|
+
}
|
|
4190
|
+
|
|
4103
4191
|
// src/api/people/profile.query.ts
|
|
4104
4192
|
import { and as and14, eq as eq15, gte as gte4, sql as sql11 } from "drizzle-orm";
|
|
4105
4193
|
function emptyProfile(email, nowMs) {
|
|
@@ -4387,6 +4475,19 @@ function createPeopleRoutes() {
|
|
|
4387
4475
|
"/",
|
|
4388
4476
|
async () => jsonResponse(actorDirectoryReportSchema, await readPeopleList())
|
|
4389
4477
|
);
|
|
4478
|
+
app.get(
|
|
4479
|
+
"/:email/plugin-reports",
|
|
4480
|
+
requireViewer,
|
|
4481
|
+
validateRequest("param", personParamsSchema, "Invalid route parameters."),
|
|
4482
|
+
async (context) => {
|
|
4483
|
+
const { email } = context.req.valid("param");
|
|
4484
|
+
const viewer = context.get("viewer");
|
|
4485
|
+
return jsonResponse(
|
|
4486
|
+
pluginOperationalReportFeedSchema,
|
|
4487
|
+
await readPeoplePluginReports({ email, viewer })
|
|
4488
|
+
);
|
|
4489
|
+
}
|
|
4490
|
+
);
|
|
4390
4491
|
app.get(
|
|
4391
4492
|
"/:email",
|
|
4392
4493
|
validateRequest("param", personParamsSchema, "Invalid route parameters."),
|
|
@@ -4733,7 +4834,7 @@ function readDescriptionText(home) {
|
|
|
4733
4834
|
}
|
|
4734
4835
|
}
|
|
4735
4836
|
async function readSkillReports() {
|
|
4736
|
-
const { discoverSkills } = await import("./skills-
|
|
4837
|
+
const { discoverSkills } = await import("./skills-3UDJJXSO.js");
|
|
4737
4838
|
const skills = await discoverSkills();
|
|
4738
4839
|
return skillReportsSchema.parse(
|
|
4739
4840
|
skills.map((skill) => ({
|
|
@@ -4743,7 +4844,7 @@ async function readSkillReports() {
|
|
|
4743
4844
|
);
|
|
4744
4845
|
}
|
|
4745
4846
|
async function readPlugins() {
|
|
4746
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
4847
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-IGSMIADJ.js");
|
|
4747
4848
|
return pluginsSchema.parse(
|
|
4748
4849
|
pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
4749
4850
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
@@ -4756,7 +4857,7 @@ async function readPlugins() {
|
|
|
4756
4857
|
async function readRuntimeInfoReport() {
|
|
4757
4858
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
4758
4859
|
import("./discovery-GUFTFBTL.js"),
|
|
4759
|
-
import("./catalog-runtime-
|
|
4860
|
+
import("./catalog-runtime-IGSMIADJ.js"),
|
|
4760
4861
|
readPlugins(),
|
|
4761
4862
|
readSkillReports()
|
|
4762
4863
|
]);
|
|
@@ -4772,7 +4873,7 @@ async function readRuntimeInfoReport() {
|
|
|
4772
4873
|
}
|
|
4773
4874
|
async function readPluginOperationalReportFeed() {
|
|
4774
4875
|
const nowMs = Date.now();
|
|
4775
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
4876
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-TL2SGC5W.js");
|
|
4776
4877
|
return pluginOperationalReportFeedSchema.parse({
|
|
4777
4878
|
source: "plugins",
|
|
4778
4879
|
generatedAt: new Date(nowMs).toISOString(),
|