@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
|
@@ -1,96 +1,56 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ConversationSurface } from "../conversations/schema";
|
|
3
|
-
export declare const SAMPLE_LIMIT = 5000;
|
|
1
|
+
import type { ActorActivityDayReport, ConversationStatsItem, ActorTotalsReport } from "./schema";
|
|
4
2
|
export declare const RECENT_LIMIT = 25;
|
|
5
3
|
export declare const ACTIVITY_DAYS = 366;
|
|
6
4
|
/** Normalize emails before matching people API rows. */
|
|
7
5
|
export declare function normalizeEmail(email: string | undefined): string | undefined;
|
|
8
|
-
/** Parse report timestamps without throwing on malformed legacy values. */
|
|
9
|
-
export declare function reportTime(value: string): number | undefined;
|
|
10
|
-
/** Convert a report timestamp into the UTC day used for people activity. */
|
|
11
|
-
export declare function reportDate(value: string): string | undefined;
|
|
12
|
-
/** Return the dashboard label for a conversation surface. */
|
|
13
|
-
export declare function surfaceLabel(surface: ConversationSurface): string;
|
|
14
|
-
/** Return the dashboard-safe Slack location label for a conversation. */
|
|
15
|
-
export declare function slackLocationLabel(args: {
|
|
16
|
-
channel?: string;
|
|
17
|
-
channelName?: string;
|
|
18
|
-
channelNameRedacted?: boolean;
|
|
19
|
-
}): string | undefined;
|
|
20
|
-
/** Project one SQL conversation row into the people API conversation summary. */
|
|
21
|
-
export declare function summaryFromRow(row: PeopleConversationRow): ConversationSummaryReport;
|
|
22
|
-
/** Collapse stored conversation usage into the dashboard token total. */
|
|
23
|
-
export declare function usageTokens(row: PeopleConversationRow): number | undefined;
|
|
24
6
|
/** Build a zeroed totals object for people API aggregations. */
|
|
25
7
|
export declare function emptyTotals(): ActorTotalsReport;
|
|
26
|
-
/** Build a zeroed labeled stats row for people API aggregations. */
|
|
27
|
-
export declare function emptyStatsItem(label: string): ConversationStatsItem;
|
|
28
8
|
/** Build a zeroed activity day for the people profile window. */
|
|
29
9
|
export declare function emptyActivityDay(date: string): ActorActivityDayReport;
|
|
30
|
-
/** Collapse a conversation summary status into aggregate counters. */
|
|
31
|
-
export declare function signals(summary: ConversationSummaryReport): {
|
|
32
|
-
active: boolean;
|
|
33
|
-
failed: boolean;
|
|
34
|
-
};
|
|
35
|
-
/** Add status counters into a people API aggregate row. */
|
|
36
|
-
export declare function addSignals(target: Pick<ActorTotalsReport, "active" | "failed">, value: ReturnType<typeof signals>): void;
|
|
37
|
-
/** Return only actor identities that can be grouped by normalized email. */
|
|
38
|
-
export declare function identityWithEmail(actor: ActorIdentity | undefined): (ActorIdentity & {
|
|
39
|
-
email: string;
|
|
40
|
-
}) | undefined;
|
|
41
|
-
/** Preserve the first observed person fields while filling missing details. */
|
|
42
|
-
export declare function mergeIdentity(current: ActorIdentity & {
|
|
43
|
-
email: string;
|
|
44
|
-
}, next: ActorIdentity & {
|
|
45
|
-
email: string;
|
|
46
|
-
}): ActorIdentity & {
|
|
47
|
-
email: string;
|
|
48
|
-
};
|
|
49
10
|
/** Fill the fixed people profile activity window from sparse day totals. */
|
|
50
11
|
export declare function activityDays(days: Map<string, ActorActivityDayReport>, nowMs: number): ActorActivityDayReport[];
|
|
51
12
|
/** Return deterministic stats rows for people API responses. */
|
|
52
13
|
export declare function statsItems(map: Map<string, ConversationStatsItem>): {
|
|
53
14
|
active: number;
|
|
54
|
-
failed: number;
|
|
55
15
|
conversations: number;
|
|
56
16
|
durationMs: number;
|
|
17
|
+
failed: number;
|
|
57
18
|
label: string;
|
|
58
19
|
tokens?: number | undefined;
|
|
59
20
|
}[];
|
|
60
|
-
/**
|
|
61
|
-
export declare function
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}>;
|
|
96
|
-
export type PeopleConversationRow = Awaited<ReturnType<typeof actorRows>>["rows"][number];
|
|
21
|
+
/** Build the verified Slack actor predicate shared by People aggregate and recent-row queries. */
|
|
22
|
+
export declare function verifiedActorWhere(email?: string): import("drizzle-orm").SQL<unknown> | undefined;
|
|
23
|
+
/** Read only the recent conversation rows required by a People profile. */
|
|
24
|
+
export declare function recentActorRows(email: string): Promise<{
|
|
25
|
+
channelName: string | null;
|
|
26
|
+
conversationId: string;
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
destinationId: string | null;
|
|
29
|
+
destinationVisibility: import("../../db/schema/destinations").JuniorDestinationVisibility | null;
|
|
30
|
+
durationMs: number;
|
|
31
|
+
email: string;
|
|
32
|
+
executionStatus: import("../../chat/conversations/store").ConversationStatus;
|
|
33
|
+
executionUpdatedAt: Date | null;
|
|
34
|
+
fullName: string | null;
|
|
35
|
+
handle: string | null;
|
|
36
|
+
lastActivityAt: Date;
|
|
37
|
+
providerSubjectId: string;
|
|
38
|
+
source: import("../../chat/conversations/store").ConversationSource | null;
|
|
39
|
+
title: string | null;
|
|
40
|
+
updatedAt: Date;
|
|
41
|
+
usage: {
|
|
42
|
+
inputTokens?: number | undefined;
|
|
43
|
+
outputTokens?: number | undefined;
|
|
44
|
+
cachedInputTokens?: number | undefined;
|
|
45
|
+
cacheCreationTokens?: number | undefined;
|
|
46
|
+
reasoningTokens?: number | undefined;
|
|
47
|
+
totalTokens?: number | undefined;
|
|
48
|
+
cost?: {
|
|
49
|
+
input?: number | undefined;
|
|
50
|
+
output?: number | undefined;
|
|
51
|
+
cacheRead?: number | undefined;
|
|
52
|
+
cacheWrite?: number | undefined;
|
|
53
|
+
total?: number | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
} | null;
|
|
56
|
+
}[]>;
|
package/dist/api/schema.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
export { dailyConversationActivitySchema } from "./activity";
|
|
2
|
+
export type { DailyConversationActivity } from "./activity";
|
|
1
3
|
export { conversationDetailReportSchema, conversationFeedSchema, conversationStatsReportSchema, conversationSubagentTranscriptReportSchema, } from "./conversations/schema";
|
|
2
4
|
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
5
|
export { actorDirectoryReportSchema, actorProfileReportSchema, } from "./people/schema";
|
|
6
|
+
export { locationDetailReportSchema, locationDirectoryReportSchema, } from "./locations/schema";
|
|
7
|
+
export type { LocationActorSummaryReport, LocationDetailReport, LocationDirectoryReport, LocationSummaryReport, } from "./locations/schema";
|
|
4
8
|
export type { ActorActivityDayReport, ActorDirectoryReport, ActorProfileReport, ActorSummaryReport, ActorTotalsReport, } from "./people/schema";
|
|
5
9
|
export { healthReportSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginReportSchema, pluginReportsSchema, runtimeInfoReportSchema, skillReportSchema, skillReportsSchema, } from "../reporting-schema";
|
|
6
10
|
export type { HealthReport, PluginOperationalReport, PluginOperationalReportFeed, PluginPackageContentItemReport, PluginPackageContentReport, PluginReport, PluginReports, RuntimeInfoReport, SkillReport, SkillReports, } from "../reporting-schema";
|
|
@@ -18,6 +22,10 @@ export declare const subagentParamsSchema: z.ZodObject<{
|
|
|
18
22
|
export declare const personParamsSchema: z.ZodObject<{
|
|
19
23
|
email: z.ZodString;
|
|
20
24
|
}, z.core.$strict>;
|
|
25
|
+
export declare const locationParamsSchema: z.ZodObject<{
|
|
26
|
+
locationId: z.ZodString;
|
|
27
|
+
}, z.core.$strict>;
|
|
21
28
|
export type ConversationParams = z.infer<typeof conversationParamsSchema>;
|
|
22
29
|
export type SubagentParams = z.infer<typeof subagentParamsSchema>;
|
|
23
30
|
export type PersonParams = z.infer<typeof personParamsSchema>;
|
|
31
|
+
export type LocationParams = z.infer<typeof locationParamsSchema>;
|
package/dist/api/schema.js
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
conversationFeedQuerySchema,
|
|
3
3
|
conversationParamsSchema,
|
|
4
|
+
locationParamsSchema,
|
|
4
5
|
personParamsSchema,
|
|
5
6
|
subagentParamsSchema
|
|
6
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-2RNOB32R.js";
|
|
8
|
+
import {
|
|
9
|
+
dailyConversationActivitySchema,
|
|
10
|
+
locationDetailReportSchema,
|
|
11
|
+
locationDirectoryReportSchema
|
|
12
|
+
} from "../chunk-4AQUWWEM.js";
|
|
7
13
|
import {
|
|
8
14
|
actorDirectoryReportSchema,
|
|
9
15
|
actorProfileReportSchema
|
|
10
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-IDZBM3NW.js";
|
|
11
17
|
import {
|
|
12
18
|
conversationDetailReportSchema,
|
|
13
19
|
conversationFeedSchema,
|
|
14
20
|
conversationStatsReportSchema,
|
|
15
21
|
conversationSubagentTranscriptReportSchema
|
|
16
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-MM5UFDAC.js";
|
|
17
23
|
import {
|
|
18
24
|
healthReportSchema,
|
|
19
25
|
pluginOperationalReportFeedSchema,
|
|
@@ -27,6 +33,7 @@ import {
|
|
|
27
33
|
skillReportsSchema
|
|
28
34
|
} from "../chunk-CEA3A3UA.js";
|
|
29
35
|
import "../chunk-PDO5BLNM.js";
|
|
36
|
+
import "../chunk-FXFQNHRU.js";
|
|
30
37
|
import "../chunk-MLKGABMK.js";
|
|
31
38
|
export {
|
|
32
39
|
actorDirectoryReportSchema,
|
|
@@ -37,7 +44,11 @@ export {
|
|
|
37
44
|
conversationParamsSchema,
|
|
38
45
|
conversationStatsReportSchema,
|
|
39
46
|
conversationSubagentTranscriptReportSchema,
|
|
47
|
+
dailyConversationActivitySchema,
|
|
40
48
|
healthReportSchema,
|
|
49
|
+
locationDetailReportSchema,
|
|
50
|
+
locationDirectoryReportSchema,
|
|
51
|
+
locationParamsSchema,
|
|
41
52
|
personParamsSchema,
|
|
42
53
|
pluginOperationalReportFeedSchema,
|
|
43
54
|
pluginOperationalReportSchema,
|
package/dist/api.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
conversationFeedQuerySchema,
|
|
3
3
|
conversationParamsSchema,
|
|
4
|
+
locationParamsSchema,
|
|
4
5
|
personParamsSchema,
|
|
5
6
|
subagentParamsSchema
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-2RNOB32R.js";
|
|
8
|
+
import "./chunk-4AQUWWEM.js";
|
|
9
|
+
import "./chunk-IDZBM3NW.js";
|
|
10
|
+
import "./chunk-MM5UFDAC.js";
|
|
9
11
|
import {
|
|
10
12
|
readHealthReport
|
|
11
13
|
} from "./chunk-QNVHH5PU.js";
|
|
@@ -16,6 +18,7 @@ import {
|
|
|
16
18
|
skillReportsSchema
|
|
17
19
|
} from "./chunk-CEA3A3UA.js";
|
|
18
20
|
import "./chunk-PDO5BLNM.js";
|
|
21
|
+
import "./chunk-FXFQNHRU.js";
|
|
19
22
|
import "./chunk-MLKGABMK.js";
|
|
20
23
|
|
|
21
24
|
// src/api.ts
|
|
@@ -70,11 +73,11 @@ async function readRuntimeInfoReport() {
|
|
|
70
73
|
}
|
|
71
74
|
async function readPluginOperationalReportFeed() {
|
|
72
75
|
const listRecent = async (listOptions) => {
|
|
73
|
-
const { listRecentConversationSummaries } = await import("./plugin-conversations-
|
|
76
|
+
const { listRecentConversationSummaries } = await import("./plugin-conversations-JANXC4GA.js");
|
|
74
77
|
return listRecentConversationSummaries(listOptions?.limit);
|
|
75
78
|
};
|
|
76
79
|
const nowMs = Date.now();
|
|
77
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
80
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-V6KU7PQN.js");
|
|
78
81
|
return pluginOperationalReportFeedSchema.parse({
|
|
79
82
|
source: "plugins",
|
|
80
83
|
generatedAt: new Date(nowMs).toISOString(),
|
|
@@ -123,7 +126,7 @@ function createJuniorApi() {
|
|
|
123
126
|
return Response.json(await readPluginOperationalReportFeed());
|
|
124
127
|
});
|
|
125
128
|
app.get("/api/conversations", async (c) => {
|
|
126
|
-
const { readConversationFeed } = await import("./list-
|
|
129
|
+
const { readConversationFeed } = await import("./list-KHRAWZWU.js");
|
|
127
130
|
const { actorEmail } = parseQuery(
|
|
128
131
|
conversationFeedQuerySchema,
|
|
129
132
|
c.req.query()
|
|
@@ -131,11 +134,11 @@ function createJuniorApi() {
|
|
|
131
134
|
return Response.json(await readConversationFeed({ actorEmail }));
|
|
132
135
|
});
|
|
133
136
|
app.get("/api/conversations/stats", async () => {
|
|
134
|
-
const { readConversationStats } = await import("./stats-
|
|
137
|
+
const { readConversationStats } = await import("./stats-J3YGCYDF.js");
|
|
135
138
|
return Response.json(await readConversationStats());
|
|
136
139
|
});
|
|
137
140
|
app.get("/api/conversations/:conversationId", async (c) => {
|
|
138
|
-
const { readConversationDetail } = await import("./detail-
|
|
141
|
+
const { readConversationDetail } = await import("./detail-LU6COZO6.js");
|
|
139
142
|
const { conversationId } = parseParams(
|
|
140
143
|
conversationParamsSchema,
|
|
141
144
|
c.req.param()
|
|
@@ -146,7 +149,7 @@ function createJuniorApi() {
|
|
|
146
149
|
app.get(
|
|
147
150
|
"/api/conversations/:conversationId/subagents/:subagentId",
|
|
148
151
|
async (c) => {
|
|
149
|
-
const { readConversationSubagent } = await import("./subagent-
|
|
152
|
+
const { readConversationSubagent } = await import("./subagent-P7HOSMVC.js");
|
|
150
153
|
const { conversationId, subagentId } = parseParams(
|
|
151
154
|
subagentParamsSchema,
|
|
152
155
|
c.req.param()
|
|
@@ -156,14 +159,24 @@ function createJuniorApi() {
|
|
|
156
159
|
}
|
|
157
160
|
);
|
|
158
161
|
app.get("/api/people", async () => {
|
|
159
|
-
const { readPeopleList } = await import("./list-
|
|
162
|
+
const { readPeopleList } = await import("./list-2FI5SFV7.js");
|
|
160
163
|
return Response.json(await readPeopleList());
|
|
161
164
|
});
|
|
162
165
|
app.get("/api/people/:email", async (c) => {
|
|
163
166
|
const { email } = parseParams(personParamsSchema, c.req.param());
|
|
164
|
-
const { readPeopleProfile } = await import("./profile-
|
|
167
|
+
const { readPeopleProfile } = await import("./profile-3O3OVENT.js");
|
|
165
168
|
return Response.json(await readPeopleProfile(email));
|
|
166
169
|
});
|
|
170
|
+
app.get("/api/locations", async () => {
|
|
171
|
+
const { readLocationDirectory } = await import("./list-4ALSU6ZW.js");
|
|
172
|
+
return Response.json(await readLocationDirectory());
|
|
173
|
+
});
|
|
174
|
+
app.get("/api/locations/:locationId", async (c) => {
|
|
175
|
+
const { locationId } = parseParams(locationParamsSchema, c.req.param());
|
|
176
|
+
const { readLocationDetail } = await import("./detail-5SLCGT6J.js");
|
|
177
|
+
const report = await readLocationDetail(locationId);
|
|
178
|
+
return report ? Response.json(report) : Response.json({ error: "Location not found." }, { status: 404 });
|
|
179
|
+
});
|
|
167
180
|
return app;
|
|
168
181
|
}
|
|
169
182
|
export {
|
package/dist/app.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
processPluginTask,
|
|
6
6
|
requireTurnFailureEventId,
|
|
7
7
|
scheduleSessionCompletedPluginTasks
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XSBIISXS.js";
|
|
9
9
|
import {
|
|
10
10
|
buildSentryConversationUrl
|
|
11
11
|
} from "./chunk-LVUKF5CE.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
conversationVisibilityFromSlackChannelType,
|
|
14
14
|
resolveSlackChannelTypeFromMessage,
|
|
15
15
|
resolveSlackConversationContext
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-VVIXK2BX.js";
|
|
17
17
|
import {
|
|
18
18
|
CONVERSATION_WORK_CHECK_IN_INTERVAL_MS,
|
|
19
19
|
CONVERSATION_WORK_STALE_ENQUEUE_MS,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
requestConversationContinuation,
|
|
38
38
|
requestConversationWork,
|
|
39
39
|
startConversationWork
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-2T7DCRAW.js";
|
|
41
41
|
import {
|
|
42
42
|
GET
|
|
43
43
|
} from "./chunk-QNVHH5PU.js";
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
splitSlackReplyText,
|
|
106
106
|
startOAuthFlow,
|
|
107
107
|
truncateStatusText
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-45DMFMY2.js";
|
|
109
109
|
import {
|
|
110
110
|
CooperativeTurnYieldError,
|
|
111
111
|
TurnInputCommitLostError,
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
persistWithRetry,
|
|
135
135
|
persistYieldSessionRecord,
|
|
136
136
|
startActiveTurn
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-NSOCZGOH.js";
|
|
138
138
|
import {
|
|
139
139
|
JUNIOR_THREAD_STATE_TTL_MS,
|
|
140
140
|
coerceThreadConversationState
|
|
@@ -145,13 +145,13 @@ import {
|
|
|
145
145
|
getAgentTurnSessionRecord,
|
|
146
146
|
listAgentTurnSessionSummariesForConversation,
|
|
147
147
|
recordAgentTurnSessionSummary
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-IVXL57YF.js";
|
|
149
149
|
import {
|
|
150
150
|
commitMessages,
|
|
151
151
|
loadConversationProjection,
|
|
152
152
|
loadProjection,
|
|
153
153
|
recordAuthorizationCompleted
|
|
154
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-IQIBZXGB.js";
|
|
155
155
|
import {
|
|
156
156
|
buildConversationContext,
|
|
157
157
|
createConversationMemoryService,
|
|
@@ -166,8 +166,8 @@ import {
|
|
|
166
166
|
persistConversationMessages,
|
|
167
167
|
updateConversationStats,
|
|
168
168
|
upsertConversationMessage
|
|
169
|
-
} from "./chunk-
|
|
170
|
-
import "./chunk-
|
|
169
|
+
} from "./chunk-JPQISMMJ.js";
|
|
170
|
+
import "./chunk-XJA7BPHS.js";
|
|
171
171
|
import "./chunk-PDO5BLNM.js";
|
|
172
172
|
import "./chunk-CM5EZD5F.js";
|
|
173
173
|
import {
|
|
@@ -179,7 +179,7 @@ import {
|
|
|
179
179
|
setPlugins,
|
|
180
180
|
validatePlugins,
|
|
181
181
|
verifySlackDirectCredentialSubject
|
|
182
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-TPTJEHUE.js";
|
|
183
183
|
import {
|
|
184
184
|
SlackActionError,
|
|
185
185
|
downloadPrivateSlackFile,
|
|
@@ -190,11 +190,11 @@ import {
|
|
|
190
190
|
normalizeSlackConversationId,
|
|
191
191
|
runWithSlackInstallationToken,
|
|
192
192
|
runWithWorkspaceTeamId
|
|
193
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-FP5N5OWZ.js";
|
|
194
194
|
import {
|
|
195
195
|
createPluginLogger,
|
|
196
196
|
createPluginState
|
|
197
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-PWC24W5F.js";
|
|
198
198
|
import {
|
|
199
199
|
contextProvenance,
|
|
200
200
|
getConversationStore,
|
|
@@ -203,9 +203,8 @@ import {
|
|
|
203
203
|
instructionProvenanceFor,
|
|
204
204
|
juniorAgentSteps,
|
|
205
205
|
juniorConversationMessages,
|
|
206
|
-
juniorConversations
|
|
207
|
-
|
|
208
|
-
} from "./chunk-OGHXZ4KQ.js";
|
|
206
|
+
juniorConversations
|
|
207
|
+
} from "./chunk-VHRM6GNH.js";
|
|
209
208
|
import "./chunk-G3E7SCME.js";
|
|
210
209
|
import {
|
|
211
210
|
sleep
|
|
@@ -233,7 +232,10 @@ import {
|
|
|
233
232
|
setSlackReactionConfig,
|
|
234
233
|
stripRuntimeTurnContext,
|
|
235
234
|
trimTrailingAssistantMessages
|
|
236
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-A7X2FDUO.js";
|
|
236
|
+
import {
|
|
237
|
+
juniorDestinations
|
|
238
|
+
} from "./chunk-FXFQNHRU.js";
|
|
237
239
|
import {
|
|
238
240
|
parseSlackThreadId,
|
|
239
241
|
readSlackRawMessageContext,
|
|
@@ -1153,7 +1155,7 @@ async function runAgentDispatchSlice(callback, deps) {
|
|
|
1153
1155
|
modelId: reply.diagnostics.modelId,
|
|
1154
1156
|
durationMs: reply.diagnostics.durationMs,
|
|
1155
1157
|
usage: reply.diagnostics.usage,
|
|
1156
|
-
reasoningLevel: reply.diagnostics.
|
|
1158
|
+
reasoningLevel: reply.diagnostics.reasoningLevel,
|
|
1157
1159
|
destination: dispatch.destination,
|
|
1158
1160
|
source: dispatch.source,
|
|
1159
1161
|
actor: dispatch.actor,
|
|
@@ -10304,7 +10306,7 @@ function createReplyToThread(deps) {
|
|
|
10304
10306
|
conversationId,
|
|
10305
10307
|
durationMs: reply.diagnostics.durationMs,
|
|
10306
10308
|
usage: reply.diagnostics.usage,
|
|
10307
|
-
reasoningLevel: reply.diagnostics.
|
|
10309
|
+
reasoningLevel: reply.diagnostics.reasoningLevel,
|
|
10308
10310
|
destination,
|
|
10309
10311
|
destinationVisibility,
|
|
10310
10312
|
source,
|
|
@@ -11674,9 +11676,11 @@ function dashboardHostRoutePaths(dashboard) {
|
|
|
11674
11676
|
basePath,
|
|
11675
11677
|
conversationsPath,
|
|
11676
11678
|
`${conversationsPath}/*`,
|
|
11679
|
+
pagePath("locations"),
|
|
11680
|
+
`${pagePath("locations")}/*`,
|
|
11677
11681
|
peoplePath,
|
|
11678
11682
|
`${peoplePath}/*`,
|
|
11679
|
-
pagePath("
|
|
11683
|
+
pagePath("system")
|
|
11680
11684
|
];
|
|
11681
11685
|
const loginPath = basePath === "/" ? "/auth/login" : `${basePath}/auth/login`;
|
|
11682
11686
|
return [
|
|
@@ -11692,6 +11696,8 @@ function dashboardHostRoutePaths(dashboard) {
|
|
|
11692
11696
|
"/api/skills",
|
|
11693
11697
|
"/api/conversations",
|
|
11694
11698
|
"/api/conversations/*",
|
|
11699
|
+
"/api/locations",
|
|
11700
|
+
"/api/locations/*",
|
|
11695
11701
|
"/api/people",
|
|
11696
11702
|
"/api/people/*",
|
|
11697
11703
|
"/api/config",
|
|
@@ -22,6 +22,7 @@ import type { ConversationPendingAuthState } from "@/chat/state/conversation";
|
|
|
22
22
|
import type { PiMessageProvenance } from "@/chat/state/session-log";
|
|
23
23
|
import type { AgentTurnSurface } from "@/chat/state/turn-session";
|
|
24
24
|
import type { ToolExecutionReport } from "@/chat/tool-support/tool-execution-report";
|
|
25
|
+
import type { TurnReasoningLevel } from "@/chat/reasoning-level";
|
|
25
26
|
import type { ImageGenerateToolDeps, WebFetchToolDeps, WebSearchToolDeps } from "@/chat/tools/types";
|
|
26
27
|
export interface AgentRunAttachment {
|
|
27
28
|
data?: Buffer;
|
|
@@ -89,6 +90,8 @@ export interface AgentRunPolicy {
|
|
|
89
90
|
/** Cancels provider work when the owning host request is abandoned. */
|
|
90
91
|
signal?: AbortSignal;
|
|
91
92
|
authorizationFlowMode?: AuthorizationFlowMode;
|
|
93
|
+
/** Explicit per-agent reasoning level. When set, adaptive routing is disabled. */
|
|
94
|
+
reasoningLevel?: TurnReasoningLevel;
|
|
92
95
|
configuration?: Record<string, unknown>;
|
|
93
96
|
channelConfiguration?: ChannelConfigurationService;
|
|
94
97
|
skillDirs?: string[];
|
package/dist/chat/config.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type TurnReasoningLevel } from "@/chat/reasoning-level";
|
|
1
2
|
/**
|
|
2
3
|
* Buffer between the Vercel function timeout and the agent turn timeout so
|
|
3
4
|
* Junior can abort, persist, and schedule continuation before host teardown.
|
|
@@ -9,6 +10,7 @@ export interface BotConfig {
|
|
|
9
10
|
loadingMessages: string[];
|
|
10
11
|
modelId: string;
|
|
11
12
|
modelProfiles: Readonly<Record<string, string>>;
|
|
13
|
+
reasoningLevel?: TurnReasoningLevel;
|
|
12
14
|
modelContextWindowTokens?: number;
|
|
13
15
|
visionModelId?: string;
|
|
14
16
|
turnTimeoutMs: number;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const TURN_REASONING_LEVELS: readonly ["none", "low", "medium", "high", "xhigh"];
|
|
2
|
+
export type TurnReasoningLevel = (typeof TURN_REASONING_LEVELS)[number];
|
|
3
|
+
/** Validate a configured main-agent reasoning level. */
|
|
4
|
+
export declare function parseTurnReasoningLevel(value: unknown): TurnReasoningLevel;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ThinkingLevel as AgentThinkingLevel } from "@earendil-works/pi-agent-core";
|
|
2
2
|
import type { ThinkingLevel as ProviderThinkingLevel } from "@earendil-works/pi-ai";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
|
|
4
|
+
import { type TurnReasoningLevel } from "@/chat/reasoning-level";
|
|
5
5
|
declare const turnExecutionProfileSchema: z.ZodObject<{
|
|
6
|
-
|
|
6
|
+
reasoning_level: z.ZodEnum<{
|
|
7
7
|
low: "low";
|
|
8
8
|
medium: "medium";
|
|
9
9
|
high: "high";
|
|
@@ -13,14 +13,15 @@ declare const turnExecutionProfileSchema: z.ZodObject<{
|
|
|
13
13
|
confidence: z.ZodPreprocess<z.ZodNumber>;
|
|
14
14
|
reason: z.ZodString;
|
|
15
15
|
}, z.core.$strip>;
|
|
16
|
-
|
|
17
|
-
export interface TurnThinkingSelection {
|
|
16
|
+
export interface TurnReasoningSelection {
|
|
18
17
|
confidence?: number;
|
|
19
|
-
|
|
18
|
+
reasoningLevel: TurnReasoningLevel;
|
|
20
19
|
reason: string;
|
|
21
20
|
}
|
|
22
|
-
/**
|
|
23
|
-
export declare function
|
|
21
|
+
/** Preserve an explicitly configured reasoning level without invoking the router. */
|
|
22
|
+
export declare function configuredTurnReasoningLevel(reasoningLevel: TurnReasoningLevel, source: "agent_config" | "default"): TurnReasoningSelection;
|
|
23
|
+
/** Choose the reasoning level for the upcoming assistant turn when none is configured. */
|
|
24
|
+
export declare function selectTurnReasoningLevel(args: {
|
|
24
25
|
completeObject: (args: {
|
|
25
26
|
modelId: string;
|
|
26
27
|
schema: typeof turnExecutionProfileSchema;
|
|
@@ -43,7 +44,7 @@ export declare function selectTurnThinkingLevel(args: {
|
|
|
43
44
|
currentTurnBlocks?: string[];
|
|
44
45
|
fastModelId: string;
|
|
45
46
|
messageText: string;
|
|
46
|
-
}): Promise<
|
|
47
|
-
/** Convert a routing bucket into the Pi Agent
|
|
48
|
-
export declare function
|
|
47
|
+
}): Promise<TurnReasoningSelection>;
|
|
48
|
+
/** Convert a routing bucket into the Pi Agent reasoning setting for a main turn. */
|
|
49
|
+
export declare function toPiReasoningLevel(level: TurnReasoningSelection["reasoningLevel"]): AgentThinkingLevel | "off";
|
|
49
50
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LogContext } from "@/chat/logging";
|
|
2
2
|
import type { PiMessage } from "@/chat/pi/messages";
|
|
3
|
-
import type {
|
|
3
|
+
import type { TurnReasoningSelection } from "@/chat/services/turn-reasoning-level";
|
|
4
4
|
import type { AgentTurnUsage } from "@/chat/usage";
|
|
5
5
|
import type { ReplyDeliveryPlan } from "@/chat/services/reply-delivery-plan";
|
|
6
6
|
import type { ThreadArtifactsState } from "@/chat/state/artifacts";
|
|
@@ -11,7 +11,7 @@ export interface AgentTurnDiagnostics {
|
|
|
11
11
|
providerError?: unknown;
|
|
12
12
|
modelId: string;
|
|
13
13
|
outcome: "success" | "execution_failure" | "provider_error";
|
|
14
|
-
|
|
14
|
+
reasoningLevel?: TurnReasoningSelection["reasoningLevel"];
|
|
15
15
|
stopReason?: string;
|
|
16
16
|
toolCalls: string[];
|
|
17
17
|
toolErrorCount: number;
|
|
@@ -42,7 +42,7 @@ export interface TurnResultInput {
|
|
|
42
42
|
shouldTrace: boolean;
|
|
43
43
|
spanContext: LogContext;
|
|
44
44
|
usage?: AgentTurnUsage;
|
|
45
|
-
|
|
45
|
+
reasoningSelection: TurnReasoningSelection;
|
|
46
46
|
correlation?: {
|
|
47
47
|
threadId?: string;
|
|
48
48
|
actorId?: string;
|
|
@@ -32,7 +32,7 @@ export declare function createSearchToolsTool(catalogTools: Record<string, AnyTo
|
|
|
32
32
|
tools: {
|
|
33
33
|
tool_name: string;
|
|
34
34
|
description: string;
|
|
35
|
-
exposure: "
|
|
35
|
+
exposure: "direct" | "hidden" | "deferred" | "modelOnly";
|
|
36
36
|
signature: string;
|
|
37
37
|
call: {
|
|
38
38
|
tool_name: string;
|
|
@@ -77,7 +77,7 @@ export declare function createSearchToolsTool(catalogTools: Record<string, AnyTo
|
|
|
77
77
|
tools: {
|
|
78
78
|
tool_name: string;
|
|
79
79
|
description: string;
|
|
80
|
-
exposure: "
|
|
80
|
+
exposure: "direct" | "hidden" | "deferred" | "modelOnly";
|
|
81
81
|
signature: string;
|
|
82
82
|
call: {
|
|
83
83
|
tool_name: string;
|
|
@@ -6,10 +6,12 @@ var conversationFeedQuerySchema = z.object({
|
|
|
6
6
|
}).strict();
|
|
7
7
|
var subagentParamsSchema = conversationParamsSchema.extend({ subagentId: z.string().min(1) }).strict();
|
|
8
8
|
var personParamsSchema = z.object({ email: z.string().trim().min(1) }).strict();
|
|
9
|
+
var locationParamsSchema = z.object({ locationId: z.string().min(1) }).strict();
|
|
9
10
|
|
|
10
11
|
export {
|
|
11
12
|
conversationParamsSchema,
|
|
12
13
|
conversationFeedQuerySchema,
|
|
13
14
|
subagentParamsSchema,
|
|
14
|
-
personParamsSchema
|
|
15
|
+
personParamsSchema,
|
|
16
|
+
locationParamsSchema
|
|
15
17
|
};
|