@sentry/junior 0.99.0 → 0.100.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-OSW6C3CJ.js → agent-hooks-V6KU7PQN.js} +6 -5
- package/dist/api/activity.d.ts +14 -0
- package/dist/api/conversations/aggregate.d.ts +16 -0
- package/dist/api/conversations/detail-projection.d.ts +1 -0
- package/dist/api/conversations/list.query.d.ts +3 -0
- package/dist/api/conversations/projection.d.ts +1 -0
- package/dist/api/conversations/reporting.d.ts +42 -0
- package/dist/api/conversations/schema.d.ts +7 -7
- package/dist/api/conversations/stats.query.d.ts +1 -1
- package/dist/api/locations/detail.d.ts +81 -0
- package/dist/api/locations/list.d.ts +30 -0
- package/dist/api/locations/query.d.ts +5 -0
- package/dist/api/locations/schema.d.ts +175 -0
- package/dist/api/people/list.query.d.ts +1 -1
- package/dist/api/people/profile.query.d.ts +1 -1
- package/dist/api/people/schema.d.ts +10 -14
- package/dist/api/people/shared.d.ts +38 -78
- package/dist/api/schema.d.ts +8 -0
- package/dist/api/schema.js +14 -3
- package/dist/api.js +24 -11
- package/dist/app.js +25 -19
- package/dist/chat/agent/request.d.ts +3 -0
- package/dist/chat/config.d.ts +2 -0
- package/dist/chat/reasoning-level.d.ts +4 -0
- package/dist/chat/services/{turn-thinking-level.d.ts → turn-reasoning-level.d.ts} +11 -10
- package/dist/chat/services/turn-result.d.ts +3 -3
- package/dist/chat/tools/search-tools.d.ts +2 -2
- package/dist/{chunk-T55RBE4Z.js → chunk-2RNOB32R.js} +3 -1
- package/dist/{chunk-NJEDJFK4.js → chunk-2T7DCRAW.js} +1 -1
- package/dist/{chunk-PYK7R5A7.js → chunk-45DMFMY2.js} +66 -65
- package/dist/chunk-4AQUWWEM.js +75 -0
- package/dist/{chunk-EEZCY5WX.js → chunk-A7X2FDUO.js} +18 -2
- package/dist/{chunk-WTYEKPXU.js → chunk-FP5N5OWZ.js} +1 -1
- package/dist/chunk-FXFQNHRU.js +48 -0
- package/dist/chunk-GEUUJRQF.js +102 -0
- package/dist/{chunk-CRQVIHDI.js → chunk-IDZBM3NW.js} +2 -8
- package/dist/{chunk-DHHU2WSG.js → chunk-IQIBZXGB.js} +2 -2
- package/dist/{chunk-OL6XQ23W.js → chunk-IVXL57YF.js} +3 -3
- package/dist/{chunk-IO65E4ZD.js → chunk-JPQISMMJ.js} +3 -3
- package/dist/{chunk-KFUSLFLL.js → chunk-JSAANELJ.js} +11 -4
- package/dist/{chunk-EUZ44ROE.js → chunk-MM5UFDAC.js} +1 -3
- package/dist/{chunk-WJ7STXT6.js → chunk-NSOCZGOH.js} +3 -3
- package/dist/chunk-PGGEOCQY.js +77 -0
- package/dist/{chunk-EOWXRY5E.js → chunk-PWC24W5F.js} +1 -1
- package/dist/chunk-QOZOJNSE.js +96 -0
- package/dist/chunk-QSBQJ3PA.js +275 -0
- package/dist/{chunk-FTTFV6DC.js → chunk-TPTJEHUE.js} +4 -4
- package/dist/{chunk-OGHXZ4KQ.js → chunk-VHRM6GNH.js} +88 -122
- package/dist/{chunk-NG2AV7IB.js → chunk-VVIXK2BX.js} +1 -1
- package/dist/{chunk-ZZUBLPXD.js → chunk-VY7BT4SM.js} +5 -4
- package/dist/{chunk-H66UCBPW.js → chunk-XJA7BPHS.js} +1 -1
- package/dist/{chunk-ER45IV77.js → chunk-XSBIISXS.js} +9 -9
- package/dist/cli/chat.js +15 -14
- package/dist/cli/plugins.js +6 -5
- package/dist/cli/snapshot-warmup.js +2 -2
- package/dist/cli/upgrade.js +8 -7
- package/dist/db/schema/conversations.d.ts +17 -0
- package/dist/db/schema/destinations.d.ts +12 -3
- package/dist/db/schema.d.ts +19 -2
- package/dist/{db-GFSCDAHS.js → db-RCZB7KNM.js} +3 -2
- package/dist/detail-5SLCGT6J.js +29 -0
- package/dist/{detail-Q4IVDNGS.js → detail-LU6COZO6.js} +11 -10
- package/dist/{legacy-import-6WWXMALY.js → legacy-import-VCYLWT2V.js} +4 -3
- package/dist/list-2FI5SFV7.js +80 -0
- package/dist/list-4ALSU6ZW.js +30 -0
- package/dist/{list-A3F5JDYV.js → list-KHRAWZWU.js} +7 -6
- package/dist/{plugin-conversations-PDCQWU3O.js → plugin-conversations-JANXC4GA.js} +6 -5
- package/dist/profile-3O3OVENT.js +212 -0
- package/dist/{runner-267ZRLZD.js → runner-BM7D35YW.js} +12 -11
- package/dist/stats-J3YGCYDF.js +174 -0
- package/dist/{subagent-UN3MP6LV.js → subagent-P7HOSMVC.js} +10 -9
- package/migrations/0003_peaceful_scalphunter.sql +4 -0
- package/migrations/meta/0003_snapshot.json +1035 -0
- package/migrations/meta/_journal.json +8 -1
- package/package.json +5 -5
- package/dist/chunk-CV22LUIV.js +0 -261
- package/dist/list-M5BRWW3D.js +0 -92
- package/dist/profile-UEIRSVT3.js +0 -146
- package/dist/stats-L62E4O4U.js +0 -207
|
@@ -11,13 +11,14 @@ import {
|
|
|
11
11
|
getPlugins,
|
|
12
12
|
setPlugins,
|
|
13
13
|
validatePlugins
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-TPTJEHUE.js";
|
|
15
|
+
import "./chunk-FP5N5OWZ.js";
|
|
16
|
+
import "./chunk-PWC24W5F.js";
|
|
17
|
+
import "./chunk-VHRM6GNH.js";
|
|
18
18
|
import "./chunk-G3E7SCME.js";
|
|
19
19
|
import "./chunk-4ZNGQH7C.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-A7X2FDUO.js";
|
|
21
|
+
import "./chunk-FXFQNHRU.js";
|
|
21
22
|
import "./chunk-LVA4I4H7.js";
|
|
22
23
|
import "./chunk-B7PUBQQM.js";
|
|
23
24
|
import "./chunk-I35CTGPO.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const dailyConversationActivitySchema: z.ZodObject<{
|
|
3
|
+
active: z.ZodNumber;
|
|
4
|
+
conversations: z.ZodNumber;
|
|
5
|
+
date: z.ZodString;
|
|
6
|
+
durationMs: z.ZodNumber;
|
|
7
|
+
failed: z.ZodNumber;
|
|
8
|
+
tokens: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
}, z.core.$strict>;
|
|
10
|
+
export type DailyConversationActivity = z.infer<typeof dailyConversationActivitySchema>;
|
|
11
|
+
/** Build a zeroed day for conversation activity projections. */
|
|
12
|
+
export declare function emptyActivityDay(date: string): DailyConversationActivity;
|
|
13
|
+
/** Fill a fixed UTC date window from sparse conversation activity. */
|
|
14
|
+
export declare function activityDays(days: Map<string, DailyConversationActivity>, nowMs: number, count: number): DailyConversationActivity[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Select complete conversation metrics inside the database instead of materializing source rows. */
|
|
2
|
+
export declare function conversationAggregateColumns(): {
|
|
3
|
+
active: import("drizzle-orm").SQL<number>;
|
|
4
|
+
conversations: import("drizzle-orm").SQL<number>;
|
|
5
|
+
costUsd: import("drizzle-orm").SQL<number | null>;
|
|
6
|
+
durationMs: import("drizzle-orm").SQL<number>;
|
|
7
|
+
failed: import("drizzle-orm").SQL<number>;
|
|
8
|
+
tokens: import("drizzle-orm").SQL<number | null>;
|
|
9
|
+
};
|
|
10
|
+
/** Select the complete first/last activity range for a grouped conversation aggregate. */
|
|
11
|
+
export declare function conversationRangeColumns(): {
|
|
12
|
+
firstSeenAt: import("drizzle-orm").SQL<Date>;
|
|
13
|
+
lastSeenAt: import("drizzle-orm").SQL<Date>;
|
|
14
|
+
};
|
|
15
|
+
/** Count distinct UTC activity dates without loading conversation timestamps into the app. */
|
|
16
|
+
export declare function conversationActiveDaysColumn(): import("drizzle-orm").SQL<number>;
|
|
@@ -4,6 +4,7 @@ import type { ConversationDetailReport, ConversationSubagentTranscriptReport } f
|
|
|
4
4
|
export declare function buildConversationDetail(args: {
|
|
5
5
|
conversation: Conversation;
|
|
6
6
|
durationMs: number;
|
|
7
|
+
locationId?: string;
|
|
7
8
|
usage: ConversationDetailReport["cumulativeUsage"];
|
|
8
9
|
}): Promise<ConversationDetailReport>;
|
|
9
10
|
/** Build one child-agent REST detail from durable SQL history. */
|
|
@@ -73,7 +73,9 @@ declare function conversationRows(db: JuniorDatabase, limit: number, actorEmail?
|
|
|
73
73
|
total?: number | undefined;
|
|
74
74
|
} | undefined;
|
|
75
75
|
} | null;
|
|
76
|
+
metricRunId: string | null;
|
|
76
77
|
};
|
|
78
|
+
destinationId: string | null;
|
|
77
79
|
destinationVisibility: import("../../db/schema/destinations").JuniorDestinationVisibility | null;
|
|
78
80
|
identityDisplayName: string | null;
|
|
79
81
|
identityEmail: string | null;
|
|
@@ -87,6 +89,7 @@ type ConversationRow = Awaited<ReturnType<typeof conversationRows>>[number];
|
|
|
87
89
|
export declare function readConversationRecordFromSql(conversationId: string): Promise<{
|
|
88
90
|
conversation: Conversation;
|
|
89
91
|
durationMs: number;
|
|
92
|
+
locationId?: string;
|
|
90
93
|
usage: ConversationRow["conversation"]["usage"];
|
|
91
94
|
} | undefined>;
|
|
92
95
|
/**
|
|
@@ -9,5 +9,6 @@ export declare function titleFromConversation(args: {
|
|
|
9
9
|
export declare function conversationSummaryFromStoredConversation(args: {
|
|
10
10
|
conversation: StoredConversation;
|
|
11
11
|
durationMs: number;
|
|
12
|
+
locationId?: string;
|
|
12
13
|
usage?: ConversationUsage;
|
|
13
14
|
}): ConversationSummaryReport;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { juniorConversations, juniorDestinations } from "@/db/schema";
|
|
2
|
+
import type { ConversationSummaryReport, ConversationSurface } from "./schema";
|
|
3
|
+
export type ReportingConversationRow = {
|
|
4
|
+
channelName: string | null;
|
|
5
|
+
conversationId: string;
|
|
6
|
+
createdAt: Date;
|
|
7
|
+
destinationId: string | null;
|
|
8
|
+
destinationVisibility: (typeof juniorDestinations.$inferSelect)["visibility"] | null;
|
|
9
|
+
durationMs: number;
|
|
10
|
+
email: string | null;
|
|
11
|
+
executionStatus: (typeof juniorConversations.$inferSelect)["executionStatus"];
|
|
12
|
+
executionUpdatedAt: Date | null;
|
|
13
|
+
fullName: string | null;
|
|
14
|
+
handle: string | null;
|
|
15
|
+
lastActivityAt: Date;
|
|
16
|
+
providerSubjectId: string | null;
|
|
17
|
+
source: (typeof juniorConversations.$inferSelect)["source"];
|
|
18
|
+
title: string | null;
|
|
19
|
+
updatedAt: Date;
|
|
20
|
+
usage: (typeof juniorConversations.$inferSelect)["usage"];
|
|
21
|
+
};
|
|
22
|
+
/** Parse report timestamps without throwing on malformed legacy values. */
|
|
23
|
+
export declare function reportTime(value: string): number | undefined;
|
|
24
|
+
/** Convert a report timestamp into the UTC day used by activity projections. */
|
|
25
|
+
export declare function reportDate(value: string): string | undefined;
|
|
26
|
+
/** Return the dashboard label for a conversation surface. */
|
|
27
|
+
export declare function surfaceLabel(surface: ConversationSurface): string;
|
|
28
|
+
/** Return the dashboard-safe Slack location label for a conversation. */
|
|
29
|
+
export declare function slackLocationLabel(args: {
|
|
30
|
+
channel?: string;
|
|
31
|
+
channelName?: string;
|
|
32
|
+
channelNameRedacted?: boolean;
|
|
33
|
+
}): string | undefined;
|
|
34
|
+
/** Project one SQL conversation row into a privacy-safe API summary. */
|
|
35
|
+
export declare function summaryFromRow(row: ReportingConversationRow): ConversationSummaryReport;
|
|
36
|
+
/** Collapse persisted conversation usage into the dashboard token total. */
|
|
37
|
+
export declare function usageTokens(row: Pick<ReportingConversationRow, "usage">): number | undefined;
|
|
38
|
+
/** Collapse a conversation summary status into aggregate counters. */
|
|
39
|
+
export declare function conversationSignals(summary: ConversationSummaryReport): {
|
|
40
|
+
active: boolean;
|
|
41
|
+
failed: boolean;
|
|
42
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const conversationReportStatusSchema: z.ZodEnum<{
|
|
3
3
|
active: "active";
|
|
4
|
-
completed: "completed";
|
|
5
4
|
failed: "failed";
|
|
5
|
+
completed: "completed";
|
|
6
6
|
}>;
|
|
7
7
|
export declare const conversationSurfaceSchema: z.ZodEnum<{
|
|
8
8
|
api: "api";
|
|
@@ -59,8 +59,8 @@ export declare const conversationSummaryReportSchema: z.ZodObject<{
|
|
|
59
59
|
conversationId: z.ZodString;
|
|
60
60
|
status: z.ZodEnum<{
|
|
61
61
|
active: "active";
|
|
62
|
-
completed: "completed";
|
|
63
62
|
failed: "failed";
|
|
63
|
+
completed: "completed";
|
|
64
64
|
}>;
|
|
65
65
|
startedAt: z.ZodString;
|
|
66
66
|
lastSeenAt: z.ZodString;
|
|
@@ -80,6 +80,7 @@ export declare const conversationSummaryReportSchema: z.ZodObject<{
|
|
|
80
80
|
channel: z.ZodOptional<z.ZodString>;
|
|
81
81
|
channelName: z.ZodOptional<z.ZodString>;
|
|
82
82
|
channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
+
locationId: z.ZodOptional<z.ZodString>;
|
|
83
84
|
sentryTraceUrl: z.ZodOptional<z.ZodString>;
|
|
84
85
|
traceId: z.ZodOptional<z.ZodString>;
|
|
85
86
|
}, z.core.$strict>;
|
|
@@ -334,8 +335,8 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
334
335
|
conversationId: z.ZodString;
|
|
335
336
|
status: z.ZodEnum<{
|
|
336
337
|
active: "active";
|
|
337
|
-
completed: "completed";
|
|
338
338
|
failed: "failed";
|
|
339
|
+
completed: "completed";
|
|
339
340
|
}>;
|
|
340
341
|
startedAt: z.ZodString;
|
|
341
342
|
lastSeenAt: z.ZodString;
|
|
@@ -355,6 +356,7 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
355
356
|
channel: z.ZodOptional<z.ZodString>;
|
|
356
357
|
channelName: z.ZodOptional<z.ZodString>;
|
|
357
358
|
channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
|
|
359
|
+
locationId: z.ZodOptional<z.ZodString>;
|
|
358
360
|
sentryTraceUrl: z.ZodOptional<z.ZodString>;
|
|
359
361
|
traceId: z.ZodOptional<z.ZodString>;
|
|
360
362
|
activity: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -615,8 +617,8 @@ export declare const conversationFeedSchema: z.ZodObject<{
|
|
|
615
617
|
conversationId: z.ZodString;
|
|
616
618
|
status: z.ZodEnum<{
|
|
617
619
|
active: "active";
|
|
618
|
-
completed: "completed";
|
|
619
620
|
failed: "failed";
|
|
621
|
+
completed: "completed";
|
|
620
622
|
}>;
|
|
621
623
|
startedAt: z.ZodString;
|
|
622
624
|
lastSeenAt: z.ZodString;
|
|
@@ -636,6 +638,7 @@ export declare const conversationFeedSchema: z.ZodObject<{
|
|
|
636
638
|
channel: z.ZodOptional<z.ZodString>;
|
|
637
639
|
channelName: z.ZodOptional<z.ZodString>;
|
|
638
640
|
channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
|
|
641
|
+
locationId: z.ZodOptional<z.ZodString>;
|
|
639
642
|
sentryTraceUrl: z.ZodOptional<z.ZodString>;
|
|
640
643
|
traceId: z.ZodOptional<z.ZodString>;
|
|
641
644
|
}, z.core.$strict>>;
|
|
@@ -675,12 +678,9 @@ export declare const conversationStatsReportSchema: z.ZodObject<{
|
|
|
675
678
|
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
676
679
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
677
680
|
}, z.core.$strict>>;
|
|
678
|
-
sampleLimit: z.ZodNumber;
|
|
679
|
-
sampleSize: z.ZodNumber;
|
|
680
681
|
source: z.ZodLiteral<"conversation_index">;
|
|
681
682
|
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
682
683
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
683
|
-
truncated: z.ZodBoolean;
|
|
684
684
|
windowEnd: z.ZodString;
|
|
685
685
|
windowStart: z.ZodString;
|
|
686
686
|
}, z.core.$strict>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ConversationStatsReport } from "./schema";
|
|
2
|
-
/** Build
|
|
2
|
+
/** Build complete seven-day dashboard stats from normalized durable SQL records. */
|
|
3
3
|
export declare function readConversationStatsFromSql(): Promise<ConversationStatsReport>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/** Expose operational detail for one persisted public conversation location. */
|
|
2
|
+
export declare function readLocationDetail(locationId: string): Promise<{
|
|
3
|
+
active: number;
|
|
4
|
+
conversations: number;
|
|
5
|
+
durationMs: number;
|
|
6
|
+
failed: number;
|
|
7
|
+
label: string;
|
|
8
|
+
id: string;
|
|
9
|
+
firstSeenAt: string;
|
|
10
|
+
kind: "channel" | "dm" | "group" | "local_conversation" | "thread" | "web_session";
|
|
11
|
+
lastSeenAt: string;
|
|
12
|
+
provider: string;
|
|
13
|
+
providerDestinationId: string;
|
|
14
|
+
visibility: "public";
|
|
15
|
+
activityDays: {
|
|
16
|
+
active: number;
|
|
17
|
+
conversations: number;
|
|
18
|
+
date: string;
|
|
19
|
+
durationMs: number;
|
|
20
|
+
failed: number;
|
|
21
|
+
tokens?: number | undefined;
|
|
22
|
+
}[];
|
|
23
|
+
actors: {
|
|
24
|
+
active: number;
|
|
25
|
+
conversations: number;
|
|
26
|
+
durationMs: number;
|
|
27
|
+
failed: number;
|
|
28
|
+
label: string;
|
|
29
|
+
actor: {
|
|
30
|
+
email?: string | undefined;
|
|
31
|
+
fullName?: string | undefined;
|
|
32
|
+
slackUserId?: string | undefined;
|
|
33
|
+
slackUserName?: string | undefined;
|
|
34
|
+
};
|
|
35
|
+
costUsd?: number | undefined;
|
|
36
|
+
tokens?: number | undefined;
|
|
37
|
+
}[];
|
|
38
|
+
generatedAt: string;
|
|
39
|
+
recentConversations: {
|
|
40
|
+
displayTitle: string;
|
|
41
|
+
cumulativeDurationMs: number;
|
|
42
|
+
conversationId: string;
|
|
43
|
+
status: "active" | "failed" | "completed";
|
|
44
|
+
startedAt: string;
|
|
45
|
+
lastSeenAt: string;
|
|
46
|
+
lastProgressAt: string;
|
|
47
|
+
surface: "api" | "internal" | "scheduler" | "slack";
|
|
48
|
+
cumulativeUsage?: {
|
|
49
|
+
inputTokens?: number | undefined;
|
|
50
|
+
outputTokens?: number | undefined;
|
|
51
|
+
cachedInputTokens?: number | undefined;
|
|
52
|
+
cacheCreationTokens?: number | undefined;
|
|
53
|
+
reasoningTokens?: number | undefined;
|
|
54
|
+
totalTokens?: number | undefined;
|
|
55
|
+
cost?: {
|
|
56
|
+
input?: number | undefined;
|
|
57
|
+
output?: number | undefined;
|
|
58
|
+
cacheRead?: number | undefined;
|
|
59
|
+
cacheWrite?: number | undefined;
|
|
60
|
+
total?: number | undefined;
|
|
61
|
+
} | undefined;
|
|
62
|
+
} | undefined;
|
|
63
|
+
actorIdentity?: {
|
|
64
|
+
email?: string | undefined;
|
|
65
|
+
fullName?: string | undefined;
|
|
66
|
+
slackUserId?: string | undefined;
|
|
67
|
+
slackUserName?: string | undefined;
|
|
68
|
+
} | undefined;
|
|
69
|
+
channel?: string | undefined;
|
|
70
|
+
channelName?: string | undefined;
|
|
71
|
+
channelNameRedacted?: boolean | undefined;
|
|
72
|
+
locationId?: string | undefined;
|
|
73
|
+
sentryTraceUrl?: string | undefined;
|
|
74
|
+
traceId?: string | undefined;
|
|
75
|
+
}[];
|
|
76
|
+
source: "conversation_index";
|
|
77
|
+
windowEnd: string;
|
|
78
|
+
windowStart: string;
|
|
79
|
+
costUsd?: number | undefined;
|
|
80
|
+
tokens?: number | undefined;
|
|
81
|
+
} | undefined>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Expose public conversation destinations as the dashboard's location index. */
|
|
2
|
+
export declare function readLocationDirectory(): Promise<{
|
|
3
|
+
generatedAt: string;
|
|
4
|
+
locations: {
|
|
5
|
+
active: number;
|
|
6
|
+
conversations: number;
|
|
7
|
+
durationMs: number;
|
|
8
|
+
failed: number;
|
|
9
|
+
label: string;
|
|
10
|
+
id: string;
|
|
11
|
+
firstSeenAt: string;
|
|
12
|
+
kind: "channel" | "dm" | "group" | "local_conversation" | "thread" | "web_session";
|
|
13
|
+
lastSeenAt: string;
|
|
14
|
+
provider: string;
|
|
15
|
+
providerDestinationId: string;
|
|
16
|
+
visibility: "public";
|
|
17
|
+
costUsd?: number | undefined;
|
|
18
|
+
tokens?: number | undefined;
|
|
19
|
+
}[];
|
|
20
|
+
privateActivity: {
|
|
21
|
+
active: number;
|
|
22
|
+
conversations: number;
|
|
23
|
+
durationMs: number;
|
|
24
|
+
failed: number;
|
|
25
|
+
label: string;
|
|
26
|
+
costUsd?: number | undefined;
|
|
27
|
+
tokens?: number | undefined;
|
|
28
|
+
};
|
|
29
|
+
source: "conversation_index";
|
|
30
|
+
}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { LocationDetailReport, LocationDirectoryReport } from "./schema";
|
|
2
|
+
/** Load public locations plus one complete privacy-safe aggregate for non-public activity. */
|
|
3
|
+
export declare function readLocationDirectoryFromSql(): Promise<LocationDirectoryReport>;
|
|
4
|
+
/** Load one public location's complete activity while bounding only recent conversations. */
|
|
5
|
+
export declare function readLocationDetailFromSql(locationId: string): Promise<LocationDetailReport | undefined>;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const locationSummaryReportSchema: z.ZodObject<{
|
|
3
|
+
active: z.ZodNumber;
|
|
4
|
+
conversations: z.ZodNumber;
|
|
5
|
+
durationMs: z.ZodNumber;
|
|
6
|
+
failed: z.ZodNumber;
|
|
7
|
+
label: z.ZodString;
|
|
8
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
tokens: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
firstSeenAt: z.ZodString;
|
|
12
|
+
kind: z.ZodEnum<{
|
|
13
|
+
channel: "channel";
|
|
14
|
+
dm: "dm";
|
|
15
|
+
group: "group";
|
|
16
|
+
local_conversation: "local_conversation";
|
|
17
|
+
thread: "thread";
|
|
18
|
+
web_session: "web_session";
|
|
19
|
+
}>;
|
|
20
|
+
lastSeenAt: z.ZodString;
|
|
21
|
+
provider: z.ZodString;
|
|
22
|
+
providerDestinationId: z.ZodString;
|
|
23
|
+
visibility: z.ZodLiteral<"public">;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export declare const locationActorSummaryReportSchema: z.ZodObject<{
|
|
26
|
+
active: z.ZodNumber;
|
|
27
|
+
conversations: z.ZodNumber;
|
|
28
|
+
durationMs: z.ZodNumber;
|
|
29
|
+
failed: z.ZodNumber;
|
|
30
|
+
label: z.ZodString;
|
|
31
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
tokens: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
actor: z.ZodObject<{
|
|
34
|
+
email: z.ZodOptional<z.ZodString>;
|
|
35
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
36
|
+
slackUserId: z.ZodOptional<z.ZodString>;
|
|
37
|
+
slackUserName: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strict>;
|
|
39
|
+
}, z.core.$strict>;
|
|
40
|
+
export declare const locationDirectoryReportSchema: z.ZodObject<{
|
|
41
|
+
generatedAt: z.ZodString;
|
|
42
|
+
locations: z.ZodArray<z.ZodObject<{
|
|
43
|
+
active: z.ZodNumber;
|
|
44
|
+
conversations: z.ZodNumber;
|
|
45
|
+
durationMs: z.ZodNumber;
|
|
46
|
+
failed: z.ZodNumber;
|
|
47
|
+
label: z.ZodString;
|
|
48
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
tokens: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
firstSeenAt: z.ZodString;
|
|
52
|
+
kind: z.ZodEnum<{
|
|
53
|
+
channel: "channel";
|
|
54
|
+
dm: "dm";
|
|
55
|
+
group: "group";
|
|
56
|
+
local_conversation: "local_conversation";
|
|
57
|
+
thread: "thread";
|
|
58
|
+
web_session: "web_session";
|
|
59
|
+
}>;
|
|
60
|
+
lastSeenAt: z.ZodString;
|
|
61
|
+
provider: z.ZodString;
|
|
62
|
+
providerDestinationId: z.ZodString;
|
|
63
|
+
visibility: z.ZodLiteral<"public">;
|
|
64
|
+
}, z.core.$strict>>;
|
|
65
|
+
privateActivity: z.ZodObject<{
|
|
66
|
+
active: z.ZodNumber;
|
|
67
|
+
conversations: z.ZodNumber;
|
|
68
|
+
durationMs: z.ZodNumber;
|
|
69
|
+
failed: z.ZodNumber;
|
|
70
|
+
label: z.ZodString;
|
|
71
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
tokens: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
}, z.core.$strict>;
|
|
74
|
+
source: z.ZodLiteral<"conversation_index">;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
export declare const locationDetailReportSchema: z.ZodObject<{
|
|
77
|
+
active: z.ZodNumber;
|
|
78
|
+
conversations: z.ZodNumber;
|
|
79
|
+
durationMs: z.ZodNumber;
|
|
80
|
+
failed: z.ZodNumber;
|
|
81
|
+
label: z.ZodString;
|
|
82
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
tokens: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
id: z.ZodString;
|
|
85
|
+
firstSeenAt: z.ZodString;
|
|
86
|
+
kind: z.ZodEnum<{
|
|
87
|
+
channel: "channel";
|
|
88
|
+
dm: "dm";
|
|
89
|
+
group: "group";
|
|
90
|
+
local_conversation: "local_conversation";
|
|
91
|
+
thread: "thread";
|
|
92
|
+
web_session: "web_session";
|
|
93
|
+
}>;
|
|
94
|
+
lastSeenAt: z.ZodString;
|
|
95
|
+
provider: z.ZodString;
|
|
96
|
+
providerDestinationId: z.ZodString;
|
|
97
|
+
visibility: z.ZodLiteral<"public">;
|
|
98
|
+
activityDays: z.ZodArray<z.ZodObject<{
|
|
99
|
+
active: z.ZodNumber;
|
|
100
|
+
conversations: z.ZodNumber;
|
|
101
|
+
date: z.ZodString;
|
|
102
|
+
durationMs: z.ZodNumber;
|
|
103
|
+
failed: z.ZodNumber;
|
|
104
|
+
tokens: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
}, z.core.$strict>>;
|
|
106
|
+
actors: z.ZodArray<z.ZodObject<{
|
|
107
|
+
active: z.ZodNumber;
|
|
108
|
+
conversations: z.ZodNumber;
|
|
109
|
+
durationMs: z.ZodNumber;
|
|
110
|
+
failed: z.ZodNumber;
|
|
111
|
+
label: z.ZodString;
|
|
112
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
tokens: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
actor: z.ZodObject<{
|
|
115
|
+
email: z.ZodOptional<z.ZodString>;
|
|
116
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
117
|
+
slackUserId: z.ZodOptional<z.ZodString>;
|
|
118
|
+
slackUserName: z.ZodOptional<z.ZodString>;
|
|
119
|
+
}, z.core.$strict>;
|
|
120
|
+
}, z.core.$strict>>;
|
|
121
|
+
generatedAt: z.ZodString;
|
|
122
|
+
recentConversations: z.ZodArray<z.ZodObject<{
|
|
123
|
+
displayTitle: z.ZodString;
|
|
124
|
+
cumulativeDurationMs: z.ZodNumber;
|
|
125
|
+
cumulativeUsage: z.ZodOptional<z.ZodObject<{
|
|
126
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
127
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
cachedInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
cacheCreationTokens: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
133
|
+
input: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
output: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
cacheRead: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
cacheWrite: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
}, z.core.$strict>>;
|
|
139
|
+
}, z.core.$strict>>;
|
|
140
|
+
conversationId: z.ZodString;
|
|
141
|
+
status: z.ZodEnum<{
|
|
142
|
+
active: "active";
|
|
143
|
+
failed: "failed";
|
|
144
|
+
completed: "completed";
|
|
145
|
+
}>;
|
|
146
|
+
startedAt: z.ZodString;
|
|
147
|
+
lastSeenAt: z.ZodString;
|
|
148
|
+
lastProgressAt: z.ZodString;
|
|
149
|
+
surface: z.ZodEnum<{
|
|
150
|
+
api: "api";
|
|
151
|
+
internal: "internal";
|
|
152
|
+
scheduler: "scheduler";
|
|
153
|
+
slack: "slack";
|
|
154
|
+
}>;
|
|
155
|
+
actorIdentity: z.ZodOptional<z.ZodObject<{
|
|
156
|
+
email: z.ZodOptional<z.ZodString>;
|
|
157
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
158
|
+
slackUserId: z.ZodOptional<z.ZodString>;
|
|
159
|
+
slackUserName: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, z.core.$strict>>;
|
|
161
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
162
|
+
channelName: z.ZodOptional<z.ZodString>;
|
|
163
|
+
channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
+
locationId: z.ZodOptional<z.ZodString>;
|
|
165
|
+
sentryTraceUrl: z.ZodOptional<z.ZodString>;
|
|
166
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
167
|
+
}, z.core.$strict>>;
|
|
168
|
+
source: z.ZodLiteral<"conversation_index">;
|
|
169
|
+
windowEnd: z.ZodString;
|
|
170
|
+
windowStart: z.ZodString;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
export type LocationSummaryReport = z.infer<typeof locationSummaryReportSchema>;
|
|
173
|
+
export type LocationActorSummaryReport = z.infer<typeof locationActorSummaryReportSchema>;
|
|
174
|
+
export type LocationDirectoryReport = z.infer<typeof locationDirectoryReportSchema>;
|
|
175
|
+
export type LocationDetailReport = z.infer<typeof locationDetailReportSchema>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ActorDirectoryReport } from "./schema";
|
|
2
|
-
/** Load the
|
|
2
|
+
/** Load the complete People directory with grouping and metrics owned by SQL. */
|
|
3
3
|
export declare function readPeopleListFromSql(): Promise<ActorDirectoryReport>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ActorProfileReport } from "./schema";
|
|
2
|
-
/** Load one person profile
|
|
2
|
+
/** Load one complete person profile while bounding only its recent-conversation list. */
|
|
3
3
|
export declare function readPeopleProfileFromSql(email: string): Promise<ActorProfileReport>;
|
|
@@ -3,8 +3,8 @@ import { actorIdentitySchema } from "../conversations/schema";
|
|
|
3
3
|
export declare const peopleConversationSummaryReportSchema: z.ZodObject<{
|
|
4
4
|
status: z.ZodEnum<{
|
|
5
5
|
active: "active";
|
|
6
|
-
completed: "completed";
|
|
7
6
|
failed: "failed";
|
|
7
|
+
completed: "completed";
|
|
8
8
|
}>;
|
|
9
9
|
surface: z.ZodEnum<{
|
|
10
10
|
api: "api";
|
|
@@ -27,14 +27,15 @@ export declare const peopleConversationSummaryReportSchema: z.ZodObject<{
|
|
|
27
27
|
channel: z.ZodOptional<z.ZodString>;
|
|
28
28
|
channelName: z.ZodOptional<z.ZodString>;
|
|
29
29
|
channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
locationId: z.ZodOptional<z.ZodString>;
|
|
30
31
|
}, z.core.$strict>;
|
|
31
32
|
export declare const peopleConversationStatsItemSchema: z.ZodObject<{
|
|
32
33
|
active: z.ZodNumber;
|
|
33
|
-
failed: z.ZodNumber;
|
|
34
34
|
conversations: z.ZodNumber;
|
|
35
35
|
durationMs: z.ZodNumber;
|
|
36
|
-
|
|
36
|
+
failed: z.ZodNumber;
|
|
37
37
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
label: z.ZodString;
|
|
38
39
|
}, z.core.$strict>;
|
|
39
40
|
export declare const actorActivityDayReportSchema: z.ZodObject<{
|
|
40
41
|
active: z.ZodNumber;
|
|
@@ -92,10 +93,7 @@ export declare const actorDirectoryReportSchema: z.ZodObject<{
|
|
|
92
93
|
email: z.ZodString;
|
|
93
94
|
}, z.core.$strict>;
|
|
94
95
|
}, z.core.$strict>>;
|
|
95
|
-
sampleLimit: z.ZodNumber;
|
|
96
|
-
sampleSize: z.ZodNumber;
|
|
97
96
|
source: z.ZodLiteral<"conversation_index">;
|
|
98
|
-
truncated: z.ZodBoolean;
|
|
99
97
|
}, z.core.$strict>;
|
|
100
98
|
export declare const actorProfileReportSchema: z.ZodObject<{
|
|
101
99
|
activityDays: z.ZodArray<z.ZodObject<{
|
|
@@ -109,17 +107,17 @@ export declare const actorProfileReportSchema: z.ZodObject<{
|
|
|
109
107
|
generatedAt: z.ZodString;
|
|
110
108
|
locations: z.ZodArray<z.ZodObject<{
|
|
111
109
|
active: z.ZodNumber;
|
|
112
|
-
failed: z.ZodNumber;
|
|
113
110
|
conversations: z.ZodNumber;
|
|
114
111
|
durationMs: z.ZodNumber;
|
|
115
|
-
|
|
112
|
+
failed: z.ZodNumber;
|
|
116
113
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
label: z.ZodString;
|
|
117
115
|
}, z.core.$strict>>;
|
|
118
116
|
recentConversations: z.ZodArray<z.ZodObject<{
|
|
119
117
|
status: z.ZodEnum<{
|
|
120
118
|
active: "active";
|
|
121
|
-
completed: "completed";
|
|
122
119
|
failed: "failed";
|
|
120
|
+
completed: "completed";
|
|
123
121
|
}>;
|
|
124
122
|
surface: z.ZodEnum<{
|
|
125
123
|
api: "api";
|
|
@@ -142,6 +140,7 @@ export declare const actorProfileReportSchema: z.ZodObject<{
|
|
|
142
140
|
channel: z.ZodOptional<z.ZodString>;
|
|
143
141
|
channelName: z.ZodOptional<z.ZodString>;
|
|
144
142
|
channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
|
|
143
|
+
locationId: z.ZodOptional<z.ZodString>;
|
|
145
144
|
}, z.core.$strict>>;
|
|
146
145
|
actor: z.ZodObject<{
|
|
147
146
|
fullName: z.ZodOptional<z.ZodString>;
|
|
@@ -149,16 +148,14 @@ export declare const actorProfileReportSchema: z.ZodObject<{
|
|
|
149
148
|
slackUserName: z.ZodOptional<z.ZodString>;
|
|
150
149
|
email: z.ZodString;
|
|
151
150
|
}, z.core.$strict>;
|
|
152
|
-
sampleLimit: z.ZodNumber;
|
|
153
|
-
sampleSize: z.ZodNumber;
|
|
154
151
|
source: z.ZodLiteral<"conversation_index">;
|
|
155
152
|
surfaces: z.ZodArray<z.ZodObject<{
|
|
156
153
|
active: z.ZodNumber;
|
|
157
|
-
failed: z.ZodNumber;
|
|
158
154
|
conversations: z.ZodNumber;
|
|
159
155
|
durationMs: z.ZodNumber;
|
|
160
|
-
|
|
156
|
+
failed: z.ZodNumber;
|
|
161
157
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
label: z.ZodString;
|
|
162
159
|
}, z.core.$strict>>;
|
|
163
160
|
totals: z.ZodObject<{
|
|
164
161
|
active: z.ZodNumber;
|
|
@@ -168,7 +165,6 @@ export declare const actorProfileReportSchema: z.ZodObject<{
|
|
|
168
165
|
failed: z.ZodNumber;
|
|
169
166
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
170
167
|
}, z.core.$strict>;
|
|
171
|
-
truncated: z.ZodBoolean;
|
|
172
168
|
windowEnd: z.ZodString;
|
|
173
169
|
windowStart: z.ZodString;
|
|
174
170
|
}, z.core.$strict>;
|