@sentry/junior 0.160.0 → 0.161.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-O75UJNC6.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 +77 -8
- package/dist/api/schema/location.d.ts +29 -0
- package/dist/api/schema/person.d.ts +29 -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-Z3FHU4ZY.js} +5 -5
- package/dist/chat/artifacts/store.d.ts +42 -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/tools/publish-image.d.ts +44 -0
- package/dist/chat/tools/unpublish-image.d.ts +35 -0
- package/dist/{chunk-MBDWMEO6.js → chunk-4WAZ6DGX.js} +10 -10
- package/dist/{chunk-FJR66CQT.js → chunk-6ILVZOF6.js} +4 -4
- package/dist/{chunk-42E7432W.js → chunk-6WTDZKFR.js} +1 -1
- package/dist/{chunk-2SFMRMDV.js → chunk-CGAIDDLD.js} +1 -1
- package/dist/{chunk-XPX3DYG7.js → chunk-DGKLYDX7.js} +2 -2
- package/dist/{chunk-ZNBGWMVQ.js → chunk-DNSIU27S.js} +1 -1
- package/dist/{chunk-TBRJGMTO.js → chunk-EAIQBR66.js} +1 -1
- package/dist/{chunk-4UO3UAW7.js → chunk-FLMD25Y5.js} +239 -199
- package/dist/{chunk-FKMWPA4A.js → chunk-G35DUPNB.js} +4 -4
- package/dist/{chunk-472VVYYV.js → chunk-HSFYTIS2.js} +1 -1
- package/dist/{chunk-LNUZXEEI.js → chunk-IRHX2S46.js} +1 -1
- package/dist/{chunk-TPFOVXRB.js → chunk-IW7C5C7E.js} +19 -21
- package/dist/{chunk-UNDTW2PY.js → chunk-IYFKONIL.js} +1 -1
- package/dist/{chunk-U26KRMYX.js → chunk-MNY5M7RB.js} +537 -27
- package/dist/{chunk-PZUJPPON.js → chunk-MVG5UPLM.js} +1 -1
- package/dist/{chunk-WACYTIIK.js → chunk-O7JTSJPU.js} +6 -6
- package/dist/{chunk-URPLKXLG.js → chunk-OPIJ6HY3.js} +9 -9
- package/dist/{chunk-756F567I.js → chunk-OY2DBUV4.js} +5 -5
- package/dist/{chunk-M5HCOMDR.js → chunk-OYQEO72I.js} +410 -108
- package/dist/{chunk-2MK6S2UA.js → chunk-QHXT7LLF.js} +1 -1
- package/dist/{chunk-3AHIB66R.js → chunk-QQ7SY5IZ.js} +5 -5
- package/dist/{chunk-BGVQGEKB.js → chunk-RULQD7OX.js} +4 -4
- package/dist/{chunk-J77DLAPE.js → chunk-RVENVPNO.js} +2 -2
- package/dist/{chunk-UYUS4L6F.js → chunk-SA6BEEAB.js} +16 -9
- package/dist/{chunk-RLOXMHLA.js → chunk-STZVUVMS.js} +4 -4
- package/dist/{chunk-JQZIUESN.js → chunk-U2XOBFDK.js} +3 -3
- package/dist/{chunk-PVIM2RWO.js → chunk-V67ORYKQ.js} +8 -10
- package/dist/{chunk-P7W3ZL5J.js → chunk-VXFDVY4C.js} +8 -36
- package/dist/{chunk-YPMDNE7R.js → chunk-WKN4ZQTZ.js} +1 -1
- package/dist/{chunk-HDPH4CHJ.js → chunk-WVSQ2SCS.js} +1 -1
- package/dist/{chunk-56TFPTZU.js → chunk-YSWHAOPQ.js} +1 -1
- package/dist/{chunk-RJGRXDA7.js → chunk-ZBCLWBMV.js} +5 -5
- 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-KKOZRE62.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-5AUZDWXA.js} +22 -23
- package/dist/{runner-GUU4G7XO.js → runner-K5H5NDEC.js} +12 -13
- package/dist/{skills-7NW5N3VM.js → skills-OZGPB6G4.js} +6 -6
- package/dist/spawn-RCQSC2L5.js +37 -0
- package/dist/{validation-AQLI6N2C.js → validation-TVHCNCYL.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-FLFK5XNU.js → work-DXCQMJ5U.js} +17 -17
- package/dist/worker-24HZ5HRI.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-MNY5M7RB.js";
|
|
17
|
+
import "./chunk-U2XOBFDK.js";
|
|
18
|
+
import "./chunk-FLMD25Y5.js";
|
|
18
19
|
import "./chunk-EM225ITJ.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-IYFKONIL.js";
|
|
21
|
+
import "./chunk-RVENVPNO.js";
|
|
21
22
|
import "./chunk-VFUK3X5B.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-EAIQBR66.js";
|
|
23
24
|
import "./chunk-V7YE4WCP.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-DNSIU27S.js";
|
|
25
26
|
import "./chunk-6GWA276C.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-WVSQ2SCS.js";
|
|
28
|
+
import "./chunk-WKN4ZQTZ.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" | "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,35 @@ 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
|
+
"triangle-alert": "triangle-alert";
|
|
269
|
+
}>>;
|
|
270
|
+
key: z.ZodString;
|
|
271
|
+
label: z.ZodString;
|
|
272
|
+
}, z.core.$strict>>>;
|
|
244
273
|
assignedWork: z.ZodOptional<z.ZodBoolean>;
|
|
245
274
|
finishedWorkAt: z.ZodOptional<z.ZodString>;
|
|
246
275
|
isPriority: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -347,13 +376,13 @@ export declare const conversationReportEventDataSchema: z.ZodDiscriminatedUnion<
|
|
|
347
376
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
348
377
|
check: "check";
|
|
349
378
|
key: "key";
|
|
379
|
+
link: "link";
|
|
350
380
|
warning: "warning";
|
|
351
381
|
activity: "activity";
|
|
352
382
|
brain: "brain";
|
|
353
383
|
calendar: "calendar";
|
|
354
384
|
database: "database";
|
|
355
385
|
info: "info";
|
|
356
|
-
link: "link";
|
|
357
386
|
sparkles: "sparkles";
|
|
358
387
|
}>>;
|
|
359
388
|
preview: z.ZodOptional<z.ZodString>;
|
|
@@ -542,13 +571,13 @@ export declare const conversationReportEventSchema: z.ZodObject<{
|
|
|
542
571
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
543
572
|
check: "check";
|
|
544
573
|
key: "key";
|
|
574
|
+
link: "link";
|
|
545
575
|
warning: "warning";
|
|
546
576
|
activity: "activity";
|
|
547
577
|
brain: "brain";
|
|
548
578
|
calendar: "calendar";
|
|
549
579
|
database: "database";
|
|
550
580
|
info: "info";
|
|
551
|
-
link: "link";
|
|
552
581
|
sparkles: "sparkles";
|
|
553
582
|
}>>;
|
|
554
583
|
preview: z.ZodOptional<z.ZodString>;
|
|
@@ -723,10 +752,6 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
723
752
|
sentryTraceUrl: z.ZodOptional<z.ZodString>;
|
|
724
753
|
sourceUrl: z.ZodOptional<z.ZodString>;
|
|
725
754
|
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
755
|
annotations: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
731
756
|
kind: z.ZodLiteral<"resource_link">;
|
|
732
757
|
key: z.ZodString;
|
|
@@ -745,6 +770,21 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
745
770
|
createdAt: z.ZodString;
|
|
746
771
|
updatedAt: z.ZodString;
|
|
747
772
|
}, z.core.$strip>>>>;
|
|
773
|
+
sidebarAnnotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
774
|
+
icon: z.ZodOptional<z.ZodEnum<{
|
|
775
|
+
"circle-dot": "circle-dot";
|
|
776
|
+
"circle-dashed": "circle-dashed";
|
|
777
|
+
"circle-x": "circle-x";
|
|
778
|
+
"git-merge": "git-merge";
|
|
779
|
+
"triangle-alert": "triangle-alert";
|
|
780
|
+
}>>;
|
|
781
|
+
key: z.ZodString;
|
|
782
|
+
label: z.ZodString;
|
|
783
|
+
}, z.core.$strict>>>;
|
|
784
|
+
assignedWork: z.ZodOptional<z.ZodBoolean>;
|
|
785
|
+
finishedWorkAt: z.ZodOptional<z.ZodString>;
|
|
786
|
+
isPriority: z.ZodOptional<z.ZodBoolean>;
|
|
787
|
+
unfinishedWork: z.ZodOptional<z.ZodBoolean>;
|
|
748
788
|
modelUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
749
789
|
modelId: z.ZodString;
|
|
750
790
|
usage: z.ZodObject<{
|
|
@@ -866,13 +906,13 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
866
906
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
867
907
|
check: "check";
|
|
868
908
|
key: "key";
|
|
909
|
+
link: "link";
|
|
869
910
|
warning: "warning";
|
|
870
911
|
activity: "activity";
|
|
871
912
|
brain: "brain";
|
|
872
913
|
calendar: "calendar";
|
|
873
914
|
database: "database";
|
|
874
915
|
info: "info";
|
|
875
|
-
link: "link";
|
|
876
916
|
sparkles: "sparkles";
|
|
877
917
|
}>>;
|
|
878
918
|
preview: z.ZodOptional<z.ZodString>;
|
|
@@ -1084,13 +1124,13 @@ export declare const conversationEventPageSchema: z.ZodObject<{
|
|
|
1084
1124
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
1085
1125
|
check: "check";
|
|
1086
1126
|
key: "key";
|
|
1127
|
+
link: "link";
|
|
1087
1128
|
warning: "warning";
|
|
1088
1129
|
activity: "activity";
|
|
1089
1130
|
brain: "brain";
|
|
1090
1131
|
calendar: "calendar";
|
|
1091
1132
|
database: "database";
|
|
1092
1133
|
info: "info";
|
|
1093
|
-
link: "link";
|
|
1094
1134
|
sparkles: "sparkles";
|
|
1095
1135
|
}>>;
|
|
1096
1136
|
preview: z.ZodOptional<z.ZodString>;
|
|
@@ -1250,6 +1290,35 @@ export declare const conversationFeedSchema: z.ZodObject<{
|
|
|
1250
1290
|
sentryTraceUrl: z.ZodOptional<z.ZodString>;
|
|
1251
1291
|
sourceUrl: z.ZodOptional<z.ZodString>;
|
|
1252
1292
|
traceId: z.ZodOptional<z.ZodString>;
|
|
1293
|
+
annotations: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1294
|
+
kind: z.ZodLiteral<"resource_link">;
|
|
1295
|
+
key: z.ZodString;
|
|
1296
|
+
label: z.ZodString;
|
|
1297
|
+
url: z.ZodString;
|
|
1298
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1299
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1300
|
+
open: "open";
|
|
1301
|
+
draft: "draft";
|
|
1302
|
+
closed: "closed";
|
|
1303
|
+
merged: "merged";
|
|
1304
|
+
warning: "warning";
|
|
1305
|
+
}>>;
|
|
1306
|
+
}, z.core.$strict>], "kind">, z.ZodObject<{
|
|
1307
|
+
plugin: z.ZodString;
|
|
1308
|
+
createdAt: z.ZodString;
|
|
1309
|
+
updatedAt: z.ZodString;
|
|
1310
|
+
}, z.core.$strip>>>>;
|
|
1311
|
+
sidebarAnnotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1312
|
+
icon: z.ZodOptional<z.ZodEnum<{
|
|
1313
|
+
"circle-dot": "circle-dot";
|
|
1314
|
+
"circle-dashed": "circle-dashed";
|
|
1315
|
+
"circle-x": "circle-x";
|
|
1316
|
+
"git-merge": "git-merge";
|
|
1317
|
+
"triangle-alert": "triangle-alert";
|
|
1318
|
+
}>>;
|
|
1319
|
+
key: z.ZodString;
|
|
1320
|
+
label: z.ZodString;
|
|
1321
|
+
}, z.core.$strict>>>;
|
|
1253
1322
|
assignedWork: z.ZodOptional<z.ZodBoolean>;
|
|
1254
1323
|
finishedWorkAt: z.ZodOptional<z.ZodString>;
|
|
1255
1324
|
isPriority: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -195,6 +195,35 @@ 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
|
+
"triangle-alert": "triangle-alert";
|
|
223
|
+
}>>;
|
|
224
|
+
key: z.ZodString;
|
|
225
|
+
label: z.ZodString;
|
|
226
|
+
}, z.core.$strict>>>;
|
|
198
227
|
assignedWork: z.ZodOptional<z.ZodBoolean>;
|
|
199
228
|
finishedWorkAt: z.ZodOptional<z.ZodString>;
|
|
200
229
|
isPriority: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -162,6 +162,35 @@ 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
|
+
"triangle-alert": "triangle-alert";
|
|
190
|
+
}>>;
|
|
191
|
+
key: z.ZodString;
|
|
192
|
+
label: z.ZodString;
|
|
193
|
+
}, z.core.$strict>>>;
|
|
165
194
|
assignedWork: z.ZodOptional<z.ZodBoolean>;
|
|
166
195
|
finishedWorkAt: z.ZodOptional<z.ZodString>;
|
|
167
196
|
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-4WAZ6DGX.js";
|
|
50
50
|
import {
|
|
51
51
|
buildSentryConversationUrl,
|
|
52
52
|
getWebAuthorization
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-HSFYTIS2.js";
|
|
54
54
|
import {
|
|
55
55
|
cancelHumanFacingPendingMessages,
|
|
56
56
|
getConversation
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-G35DUPNB.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-OPIJ6HY3.js";
|
|
66
|
+
import "./chunk-QQ7SY5IZ.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-ZBCLWBMV.js";
|
|
92
92
|
import {
|
|
93
93
|
parseSlackThreadId
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-YSWHAOPQ.js";
|
|
95
95
|
import {
|
|
96
96
|
agentTurnUsageSchema,
|
|
97
97
|
fallbackShortTitle,
|
|
98
98
|
hasAgentTurnUsage,
|
|
99
99
|
renderJuniorNativeConversationEvent
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-STZVUVMS.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-MNY5M7RB.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-U2XOBFDK.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-FLMD25Y5.js";
|
|
131
131
|
import "./chunk-EM225ITJ.js";
|
|
132
|
-
import "./chunk-
|
|
133
|
-
import "./chunk-
|
|
132
|
+
import "./chunk-IYFKONIL.js";
|
|
133
|
+
import "./chunk-RVENVPNO.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-EAIQBR66.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-DNSIU27S.js";
|
|
150
150
|
import "./chunk-6GWA276C.js";
|
|
151
|
-
import "./chunk-
|
|
152
|
-
import "./chunk-
|
|
151
|
+
import "./chunk-WVSQ2SCS.js";
|
|
152
|
+
import "./chunk-WKN4ZQTZ.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-O75UJNC6.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-OZGPB6G4.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-Z3FHU4ZY.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-Z3FHU4ZY.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-O75UJNC6.js");
|
|
4776
4877
|
return pluginOperationalReportFeedSchema.parse({
|
|
4777
4878
|
source: "plugins",
|
|
4778
4879
|
generatedAt: new Date(nowMs).toISOString(),
|