@sentry/junior 0.96.0 → 0.97.1
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-5URSMY3O.js → agent-hooks-XSUIVRQS.js} +8 -6
- package/dist/{reporting → api}/conversations/activity.d.ts +1 -1
- package/dist/api/conversations/detail-projection.d.ts +10 -0
- package/dist/api/conversations/detail.d.ts +3 -0
- package/dist/api/conversations/detail.query.d.ts +3 -0
- package/dist/api/conversations/list.d.ts +3 -0
- package/dist/api/conversations/list.query.d.ts +94 -0
- package/dist/api/conversations/projection.d.ts +14 -0
- package/dist/api/conversations/schema.d.ts +683 -0
- package/dist/{reporting → api}/conversations/shared.d.ts +1 -5
- package/dist/api/conversations/stats.d.ts +3 -0
- package/dist/api/conversations/stats.query.d.ts +3 -0
- package/dist/api/conversations/subagent.d.ts +3 -0
- package/dist/{reporting → api}/conversations/transcript.d.ts +4 -4
- package/dist/api/people/list.d.ts +1 -2
- package/dist/api/people/list.query.d.ts +3 -4
- package/dist/api/people/profile.d.ts +1 -2
- package/dist/api/people/profile.query.d.ts +3 -4
- package/dist/api/people/schema.d.ts +193 -0
- package/dist/api/people/shared.d.ts +31 -9
- package/dist/api/schema.d.ts +20 -0
- package/dist/api/schema.js +50 -0
- package/dist/api-reference.d.ts +4 -3
- package/dist/api.d.ts +3 -0
- package/dist/api.js +156 -0
- package/dist/app.d.ts +1 -4
- package/dist/app.js +101 -367
- package/dist/build/virtual-config.d.ts +2 -2
- package/dist/{catalog-runtime-MSMAYYIK.js → catalog-runtime-PFHVMHDR.js} +3 -2
- package/dist/chat/agent/resume.d.ts +3 -1
- package/dist/chat/agent/tools.d.ts +2 -1
- package/dist/chat/config.d.ts +1 -8
- package/dist/chat/conversations/history.d.ts +241 -27
- package/dist/chat/conversations/legacy-advisor-session.d.ts +7 -0
- package/dist/chat/conversations/legacy-import.d.ts +2 -2
- package/dist/chat/conversations/projection.d.ts +19 -3
- package/dist/chat/conversations/sql/legacy-history-import.d.ts +1 -1
- package/dist/chat/conversations/sql/store.d.ts +15 -9
- package/dist/chat/conversations/store.d.ts +9 -4
- package/dist/chat/model-profile.d.ts +14 -0
- package/dist/chat/pi/transcript.d.ts +5 -3
- package/dist/chat/resource-events/store.d.ts +2 -2
- package/dist/chat/services/context-compaction.d.ts +15 -0
- package/dist/chat/services/turn-result.d.ts +1 -0
- package/dist/chat/services/turn-session-record.d.ts +6 -6
- package/dist/chat/state/turn-session.d.ts +16 -5
- package/dist/chat/task-execution/store.d.ts +2 -2
- package/dist/chat/tools/handoff/tool.d.ts +45 -0
- package/dist/chat/tools/types.d.ts +7 -2
- package/dist/chat/usage.d.ts +25 -25
- package/dist/{chunk-RITD7E5L.js → chunk-35BNLDOJ.js} +338 -577
- package/dist/{chunk-PMNN6ST4.js → chunk-3ECW2K2O.js} +7 -2
- package/dist/{chunk-5C6XTTFI.js → chunk-3F4OPKGF.js} +89 -55
- package/dist/chunk-3V7OFJZC.js +264 -0
- package/dist/chunk-4ZNGQH7C.js +25 -0
- package/dist/{chunk-S5KZ5LPG.js → chunk-5HLDPVYS.js} +14 -447
- package/dist/{chunk-DZENG5ML.js → chunk-6U26PYI5.js} +24 -14
- package/dist/chunk-AUUCAFDE.js +546 -0
- package/dist/{chunk-6APU57E6.js → chunk-B3IT5END.js} +41 -260
- package/dist/chunk-CEA3A3UA.js +86 -0
- package/dist/{chunk-YDT7SNCN.js → chunk-D5KZYS4T.js} +1 -1
- package/dist/{chunk-YDVEH3SB.js → chunk-EEZCY5WX.js} +78 -28
- package/dist/{chunk-2NAZZPPS.js → chunk-EOWXRY5E.js} +1 -1
- package/dist/{chunk-GQ3GK22G.js → chunk-FBHZJFHI.js} +2 -2
- package/dist/{chunk-CZEX6KIQ.js → chunk-G3E7SCME.js} +0 -23
- package/dist/chunk-GUAP3H7O.js +319 -0
- package/dist/{chunk-BYZWPRJA.js → chunk-H66UCBPW.js} +6 -4
- package/dist/{chunk-L7CDEIVJ.js → chunk-LMJPRYHP.js} +4 -2
- package/dist/chunk-LUAE4MGW.js +199 -0
- package/dist/{chunk-GY34VGP5.js → chunk-LVA4I4H7.js} +3 -1
- package/dist/chunk-LVUKF5CE.js +63 -0
- package/dist/{chunk-AAZXTVJT.js → chunk-NG2AV7IB.js} +2 -72
- package/dist/chunk-ON6YKIQ7.js +260 -0
- package/dist/chunk-PDO5BLNM.js +22 -0
- package/dist/chunk-QNVHH5PU.js +20 -0
- package/dist/{chunk-P3YFQLEN.js → chunk-T533JLM3.js} +8 -10
- package/dist/chunk-UAMKJPDF.js +11 -0
- package/dist/chunk-VFH4ZKZT.js +66 -0
- package/dist/{chunk-UKHVMPX5.js → chunk-WGXMTFNU.js} +15 -17
- package/dist/{chunk-MNTINMWR.js → chunk-WJOSZOON.js} +184 -300
- package/dist/chunk-WTYEKPXU.js +451 -0
- package/dist/{chunk-IYM2SIVG.js → chunk-XIRPQQVE.js} +605 -363
- package/dist/cli/chat.js +24 -21
- package/dist/cli/check.js +4 -3
- package/dist/cli/init.js +12 -0
- package/dist/cli/plugins.js +12 -9
- package/dist/cli/snapshot-warmup.js +8 -6
- package/dist/cli/upgrade.js +265 -137
- package/dist/db/db.d.ts +4 -0
- package/dist/db/schema/conversations.d.ts +128 -0
- package/dist/db/schema.d.ts +129 -60
- package/dist/{db-2D6RMG67.js → db-BWXYIKFQ.js} +3 -3
- package/dist/detail-GA6NXWQJ.js +43 -0
- package/dist/discovery-RMHYSRL7.js +43 -0
- package/dist/handlers/health.d.ts +3 -0
- package/dist/instrumentation.js +1 -1
- package/dist/{legacy-import-VZ2MEGP7.js → legacy-import-3NQJVGQL.js} +4 -4
- package/dist/{api/people/list.js → list-A3WFRIYX.js} +26 -16
- package/dist/list-UXJI5Q5X.js +27 -0
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +2 -1
- package/dist/plugin-conversations-DDNGC35A.js +36 -0
- package/dist/{api/people/profile.js → profile-4RYDXWTF.js} +33 -18
- package/dist/reporting/plugin-conversations.d.ts +3 -0
- package/dist/reporting-schema.d.ts +140 -0
- package/dist/reporting.d.ts +12 -81
- package/dist/{runner-JZBRQP4F.js → runner-JALSYH2P.js} +17 -12
- package/dist/skills-MAZXZ2KE.js +26 -0
- package/dist/stats-XKXH3PTY.js +217 -0
- package/dist/subagent-TZ55XY37.js +48 -0
- package/dist/usage-schema.d.ts +25 -0
- package/dist/{validation-6XOOQGME.js → validation-FMEAEKCY.js} +4 -3
- package/migrations/0000_initial.sql +115 -0
- package/migrations/0001_conversation_metrics.sql +4 -0
- package/migrations/README.md +12 -30
- package/migrations/meta/0000_snapshot.json +1 -33
- package/migrations/meta/0001_snapshot.json +972 -0
- package/migrations/meta/_journal.json +9 -2
- package/package.json +13 -17
- package/dist/api/people/types.d.ts +0 -85
- package/dist/chat/advisor-request.d.ts +0 -4
- package/dist/chat/conversations/sql/migrations.d.ts +0 -22
- package/dist/chat/tools/advisor/session-store.d.ts +0 -9
- package/dist/chat/tools/advisor/tool.d.ts +0 -72
- package/dist/chunk-RAIB6WSG.js +0 -142
- package/dist/chunk-WM6KHPBQ.js +0 -48
- package/dist/db/schema/migrations.d.ts +0 -58
- package/dist/reporting/conversations/context.d.ts +0 -8
- package/dist/reporting/conversations/details.d.ts +0 -6
- package/dist/reporting/conversations/index.d.ts +0 -4
- package/dist/reporting/conversations/statistics.d.ts +0 -4
- package/dist/reporting/conversations/summaries.d.ts +0 -20
- package/dist/reporting/conversations/types.d.ts +0 -191
- package/dist/reporting/conversations.d.ts +0 -1
- package/dist/reporting.js +0 -1155
|
@@ -9,13 +9,11 @@ import {
|
|
|
9
9
|
getPersistedThreadState,
|
|
10
10
|
markTurnCompleted,
|
|
11
11
|
mergeArtifactsState
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import {
|
|
14
|
-
coerceThreadConversationState
|
|
15
|
-
} from "./chunk-RAIB6WSG.js";
|
|
12
|
+
} from "./chunk-WGXMTFNU.js";
|
|
16
13
|
import {
|
|
14
|
+
coerceThreadConversationState,
|
|
17
15
|
getAgentTurnSessionRecord
|
|
18
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WJOSZOON.js";
|
|
19
17
|
import {
|
|
20
18
|
generateConversationId,
|
|
21
19
|
hydrateConversationMessages,
|
|
@@ -23,19 +21,19 @@ import {
|
|
|
23
21
|
normalizeConversationText,
|
|
24
22
|
updateConversationStats,
|
|
25
23
|
upsertConversationMessage
|
|
26
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-3F4OPKGF.js";
|
|
27
25
|
import {
|
|
28
26
|
createPluginEmbedder,
|
|
29
27
|
createPluginModel,
|
|
30
28
|
getPlugins
|
|
31
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-5HLDPVYS.js";
|
|
32
30
|
import {
|
|
33
31
|
createPluginLogger,
|
|
34
32
|
createPluginState
|
|
35
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-EOWXRY5E.js";
|
|
36
34
|
import {
|
|
37
35
|
getDb
|
|
38
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-35BNLDOJ.js";
|
|
39
37
|
import {
|
|
40
38
|
GEN_AI_PROVIDER_NAME,
|
|
41
39
|
botConfig,
|
|
@@ -46,7 +44,7 @@ import {
|
|
|
46
44
|
isToolResultMessage,
|
|
47
45
|
normalizeToolNameFromResult,
|
|
48
46
|
stripRuntimeTurnContext
|
|
49
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-EEZCY5WX.js";
|
|
50
48
|
import {
|
|
51
49
|
buildTurnFailureResponse
|
|
52
50
|
} from "./chunk-I35CTGPO.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/api/schema.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var conversationParamsSchema = z.object({ conversationId: z.string().min(1) }).strict();
|
|
4
|
+
var subagentParamsSchema = conversationParamsSchema.extend({ subagentId: z.string().min(1) }).strict();
|
|
5
|
+
var personParamsSchema = z.object({ email: z.string().trim().min(1) }).strict();
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
conversationParamsSchema,
|
|
9
|
+
subagentParamsSchema,
|
|
10
|
+
personParamsSchema
|
|
11
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import {
|
|
2
|
+
actorIdentitySchema,
|
|
3
|
+
conversationStatsItemSchema,
|
|
4
|
+
conversationSummaryReportSchema
|
|
5
|
+
} from "./chunk-LUAE4MGW.js";
|
|
6
|
+
|
|
7
|
+
// src/api/people/schema.ts
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
var peopleConversationSummaryReportSchema = conversationSummaryReportSchema.omit({
|
|
10
|
+
cumulativeUsage: true,
|
|
11
|
+
sentryTraceUrl: true,
|
|
12
|
+
traceId: true
|
|
13
|
+
});
|
|
14
|
+
var peopleConversationStatsItemSchema = conversationStatsItemSchema.omit({ costUsd: true });
|
|
15
|
+
var actorActivityDayReportSchema = z.object({
|
|
16
|
+
active: z.number(),
|
|
17
|
+
conversations: z.number(),
|
|
18
|
+
date: z.string(),
|
|
19
|
+
durationMs: z.number(),
|
|
20
|
+
failed: z.number(),
|
|
21
|
+
hung: z.number(),
|
|
22
|
+
tokens: z.number().optional()
|
|
23
|
+
}).strict();
|
|
24
|
+
var actorTotalsReportSchema = z.object({
|
|
25
|
+
active: z.number(),
|
|
26
|
+
activeDays: z.number(),
|
|
27
|
+
conversations: z.number(),
|
|
28
|
+
durationMs: z.number(),
|
|
29
|
+
failed: z.number(),
|
|
30
|
+
hung: z.number(),
|
|
31
|
+
tokens: z.number().optional()
|
|
32
|
+
}).strict();
|
|
33
|
+
var identifiedActorSchema = actorIdentitySchema.extend({ email: z.string().min(1) }).strict();
|
|
34
|
+
var actorSummaryReportSchema = actorTotalsReportSchema.extend({
|
|
35
|
+
firstSeenAt: z.string(),
|
|
36
|
+
lastSeenAt: z.string(),
|
|
37
|
+
actor: identifiedActorSchema
|
|
38
|
+
}).strict();
|
|
39
|
+
var actorDirectoryReportSchema = z.object({
|
|
40
|
+
generatedAt: z.string(),
|
|
41
|
+
people: z.array(actorSummaryReportSchema),
|
|
42
|
+
sampleLimit: z.number(),
|
|
43
|
+
sampleSize: z.number(),
|
|
44
|
+
source: z.literal("conversation_index"),
|
|
45
|
+
truncated: z.boolean()
|
|
46
|
+
}).strict();
|
|
47
|
+
var actorProfileReportSchema = z.object({
|
|
48
|
+
activityDays: z.array(actorActivityDayReportSchema),
|
|
49
|
+
generatedAt: z.string(),
|
|
50
|
+
locations: z.array(peopleConversationStatsItemSchema),
|
|
51
|
+
recentConversations: z.array(peopleConversationSummaryReportSchema),
|
|
52
|
+
actor: identifiedActorSchema,
|
|
53
|
+
sampleLimit: z.number(),
|
|
54
|
+
sampleSize: z.number(),
|
|
55
|
+
source: z.literal("conversation_index"),
|
|
56
|
+
surfaces: z.array(peopleConversationStatsItemSchema),
|
|
57
|
+
totals: actorTotalsReportSchema,
|
|
58
|
+
truncated: z.boolean(),
|
|
59
|
+
windowEnd: z.string(),
|
|
60
|
+
windowStart: z.string()
|
|
61
|
+
}).strict();
|
|
62
|
+
|
|
63
|
+
export {
|
|
64
|
+
actorDirectoryReportSchema,
|
|
65
|
+
actorProfileReportSchema
|
|
66
|
+
};
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-RAIB6WSG.js";
|
|
4
|
-
import {
|
|
2
|
+
JUNIOR_THREAD_STATE_TTL_MS,
|
|
5
3
|
abandonAgentTurnSessionRecord,
|
|
6
4
|
addAgentTurnUsage,
|
|
5
|
+
buildConversationStatePatch,
|
|
7
6
|
getAgentTurnSessionRecord,
|
|
8
7
|
upsertAgentTurnSessionRecord
|
|
9
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WJOSZOON.js";
|
|
10
9
|
import {
|
|
11
|
-
JUNIOR_THREAD_STATE_TTL_MS,
|
|
12
10
|
persistConversationMessages
|
|
13
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3F4OPKGF.js";
|
|
14
12
|
import {
|
|
15
13
|
sleep
|
|
16
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4ZNGQH7C.js";
|
|
17
15
|
import {
|
|
18
16
|
getPiMessageRole,
|
|
19
17
|
getStateAdapter,
|
|
20
18
|
trimTrailingAssistantMessages
|
|
21
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-EEZCY5WX.js";
|
|
22
20
|
import {
|
|
23
21
|
getActiveTraceId,
|
|
24
22
|
logException
|
|
@@ -124,7 +122,7 @@ function logSessionRecordError(error, eventName, args, attributes, message) {
|
|
|
124
122
|
slackChannelId: args.logContext.channelId,
|
|
125
123
|
runId: args.logContext.runId,
|
|
126
124
|
assistantUserName: args.logContext.assistantUserName,
|
|
127
|
-
modelId: args.
|
|
125
|
+
modelId: args.modelId
|
|
128
126
|
},
|
|
129
127
|
{
|
|
130
128
|
"app.ai.resume_conversation_id": args.conversationId,
|
|
@@ -190,7 +188,7 @@ async function persistRunningSessionRecord(args) {
|
|
|
190
188
|
...args.trailingMessageProvenance ? { trailingMessageProvenance: args.trailingMessageProvenance } : {},
|
|
191
189
|
...args.surface ?? latestSessionRecord?.surface ? { surface: args.surface ?? latestSessionRecord?.surface } : {},
|
|
192
190
|
...args.loadedSkillNames ? { loadedSkillNames: args.loadedSkillNames } : {},
|
|
193
|
-
|
|
191
|
+
modelId: args.modelId,
|
|
194
192
|
...args.reasoningLevel ? { reasoningLevel: args.reasoningLevel } : {},
|
|
195
193
|
...args.actor ?? latestSessionRecord?.actor ? { actor: args.actor ?? latestSessionRecord?.actor } : {},
|
|
196
194
|
...getActiveTraceId() ?? latestSessionRecord?.traceId ? { traceId: getActiveTraceId() ?? latestSessionRecord?.traceId } : {},
|
|
@@ -226,7 +224,7 @@ async function persistCompletedSessionRecord(args) {
|
|
|
226
224
|
"Completed session record requires a slice id from the caller or the latest stored record"
|
|
227
225
|
);
|
|
228
226
|
}
|
|
229
|
-
const modelId =
|
|
227
|
+
const modelId = args.modelId;
|
|
230
228
|
const reasoningLevel = args.reasoningLevel ?? latestSessionRecord?.reasoningLevel;
|
|
231
229
|
const target = {
|
|
232
230
|
...args.channelName ?? latestSessionRecord?.channelName ? { channelName: args.channelName ?? latestSessionRecord?.channelName } : {},
|
|
@@ -250,7 +248,7 @@ async function persistCompletedSessionRecord(args) {
|
|
|
250
248
|
...args.loadedSkillNames ?? latestSessionRecord?.loadedSkillNames ? {
|
|
251
249
|
loadedSkillNames: args.loadedSkillNames ?? latestSessionRecord?.loadedSkillNames
|
|
252
250
|
} : {},
|
|
253
|
-
|
|
251
|
+
modelId,
|
|
254
252
|
...reasoningLevel ? { reasoningLevel } : {},
|
|
255
253
|
...args.actor ?? latestSessionRecord?.actor ? { actor: args.actor ?? latestSessionRecord?.actor } : {},
|
|
256
254
|
...getActiveTraceId() ?? latestSessionRecord?.traceId ? { traceId: getActiveTraceId() ?? latestSessionRecord?.traceId } : {},
|
|
@@ -276,7 +274,7 @@ async function completeDeliveredTurn(args) {
|
|
|
276
274
|
allMessages: args.messages,
|
|
277
275
|
loadedSkillNames: args.loadedSkillNames,
|
|
278
276
|
logContext: args.logContext,
|
|
279
|
-
modelId: args.
|
|
277
|
+
modelId: args.modelId,
|
|
280
278
|
actor: args.actor,
|
|
281
279
|
reasoningLevel: args.reasoningLevel,
|
|
282
280
|
surface: args.surface,
|
|
@@ -316,7 +314,7 @@ async function persistAuthPauseSessionRecord(args) {
|
|
|
316
314
|
piMessages,
|
|
317
315
|
...args.surface ?? latestSessionRecord?.surface ? { surface: args.surface ?? latestSessionRecord?.surface } : {},
|
|
318
316
|
...args.loadedSkillNames ? { loadedSkillNames: args.loadedSkillNames } : {},
|
|
319
|
-
|
|
317
|
+
modelId: args.modelId,
|
|
320
318
|
...args.reasoningLevel ?? latestSessionRecord?.reasoningLevel ? {
|
|
321
319
|
reasoningLevel: args.reasoningLevel ?? latestSessionRecord?.reasoningLevel
|
|
322
320
|
} : {},
|
|
@@ -380,7 +378,7 @@ async function persistTimeoutSessionRecord(args) {
|
|
|
380
378
|
piMessages,
|
|
381
379
|
...args.surface ?? latestSessionRecord?.surface ? { surface: args.surface ?? latestSessionRecord?.surface } : {},
|
|
382
380
|
...args.loadedSkillNames ? { loadedSkillNames: args.loadedSkillNames } : {},
|
|
383
|
-
|
|
381
|
+
modelId: args.modelId,
|
|
384
382
|
...args.reasoningLevel ?? latestSessionRecord?.reasoningLevel ? {
|
|
385
383
|
reasoningLevel: args.reasoningLevel ?? latestSessionRecord?.reasoningLevel
|
|
386
384
|
} : {},
|
|
@@ -404,7 +402,7 @@ async function persistTimeoutSessionRecord(args) {
|
|
|
404
402
|
piMessages,
|
|
405
403
|
...args.surface ?? latestSessionRecord?.surface ? { surface: args.surface ?? latestSessionRecord?.surface } : {},
|
|
406
404
|
...args.loadedSkillNames ? { loadedSkillNames: args.loadedSkillNames } : {},
|
|
407
|
-
|
|
405
|
+
modelId: args.modelId,
|
|
408
406
|
...args.reasoningLevel ?? latestSessionRecord?.reasoningLevel ? {
|
|
409
407
|
reasoningLevel: args.reasoningLevel ?? latestSessionRecord?.reasoningLevel
|
|
410
408
|
} : {},
|
|
@@ -460,7 +458,7 @@ async function persistYieldSessionRecord(args) {
|
|
|
460
458
|
piMessages,
|
|
461
459
|
...args.surface ?? latestSessionRecord?.surface ? { surface: args.surface ?? latestSessionRecord?.surface } : {},
|
|
462
460
|
...args.loadedSkillNames ? { loadedSkillNames: args.loadedSkillNames } : {},
|
|
463
|
-
|
|
461
|
+
modelId: args.modelId,
|
|
464
462
|
...args.reasoningLevel ?? latestSessionRecord?.reasoningLevel ? {
|
|
465
463
|
reasoningLevel: args.reasoningLevel ?? latestSessionRecord?.reasoningLevel
|
|
466
464
|
} : {},
|