@sentry/junior 0.97.1 → 0.99.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-XSUIVRQS.js → agent-hooks-OSW6C3CJ.js} +2 -2
- package/dist/api/conversations/detail.d.ts +1 -1
- package/dist/api/conversations/detail.query.d.ts +1 -1
- package/dist/api/conversations/list.d.ts +7 -2
- package/dist/api/conversations/list.query.d.ts +9 -3
- package/dist/api/conversations/projection.d.ts +0 -1
- package/dist/api/conversations/schema.d.ts +31 -8
- package/dist/api/people/schema.d.ts +0 -11
- package/dist/api/people/shared.d.ts +2 -4
- package/dist/api/schema.d.ts +4 -1
- package/dist/api/schema.js +5 -3
- package/dist/api-reference.d.ts +2 -2
- package/dist/api.js +28 -13
- package/dist/app.js +50 -37
- package/dist/chat/conversations/search.d.ts +24 -0
- package/dist/chat/conversations/sql/search.d.ts +4 -0
- package/dist/chat/db.d.ts +3 -0
- package/dist/chat/runtime/report-progress.d.ts +3 -0
- package/dist/chat/runtime/slack-resume.d.ts +2 -0
- package/dist/chat/services/context-compaction.d.ts +1 -0
- package/dist/chat/slack/assistant-thread/status-scheduler.d.ts +4 -3
- package/dist/chat/slack/outbound.d.ts +6 -0
- package/dist/chat/slack/tools/conversation-search.d.ts +71 -0
- package/dist/chat/state/turn-session.d.ts +2 -0
- package/dist/chat/tool-support/zod-tool.d.ts +1 -1
- package/dist/chunk-6DTVCPLO.js +146 -0
- package/dist/{chunk-VFH4ZKZT.js → chunk-CRQVIHDI.js} +1 -3
- package/dist/{chunk-6U26PYI5.js → chunk-CV22LUIV.js} +7 -17
- package/dist/{chunk-GUAP3H7O.js → chunk-DHHU2WSG.js} +2 -2
- package/dist/{chunk-T533JLM3.js → chunk-ER45IV77.js} +8 -6
- package/dist/{chunk-LUAE4MGW.js → chunk-EUZ44ROE.js} +21 -4
- package/dist/{chunk-5HLDPVYS.js → chunk-FTTFV6DC.js} +1 -1
- package/dist/{chunk-3F4OPKGF.js → chunk-IO65E4ZD.js} +2 -2
- package/dist/{chunk-ON6YKIQ7.js → chunk-KFUSLFLL.js} +21 -15
- package/dist/{chunk-FBHZJFHI.js → chunk-NJEDJFK4.js} +1 -1
- package/dist/{chunk-35BNLDOJ.js → chunk-OGHXZ4KQ.js} +134 -57
- package/dist/{chunk-WJOSZOON.js → chunk-OL6XQ23W.js} +11 -150
- package/dist/{chunk-XIRPQQVE.js → chunk-PYK7R5A7.js} +312 -175
- package/dist/{chunk-UAMKJPDF.js → chunk-T55RBE4Z.js} +4 -0
- package/dist/{chunk-WGXMTFNU.js → chunk-WJ7STXT6.js} +5 -3
- package/dist/{chunk-AUUCAFDE.js → chunk-ZZUBLPXD.js} +134 -11
- package/dist/cli/chat.js +11 -10
- package/dist/cli/plugins.js +2 -2
- package/dist/cli/upgrade.js +9 -7
- package/dist/{db-BWXYIKFQ.js → db-GFSCDAHS.js} +3 -1
- package/dist/detail-Q4IVDNGS.js +67 -0
- package/dist/{legacy-import-3NQJVGQL.js → legacy-import-6WWXMALY.js} +2 -2
- package/dist/{list-UXJI5Q5X.js → list-A3F5JDYV.js} +7 -5
- package/dist/{list-A3WFRIYX.js → list-M5BRWW3D.js} +5 -6
- package/dist/{plugin-conversations-DDNGC35A.js → plugin-conversations-PDCQWU3O.js} +3 -3
- package/dist/{profile-4RYDXWTF.js → profile-UEIRSVT3.js} +5 -5
- package/dist/{runner-JALSYH2P.js → runner-267ZRLZD.js} +8 -7
- package/dist/{stats-XKXH3PTY.js → stats-L62E4O4U.js} +7 -17
- package/dist/{subagent-TZ55XY37.js → subagent-UN3MP6LV.js} +6 -6
- package/migrations/0002_conversation_message_search.sql +1 -0
- package/migrations/meta/0002_snapshot.json +987 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +6 -6
- package/dist/detail-GA6NXWQJ.js +0 -43
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
getPlugins,
|
|
12
12
|
setPlugins,
|
|
13
13
|
validatePlugins
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FTTFV6DC.js";
|
|
15
15
|
import "./chunk-WTYEKPXU.js";
|
|
16
16
|
import "./chunk-EOWXRY5E.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-OGHXZ4KQ.js";
|
|
18
18
|
import "./chunk-G3E7SCME.js";
|
|
19
19
|
import "./chunk-4ZNGQH7C.js";
|
|
20
20
|
import "./chunk-EEZCY5WX.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ConversationDetailReport } from "./schema";
|
|
2
|
-
/** Load one conversation
|
|
2
|
+
/** Load one conversation with durable content and recent run diagnostics. */
|
|
3
3
|
export declare function readConversationDetail(conversationId: string): Promise<ConversationDetailReport | undefined>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ConversationDetailReport } from "./schema";
|
|
2
|
-
/** Read one conversation
|
|
2
|
+
/** Read one SQL conversation with its latest operational run settings. */
|
|
3
3
|
export declare function readConversationDetailFromSql(conversationId: string): Promise<ConversationDetailReport | undefined>;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { ConversationFeed } from "./schema";
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Load a bounded feed with an optional normalized actor-email presentation
|
|
4
|
+
* filter. This filter is not an authorization boundary.
|
|
5
|
+
*/
|
|
6
|
+
export declare function readConversationFeed(options?: {
|
|
7
|
+
actorEmail?: string;
|
|
8
|
+
}): Promise<ConversationFeed>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Conversation } from "@/chat/conversations/store";
|
|
2
2
|
import type { JuniorDatabase } from "@/db/db";
|
|
3
3
|
import type { ConversationFeed } from "./schema";
|
|
4
|
-
declare function conversationRows(db: JuniorDatabase, limit: number): Promise<{
|
|
4
|
+
declare function conversationRows(db: JuniorDatabase, limit: number, actorEmail?: string): Promise<{
|
|
5
5
|
conversation: {
|
|
6
6
|
conversationId: string;
|
|
7
7
|
schemaVersion: number;
|
|
@@ -89,6 +89,12 @@ export declare function readConversationRecordFromSql(conversationId: string): P
|
|
|
89
89
|
durationMs: number;
|
|
90
90
|
usage: ConversationRow["conversation"]["usage"];
|
|
91
91
|
} | undefined>;
|
|
92
|
-
/**
|
|
93
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Build a bounded dashboard feed, applying a normalized actor-email filter
|
|
94
|
+
* before the limit when one is provided.
|
|
95
|
+
*/
|
|
96
|
+
export declare function readConversationFeedFromSql(options?: {
|
|
97
|
+
actorEmail?: string;
|
|
98
|
+
limit?: number;
|
|
99
|
+
}): Promise<ConversationFeed>;
|
|
94
100
|
export {};
|
|
@@ -9,6 +9,5 @@ export declare function titleFromConversation(args: {
|
|
|
9
9
|
export declare function conversationSummaryFromStoredConversation(args: {
|
|
10
10
|
conversation: StoredConversation;
|
|
11
11
|
durationMs: number;
|
|
12
|
-
nowMs: number;
|
|
13
12
|
usage?: ConversationUsage;
|
|
14
13
|
}): ConversationSummaryReport;
|
|
@@ -3,7 +3,6 @@ export declare const conversationReportStatusSchema: z.ZodEnum<{
|
|
|
3
3
|
active: "active";
|
|
4
4
|
completed: "completed";
|
|
5
5
|
failed: "failed";
|
|
6
|
-
hung: "hung";
|
|
7
6
|
}>;
|
|
8
7
|
export declare const conversationSurfaceSchema: z.ZodEnum<{
|
|
9
8
|
api: "api";
|
|
@@ -62,7 +61,6 @@ export declare const conversationSummaryReportSchema: z.ZodObject<{
|
|
|
62
61
|
active: "active";
|
|
63
62
|
completed: "completed";
|
|
64
63
|
failed: "failed";
|
|
65
|
-
hung: "hung";
|
|
66
64
|
}>;
|
|
67
65
|
startedAt: z.ZodString;
|
|
68
66
|
lastSeenAt: z.ZodString;
|
|
@@ -301,6 +299,20 @@ export declare const conversationActivityReportSchema: z.ZodDiscriminatedUnion<[
|
|
|
301
299
|
subagentKind: z.ZodString;
|
|
302
300
|
transcriptAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
303
301
|
}, z.core.$strict>], "type">;
|
|
302
|
+
export declare const conversationContextEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
303
|
+
type: z.ZodLiteral<"context_compacted">;
|
|
304
|
+
createdAt: z.ZodString;
|
|
305
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
306
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
307
|
+
transcriptIndex: z.ZodNumber;
|
|
308
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
309
|
+
type: z.ZodLiteral<"model_handoff">;
|
|
310
|
+
createdAt: z.ZodString;
|
|
311
|
+
fromModelId: z.ZodOptional<z.ZodString>;
|
|
312
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
313
|
+
toModelId: z.ZodString;
|
|
314
|
+
transcriptIndex: z.ZodNumber;
|
|
315
|
+
}, z.core.$strict>], "type">;
|
|
304
316
|
export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
305
317
|
displayTitle: z.ZodString;
|
|
306
318
|
cumulativeDurationMs: z.ZodNumber;
|
|
@@ -324,7 +336,6 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
324
336
|
active: "active";
|
|
325
337
|
completed: "completed";
|
|
326
338
|
failed: "failed";
|
|
327
|
-
hung: "hung";
|
|
328
339
|
}>;
|
|
329
340
|
startedAt: z.ZodString;
|
|
330
341
|
lastSeenAt: z.ZodString;
|
|
@@ -411,6 +422,22 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
411
422
|
subagentKind: z.ZodString;
|
|
412
423
|
transcriptAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
413
424
|
}, z.core.$strict>], "type">>>;
|
|
425
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
426
|
+
reasoningLevel: z.ZodOptional<z.ZodString>;
|
|
427
|
+
contextEvents: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
428
|
+
type: z.ZodLiteral<"context_compacted">;
|
|
429
|
+
createdAt: z.ZodString;
|
|
430
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
431
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
432
|
+
transcriptIndex: z.ZodNumber;
|
|
433
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
434
|
+
type: z.ZodLiteral<"model_handoff">;
|
|
435
|
+
createdAt: z.ZodString;
|
|
436
|
+
fromModelId: z.ZodOptional<z.ZodString>;
|
|
437
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
438
|
+
toModelId: z.ZodString;
|
|
439
|
+
transcriptIndex: z.ZodNumber;
|
|
440
|
+
}, z.core.$strict>], "type">>>;
|
|
414
441
|
transcriptAvailable: z.ZodBoolean;
|
|
415
442
|
transcriptMetadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
416
443
|
parts: z.ZodArray<z.ZodObject<{
|
|
@@ -590,7 +617,6 @@ export declare const conversationFeedSchema: z.ZodObject<{
|
|
|
590
617
|
active: "active";
|
|
591
618
|
completed: "completed";
|
|
592
619
|
failed: "failed";
|
|
593
|
-
hung: "hung";
|
|
594
620
|
}>;
|
|
595
621
|
startedAt: z.ZodString;
|
|
596
622
|
lastSeenAt: z.ZodString;
|
|
@@ -621,7 +647,6 @@ export declare const conversationStatsItemSchema: z.ZodObject<{
|
|
|
621
647
|
conversations: z.ZodNumber;
|
|
622
648
|
durationMs: z.ZodNumber;
|
|
623
649
|
failed: z.ZodNumber;
|
|
624
|
-
hung: z.ZodNumber;
|
|
625
650
|
label: z.ZodString;
|
|
626
651
|
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
627
652
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -632,13 +657,11 @@ export declare const conversationStatsReportSchema: z.ZodObject<{
|
|
|
632
657
|
durationMs: z.ZodNumber;
|
|
633
658
|
failed: z.ZodNumber;
|
|
634
659
|
generatedAt: z.ZodString;
|
|
635
|
-
hung: z.ZodNumber;
|
|
636
660
|
locations: z.ZodArray<z.ZodObject<{
|
|
637
661
|
active: z.ZodNumber;
|
|
638
662
|
conversations: z.ZodNumber;
|
|
639
663
|
durationMs: z.ZodNumber;
|
|
640
664
|
failed: z.ZodNumber;
|
|
641
|
-
hung: z.ZodNumber;
|
|
642
665
|
label: z.ZodString;
|
|
643
666
|
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
644
667
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -648,7 +671,6 @@ export declare const conversationStatsReportSchema: z.ZodObject<{
|
|
|
648
671
|
conversations: z.ZodNumber;
|
|
649
672
|
durationMs: z.ZodNumber;
|
|
650
673
|
failed: z.ZodNumber;
|
|
651
|
-
hung: z.ZodNumber;
|
|
652
674
|
label: z.ZodString;
|
|
653
675
|
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
654
676
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -672,6 +694,7 @@ export type TranscriptPartType = z.infer<typeof transcriptPartTypeSchema>;
|
|
|
672
694
|
export type TranscriptPart = z.infer<typeof transcriptPartSchema>;
|
|
673
695
|
export type TranscriptRole = z.infer<typeof transcriptRoleSchema>;
|
|
674
696
|
export type TranscriptMessage = z.infer<typeof transcriptMessageSchema>;
|
|
697
|
+
export type ConversationContextEvent = z.infer<typeof conversationContextEventSchema>;
|
|
675
698
|
export type ConversationActivityStatus = z.infer<typeof conversationActivityStatusSchema>;
|
|
676
699
|
export type ConversationSubagentActivityReport = z.infer<typeof conversationSubagentActivityReportSchema>;
|
|
677
700
|
export type ConversationToolActivityReport = z.infer<typeof conversationToolActivityReportSchema>;
|
|
@@ -5,7 +5,6 @@ export declare const peopleConversationSummaryReportSchema: z.ZodObject<{
|
|
|
5
5
|
active: "active";
|
|
6
6
|
completed: "completed";
|
|
7
7
|
failed: "failed";
|
|
8
|
-
hung: "hung";
|
|
9
8
|
}>;
|
|
10
9
|
surface: z.ZodEnum<{
|
|
11
10
|
api: "api";
|
|
@@ -32,7 +31,6 @@ export declare const peopleConversationSummaryReportSchema: z.ZodObject<{
|
|
|
32
31
|
export declare const peopleConversationStatsItemSchema: z.ZodObject<{
|
|
33
32
|
active: z.ZodNumber;
|
|
34
33
|
failed: z.ZodNumber;
|
|
35
|
-
hung: z.ZodNumber;
|
|
36
34
|
conversations: z.ZodNumber;
|
|
37
35
|
durationMs: z.ZodNumber;
|
|
38
36
|
label: z.ZodString;
|
|
@@ -44,7 +42,6 @@ export declare const actorActivityDayReportSchema: z.ZodObject<{
|
|
|
44
42
|
date: z.ZodString;
|
|
45
43
|
durationMs: z.ZodNumber;
|
|
46
44
|
failed: z.ZodNumber;
|
|
47
|
-
hung: z.ZodNumber;
|
|
48
45
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
49
46
|
}, z.core.$strict>;
|
|
50
47
|
export declare const actorTotalsReportSchema: z.ZodObject<{
|
|
@@ -53,7 +50,6 @@ export declare const actorTotalsReportSchema: z.ZodObject<{
|
|
|
53
50
|
conversations: z.ZodNumber;
|
|
54
51
|
durationMs: z.ZodNumber;
|
|
55
52
|
failed: z.ZodNumber;
|
|
56
|
-
hung: z.ZodNumber;
|
|
57
53
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
58
54
|
}, z.core.$strict>;
|
|
59
55
|
export declare const identifiedActorSchema: z.ZodObject<{
|
|
@@ -68,7 +64,6 @@ export declare const actorSummaryReportSchema: z.ZodObject<{
|
|
|
68
64
|
conversations: z.ZodNumber;
|
|
69
65
|
durationMs: z.ZodNumber;
|
|
70
66
|
failed: z.ZodNumber;
|
|
71
|
-
hung: z.ZodNumber;
|
|
72
67
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
73
68
|
firstSeenAt: z.ZodString;
|
|
74
69
|
lastSeenAt: z.ZodString;
|
|
@@ -87,7 +82,6 @@ export declare const actorDirectoryReportSchema: z.ZodObject<{
|
|
|
87
82
|
conversations: z.ZodNumber;
|
|
88
83
|
durationMs: z.ZodNumber;
|
|
89
84
|
failed: z.ZodNumber;
|
|
90
|
-
hung: z.ZodNumber;
|
|
91
85
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
92
86
|
firstSeenAt: z.ZodString;
|
|
93
87
|
lastSeenAt: z.ZodString;
|
|
@@ -110,14 +104,12 @@ export declare const actorProfileReportSchema: z.ZodObject<{
|
|
|
110
104
|
date: z.ZodString;
|
|
111
105
|
durationMs: z.ZodNumber;
|
|
112
106
|
failed: z.ZodNumber;
|
|
113
|
-
hung: z.ZodNumber;
|
|
114
107
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
115
108
|
}, z.core.$strict>>;
|
|
116
109
|
generatedAt: z.ZodString;
|
|
117
110
|
locations: z.ZodArray<z.ZodObject<{
|
|
118
111
|
active: z.ZodNumber;
|
|
119
112
|
failed: z.ZodNumber;
|
|
120
|
-
hung: z.ZodNumber;
|
|
121
113
|
conversations: z.ZodNumber;
|
|
122
114
|
durationMs: z.ZodNumber;
|
|
123
115
|
label: z.ZodString;
|
|
@@ -128,7 +120,6 @@ export declare const actorProfileReportSchema: z.ZodObject<{
|
|
|
128
120
|
active: "active";
|
|
129
121
|
completed: "completed";
|
|
130
122
|
failed: "failed";
|
|
131
|
-
hung: "hung";
|
|
132
123
|
}>;
|
|
133
124
|
surface: z.ZodEnum<{
|
|
134
125
|
api: "api";
|
|
@@ -164,7 +155,6 @@ export declare const actorProfileReportSchema: z.ZodObject<{
|
|
|
164
155
|
surfaces: z.ZodArray<z.ZodObject<{
|
|
165
156
|
active: z.ZodNumber;
|
|
166
157
|
failed: z.ZodNumber;
|
|
167
|
-
hung: z.ZodNumber;
|
|
168
158
|
conversations: z.ZodNumber;
|
|
169
159
|
durationMs: z.ZodNumber;
|
|
170
160
|
label: z.ZodString;
|
|
@@ -176,7 +166,6 @@ export declare const actorProfileReportSchema: z.ZodObject<{
|
|
|
176
166
|
conversations: z.ZodNumber;
|
|
177
167
|
durationMs: z.ZodNumber;
|
|
178
168
|
failed: z.ZodNumber;
|
|
179
|
-
hung: z.ZodNumber;
|
|
180
169
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
181
170
|
}, z.core.$strict>;
|
|
182
171
|
truncated: z.ZodBoolean;
|
|
@@ -18,7 +18,7 @@ export declare function slackLocationLabel(args: {
|
|
|
18
18
|
channelNameRedacted?: boolean;
|
|
19
19
|
}): string | undefined;
|
|
20
20
|
/** Project one SQL conversation row into the people API conversation summary. */
|
|
21
|
-
export declare function summaryFromRow(row: PeopleConversationRow
|
|
21
|
+
export declare function summaryFromRow(row: PeopleConversationRow): ConversationSummaryReport;
|
|
22
22
|
/** Collapse stored conversation usage into the dashboard token total. */
|
|
23
23
|
export declare function usageTokens(row: PeopleConversationRow): number | undefined;
|
|
24
24
|
/** Build a zeroed totals object for people API aggregations. */
|
|
@@ -31,10 +31,9 @@ export declare function emptyActivityDay(date: string): ActorActivityDayReport;
|
|
|
31
31
|
export declare function signals(summary: ConversationSummaryReport): {
|
|
32
32
|
active: boolean;
|
|
33
33
|
failed: boolean;
|
|
34
|
-
hung: boolean;
|
|
35
34
|
};
|
|
36
35
|
/** Add status counters into a people API aggregate row. */
|
|
37
|
-
export declare function addSignals(target: Pick<ActorTotalsReport, "active" | "failed"
|
|
36
|
+
export declare function addSignals(target: Pick<ActorTotalsReport, "active" | "failed">, value: ReturnType<typeof signals>): void;
|
|
38
37
|
/** Return only actor identities that can be grouped by normalized email. */
|
|
39
38
|
export declare function identityWithEmail(actor: ActorIdentity | undefined): (ActorIdentity & {
|
|
40
39
|
email: string;
|
|
@@ -53,7 +52,6 @@ export declare function activityDays(days: Map<string, ActorActivityDayReport>,
|
|
|
53
52
|
export declare function statsItems(map: Map<string, ConversationStatsItem>): {
|
|
54
53
|
active: number;
|
|
55
54
|
failed: number;
|
|
56
|
-
hung: number;
|
|
57
55
|
conversations: number;
|
|
58
56
|
durationMs: number;
|
|
59
57
|
label: string;
|
package/dist/api/schema.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { conversationDetailReportSchema, conversationFeedSchema, conversationStatsReportSchema, conversationSubagentTranscriptReportSchema, } from "./conversations/schema";
|
|
2
|
-
export type { ActorIdentity, ConversationActivityReport, ConversationActivityStatus, ConversationCost, ConversationDetailReport, ConversationFeed, ConversationReportStatus, ConversationStatsItem, ConversationStatsReport, ConversationSubagentActivityReport, ConversationSubagentTranscriptReport, ConversationSummaryReport, ConversationSurface, ConversationToolActivityReport, ConversationUsage, TranscriptMessage, TranscriptPart, TranscriptPartType, TranscriptRole, } from "./conversations/schema";
|
|
2
|
+
export type { ActorIdentity, ConversationActivityReport, ConversationActivityStatus, ConversationContextEvent, ConversationCost, ConversationDetailReport, ConversationFeed, ConversationReportStatus, ConversationStatsItem, ConversationStatsReport, ConversationSubagentActivityReport, ConversationSubagentTranscriptReport, ConversationSummaryReport, ConversationSurface, ConversationToolActivityReport, ConversationUsage, TranscriptMessage, TranscriptPart, TranscriptPartType, TranscriptRole, } from "./conversations/schema";
|
|
3
3
|
export { actorDirectoryReportSchema, actorProfileReportSchema, } from "./people/schema";
|
|
4
4
|
export type { ActorActivityDayReport, ActorDirectoryReport, ActorProfileReport, ActorSummaryReport, ActorTotalsReport, } from "./people/schema";
|
|
5
5
|
export { healthReportSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginReportSchema, pluginReportsSchema, runtimeInfoReportSchema, skillReportSchema, skillReportsSchema, } from "../reporting-schema";
|
|
@@ -8,6 +8,9 @@ import { z } from "zod";
|
|
|
8
8
|
export declare const conversationParamsSchema: z.ZodObject<{
|
|
9
9
|
conversationId: z.ZodString;
|
|
10
10
|
}, z.core.$strict>;
|
|
11
|
+
export declare const conversationFeedQuerySchema: z.ZodObject<{
|
|
12
|
+
actorEmail: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
13
|
+
}, z.core.$strict>;
|
|
11
14
|
export declare const subagentParamsSchema: z.ZodObject<{
|
|
12
15
|
conversationId: z.ZodString;
|
|
13
16
|
subagentId: z.ZodString;
|
package/dist/api/schema.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
+
conversationFeedQuerySchema,
|
|
2
3
|
conversationParamsSchema,
|
|
3
4
|
personParamsSchema,
|
|
4
5
|
subagentParamsSchema
|
|
5
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-T55RBE4Z.js";
|
|
6
7
|
import {
|
|
7
8
|
actorDirectoryReportSchema,
|
|
8
9
|
actorProfileReportSchema
|
|
9
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-CRQVIHDI.js";
|
|
10
11
|
import {
|
|
11
12
|
conversationDetailReportSchema,
|
|
12
13
|
conversationFeedSchema,
|
|
13
14
|
conversationStatsReportSchema,
|
|
14
15
|
conversationSubagentTranscriptReportSchema
|
|
15
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-EUZ44ROE.js";
|
|
16
17
|
import {
|
|
17
18
|
healthReportSchema,
|
|
18
19
|
pluginOperationalReportFeedSchema,
|
|
@@ -31,6 +32,7 @@ export {
|
|
|
31
32
|
actorDirectoryReportSchema,
|
|
32
33
|
actorProfileReportSchema,
|
|
33
34
|
conversationDetailReportSchema,
|
|
35
|
+
conversationFeedQuerySchema,
|
|
34
36
|
conversationFeedSchema,
|
|
35
37
|
conversationParamsSchema,
|
|
36
38
|
conversationStatsReportSchema,
|
package/dist/api-reference.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { defineJuniorPlugins } from "./plugins";
|
|
|
8
8
|
export type { JuniorPluginInput, JuniorPluginSet, JuniorPluginSetOptions, } from "./plugins";
|
|
9
9
|
export type { PluginRunContext, PluginRunTranscriptEntry, PluginTaskContext, PluginTaskDefinition, PluginTasks, PluginConversationStatus, PluginConversations, PluginConversationSummary, SubscribableResource, } from "@sentry/junior-plugin-api";
|
|
10
10
|
export { definePluginTool, pluginRunContextSchema, pluginRunTranscriptEntrySchema, zodTool, } from "@sentry/junior-plugin-api";
|
|
11
|
-
export { actorDirectoryReportSchema, actorProfileReportSchema, conversationDetailReportSchema, conversationFeedSchema, conversationParamsSchema, conversationStatsReportSchema, conversationSubagentTranscriptReportSchema, healthReportSchema, personParamsSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginReportSchema, pluginReportsSchema, runtimeInfoReportSchema, skillReportSchema, skillReportsSchema, subagentParamsSchema, } from "./api/schema";
|
|
12
|
-
export type { ActorActivityDayReport, ActorDirectoryReport, ActorIdentity, ActorProfileReport, ActorSummaryReport, ActorTotalsReport, ConversationActivityReport, ConversationActivityStatus, ConversationCost, ConversationDetailReport, ConversationFeed, ConversationParams, ConversationReportStatus, ConversationStatsItem, ConversationStatsReport, ConversationSubagentActivityReport, ConversationSubagentTranscriptReport, ConversationSummaryReport, ConversationSurface, ConversationToolActivityReport, ConversationUsage, HealthReport, PersonParams, PluginOperationalReport, PluginOperationalReportFeed, PluginPackageContentItemReport, PluginPackageContentReport, PluginReport, PluginReports, RuntimeInfoReport, SkillReport, SkillReports, SubagentParams, TranscriptMessage, TranscriptPart, TranscriptPartType, TranscriptRole, } from "./api/schema";
|
|
11
|
+
export { actorDirectoryReportSchema, actorProfileReportSchema, conversationDetailReportSchema, conversationFeedSchema, conversationFeedQuerySchema, conversationParamsSchema, conversationStatsReportSchema, conversationSubagentTranscriptReportSchema, healthReportSchema, personParamsSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginReportSchema, pluginReportsSchema, runtimeInfoReportSchema, skillReportSchema, skillReportsSchema, subagentParamsSchema, } from "./api/schema";
|
|
12
|
+
export type { ActorActivityDayReport, ActorDirectoryReport, ActorIdentity, ActorProfileReport, ActorSummaryReport, ActorTotalsReport, ConversationActivityReport, ConversationActivityStatus, ConversationContextEvent, ConversationCost, ConversationDetailReport, ConversationFeed, ConversationParams, ConversationReportStatus, ConversationStatsItem, ConversationStatsReport, ConversationSubagentActivityReport, ConversationSubagentTranscriptReport, ConversationSummaryReport, ConversationSurface, ConversationToolActivityReport, ConversationUsage, HealthReport, PersonParams, PluginOperationalReport, PluginOperationalReportFeed, PluginPackageContentItemReport, PluginPackageContentReport, PluginReport, PluginReports, RuntimeInfoReport, SkillReport, SkillReports, SubagentParams, TranscriptMessage, TranscriptPart, TranscriptPartType, TranscriptRole, } from "./api/schema";
|
|
13
13
|
export { juniorVercelConfig } from "./vercel";
|
|
14
14
|
export type { JuniorVercelConfigOptions } from "./vercel";
|
package/dist/api.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
+
conversationFeedQuerySchema,
|
|
2
3
|
conversationParamsSchema,
|
|
3
4
|
personParamsSchema,
|
|
4
5
|
subagentParamsSchema
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-T55RBE4Z.js";
|
|
7
|
+
import "./chunk-CRQVIHDI.js";
|
|
8
|
+
import "./chunk-EUZ44ROE.js";
|
|
8
9
|
import {
|
|
9
10
|
readHealthReport
|
|
10
11
|
} from "./chunk-QNVHH5PU.js";
|
|
@@ -69,11 +70,11 @@ async function readRuntimeInfoReport() {
|
|
|
69
70
|
}
|
|
70
71
|
async function readPluginOperationalReportFeed() {
|
|
71
72
|
const listRecent = async (listOptions) => {
|
|
72
|
-
const { listRecentConversationSummaries } = await import("./plugin-conversations-
|
|
73
|
+
const { listRecentConversationSummaries } = await import("./plugin-conversations-PDCQWU3O.js");
|
|
73
74
|
return listRecentConversationSummaries(listOptions?.limit);
|
|
74
75
|
};
|
|
75
76
|
const nowMs = Date.now();
|
|
76
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
77
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-OSW6C3CJ.js");
|
|
77
78
|
return pluginOperationalReportFeedSchema.parse({
|
|
78
79
|
source: "plugins",
|
|
79
80
|
generatedAt: new Date(nowMs).toISOString(),
|
|
@@ -94,6 +95,16 @@ function parseParams(schema, params) {
|
|
|
94
95
|
message: "Invalid route parameters."
|
|
95
96
|
});
|
|
96
97
|
}
|
|
98
|
+
function parseQuery(schema, query) {
|
|
99
|
+
const result = schema.safeParse(query);
|
|
100
|
+
if (result.success) {
|
|
101
|
+
return result.data;
|
|
102
|
+
}
|
|
103
|
+
throw new HTTPException(400, {
|
|
104
|
+
cause: result.error,
|
|
105
|
+
message: "Invalid query parameters."
|
|
106
|
+
});
|
|
107
|
+
}
|
|
97
108
|
function createJuniorApi() {
|
|
98
109
|
const app = new Hono();
|
|
99
110
|
app.get("/api/health", async () => {
|
|
@@ -111,16 +122,20 @@ function createJuniorApi() {
|
|
|
111
122
|
app.get("/api/plugin-reports", async () => {
|
|
112
123
|
return Response.json(await readPluginOperationalReportFeed());
|
|
113
124
|
});
|
|
114
|
-
app.get("/api/conversations", async () => {
|
|
115
|
-
const { readConversationFeed } = await import("./list-
|
|
116
|
-
|
|
125
|
+
app.get("/api/conversations", async (c) => {
|
|
126
|
+
const { readConversationFeed } = await import("./list-A3F5JDYV.js");
|
|
127
|
+
const { actorEmail } = parseQuery(
|
|
128
|
+
conversationFeedQuerySchema,
|
|
129
|
+
c.req.query()
|
|
130
|
+
);
|
|
131
|
+
return Response.json(await readConversationFeed({ actorEmail }));
|
|
117
132
|
});
|
|
118
133
|
app.get("/api/conversations/stats", async () => {
|
|
119
|
-
const { readConversationStats } = await import("./stats-
|
|
134
|
+
const { readConversationStats } = await import("./stats-L62E4O4U.js");
|
|
120
135
|
return Response.json(await readConversationStats());
|
|
121
136
|
});
|
|
122
137
|
app.get("/api/conversations/:conversationId", async (c) => {
|
|
123
|
-
const { readConversationDetail } = await import("./detail-
|
|
138
|
+
const { readConversationDetail } = await import("./detail-Q4IVDNGS.js");
|
|
124
139
|
const { conversationId } = parseParams(
|
|
125
140
|
conversationParamsSchema,
|
|
126
141
|
c.req.param()
|
|
@@ -131,7 +146,7 @@ function createJuniorApi() {
|
|
|
131
146
|
app.get(
|
|
132
147
|
"/api/conversations/:conversationId/subagents/:subagentId",
|
|
133
148
|
async (c) => {
|
|
134
|
-
const { readConversationSubagent } = await import("./subagent-
|
|
149
|
+
const { readConversationSubagent } = await import("./subagent-UN3MP6LV.js");
|
|
135
150
|
const { conversationId, subagentId } = parseParams(
|
|
136
151
|
subagentParamsSchema,
|
|
137
152
|
c.req.param()
|
|
@@ -141,12 +156,12 @@ function createJuniorApi() {
|
|
|
141
156
|
}
|
|
142
157
|
);
|
|
143
158
|
app.get("/api/people", async () => {
|
|
144
|
-
const { readPeopleList } = await import("./list-
|
|
159
|
+
const { readPeopleList } = await import("./list-M5BRWW3D.js");
|
|
145
160
|
return Response.json(await readPeopleList());
|
|
146
161
|
});
|
|
147
162
|
app.get("/api/people/:email", async (c) => {
|
|
148
163
|
const { email } = parseParams(personParamsSchema, c.req.param());
|
|
149
|
-
const { readPeopleProfile } = await import("./profile-
|
|
164
|
+
const { readPeopleProfile } = await import("./profile-UEIRSVT3.js");
|
|
150
165
|
return Response.json(await readPeopleProfile(email));
|
|
151
166
|
});
|
|
152
167
|
return app;
|