@sentry/junior 0.85.0 → 0.87.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-AV7CHLUO.js → agent-hooks-NWOUB3UR.js} +7 -7
- package/dist/app.js +779 -356
- package/dist/chat/conversation-privacy.d.ts +12 -2
- package/dist/chat/conversations/sql/migrations.d.ts +1 -1
- package/dist/chat/conversations/sql/store.d.ts +9 -1
- package/dist/chat/conversations/store.d.ts +13 -0
- package/dist/chat/ingress/message-changed.d.ts +2 -0
- package/dist/chat/no-reply.d.ts +7 -0
- package/dist/chat/respond.d.ts +7 -1
- package/dist/chat/runtime/reply-executor.d.ts +2 -10
- package/dist/chat/runtime/slack-runtime.d.ts +5 -4
- package/dist/chat/runtime/turn.d.ts +7 -0
- package/dist/chat/services/persist-retry.d.ts +2 -0
- package/dist/chat/services/reply-delivery-plan.d.ts +0 -4
- package/dist/chat/services/turn-session-record.d.ts +31 -2
- package/dist/chat/slack/client.d.ts +33 -2
- package/dist/chat/slack/conversation-context.d.ts +15 -0
- package/dist/chat/state/turn-session.d.ts +9 -0
- package/dist/chat/task-execution/queue.d.ts +1 -1
- package/dist/chat/task-execution/slack-work.d.ts +10 -2
- package/dist/chat/task-execution/state.d.ts +44 -4
- package/dist/chat/task-execution/store.d.ts +21 -4
- package/dist/chat/task-execution/worker.d.ts +11 -4
- package/dist/chat/tools/slack/channel-access.d.ts +29 -0
- package/dist/chat/tools/slack/thread-read.d.ts +4 -1
- package/dist/{chunk-UVNV67EC.js → chunk-2NFV5FMB.js} +4 -4
- package/dist/{chunk-QTTTRBNB.js → chunk-6I6HBOQM.js} +80 -15
- package/dist/{chunk-ENEWQMRJ.js → chunk-6O5UI3RG.js} +1 -1
- package/dist/{chunk-GY7L6VCT.js → chunk-ACJJJEGG.js} +35 -17
- package/dist/{chunk-MHEV3T2Y.js → chunk-B6FQPS7A.js} +953 -795
- package/dist/{chunk-MTE5NRPJ.js → chunk-BRSQQRG6.js} +1 -1
- package/dist/{chunk-EENOFKDN.js → chunk-ENPSU7L7.js} +165 -27
- package/dist/{chunk-RUB77TGS.js → chunk-GB5DFM4D.js} +1 -1
- package/dist/{chunk-C2PSUWK3.js → chunk-GGD6WK6V.js} +124 -25
- package/dist/{chunk-SSUEWAVS.js → chunk-JRXCSSSU.js} +19 -4
- package/dist/{chunk-DR75T7J3.js → chunk-L7OHKDOX.js} +9 -5
- package/dist/{chunk-FYPO4K7C.js → chunk-RIB3M6YA.js} +2 -2
- package/dist/{chunk-BU2AWPEN.js → chunk-ZU2ALUVQ.js} +3 -2
- package/dist/cli/chat.js +4 -4
- package/dist/cli/plugins.js +7 -7
- package/dist/cli/snapshot-warmup.js +4 -4
- package/dist/cli/upgrade.js +10 -7
- package/dist/{db-S3HYBLUS.js → db-SZVUU7RB.js} +4 -4
- package/dist/instrumentation.js +1 -1
- package/dist/nitro.js +4 -4
- package/dist/reporting/conversations.d.ts +2 -1
- package/dist/reporting.js +95 -30
- package/dist/{runner-IMQH6V2B.js → runner-DMP3IQNM.js} +27 -13
- package/package.json +6 -6
package/dist/reporting.js
CHANGED
|
@@ -6,33 +6,33 @@ import {
|
|
|
6
6
|
getConversationDetails,
|
|
7
7
|
getConversationDetailsForIds,
|
|
8
8
|
resolveSlackConversationContextFromThreadId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JRXCSSSU.js";
|
|
10
10
|
import {
|
|
11
11
|
buildSystemPrompt,
|
|
12
12
|
getAgentTurnSessionRecord,
|
|
13
13
|
listAgentTurnSessionSummariesForConversation,
|
|
14
14
|
loadActivityEntries
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ACJJJEGG.js";
|
|
16
16
|
import {
|
|
17
17
|
getPluginOperationalReports
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-2NFV5FMB.js";
|
|
19
|
+
import "./chunk-BRSQQRG6.js";
|
|
20
20
|
import {
|
|
21
21
|
getConversationStore
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-6I6HBOQM.js";
|
|
23
23
|
import "./chunk-G3E7SCME.js";
|
|
24
24
|
import {
|
|
25
25
|
getStateAdapter
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-GB5DFM4D.js";
|
|
27
|
+
import "./chunk-GGD6WK6V.js";
|
|
28
28
|
import {
|
|
29
29
|
unwrapCurrentInstruction
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ZU2ALUVQ.js";
|
|
31
31
|
import {
|
|
32
32
|
canExposeConversationPayload,
|
|
33
33
|
parseSlackThreadId,
|
|
34
34
|
resolveConversationPrivacy
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-L7OHKDOX.js";
|
|
36
36
|
import {
|
|
37
37
|
discoverSkills
|
|
38
38
|
} from "./chunk-64ACM6AP.js";
|
|
@@ -67,6 +67,12 @@ var REQUESTER_PROFILE_SAMPLE_LIMIT = 5e3;
|
|
|
67
67
|
var REQUESTER_PROFILE_RECENT_LIMIT = 25;
|
|
68
68
|
var REQUESTER_PROFILE_ACTIVITY_DAYS = 366;
|
|
69
69
|
var RECENT_CONVERSATION_STATS_WINDOW_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
70
|
+
function privateConversationLabel(slackConversation) {
|
|
71
|
+
if (!slackConversation) {
|
|
72
|
+
return PRIVATE_CONVERSATION_LABEL;
|
|
73
|
+
}
|
|
74
|
+
return slackConversation.visibility === "private" ? formatSlackConversationRedactedLabel(slackConversation) ?? PRIVATE_CONVERSATION_LABEL : PRIVATE_CONVERSATION_LABEL;
|
|
75
|
+
}
|
|
70
76
|
function conversationStore(options = {}) {
|
|
71
77
|
return options.conversationStore ?? getConversationStore();
|
|
72
78
|
}
|
|
@@ -122,17 +128,18 @@ function usageReport(usage) {
|
|
|
122
128
|
};
|
|
123
129
|
return Object.keys(report).length > 0 ? report : void 0;
|
|
124
130
|
}
|
|
125
|
-
function sessionReportFromSummary(summary, nowMs = Date.now(), details) {
|
|
131
|
+
function sessionReportFromSummary(summary, nowMs = Date.now(), details, visibility) {
|
|
126
132
|
const slackThread = parseSlackThreadId(summary.conversationId);
|
|
127
133
|
const privacy = resolveConversationPrivacy({
|
|
128
|
-
conversationId: summary.conversationId
|
|
134
|
+
conversationId: summary.conversationId,
|
|
135
|
+
visibility
|
|
129
136
|
});
|
|
130
137
|
const effectiveChannelName = details?.channelName ?? summary.channelName;
|
|
131
138
|
const slackConversation = resolveSlackConversationContextFromThreadId({
|
|
132
139
|
threadId: summary.conversationId,
|
|
133
140
|
channelName: effectiveChannelName
|
|
134
141
|
});
|
|
135
|
-
const privateLabel = privacy !== "public" ?
|
|
142
|
+
const privateLabel = privacy !== "public" ? privateConversationLabel(slackConversation) : void 0;
|
|
136
143
|
const channelName = privateLabel ?? effectiveChannelName;
|
|
137
144
|
const effectiveSurface = details?.originSurface ?? surfaceFromSummary(summary);
|
|
138
145
|
const displayTitle = privateLabel ?? details?.displayTitle ?? slackStatsLocationLabel({
|
|
@@ -157,6 +164,7 @@ function sessionReportFromSummary(summary, nowMs = Date.now(), details) {
|
|
|
157
164
|
...requesterIdentity ? { requesterIdentity } : {},
|
|
158
165
|
...slackThread ? { channel: slackThread.channelId } : {},
|
|
159
166
|
...channelName ? { channelName } : {},
|
|
167
|
+
...privateLabel ? { channelNameRedacted: true } : {},
|
|
160
168
|
...summary.traceId ? { traceId: summary.traceId } : {},
|
|
161
169
|
...sentryTraceUrl ? { sentryTraceUrl } : {}
|
|
162
170
|
};
|
|
@@ -185,8 +193,9 @@ function titleFromConversation(args) {
|
|
|
185
193
|
channelName: effectiveChannelName
|
|
186
194
|
});
|
|
187
195
|
const privateLabel = resolveConversationPrivacy({
|
|
188
|
-
conversationId: args.conversation.conversationId
|
|
189
|
-
|
|
196
|
+
conversationId: args.conversation.conversationId,
|
|
197
|
+
visibility: args.conversation.visibility
|
|
198
|
+
}) !== "public" ? privateConversationLabel(slackConversation) : void 0;
|
|
190
199
|
return privateLabel ?? args.details?.displayTitle ?? args.conversation.title ?? slackStatsLocationLabel({
|
|
191
200
|
channel: slackThread?.channelId,
|
|
192
201
|
channelName: effectiveChannelName
|
|
@@ -203,12 +212,24 @@ function channelNameFromConversation(conversation, details) {
|
|
|
203
212
|
channelName: effectiveChannelName
|
|
204
213
|
});
|
|
205
214
|
if (resolveConversationPrivacy({
|
|
206
|
-
conversationId: conversation.conversationId
|
|
215
|
+
conversationId: conversation.conversationId,
|
|
216
|
+
visibility: conversation.visibility
|
|
207
217
|
}) !== "public") {
|
|
208
|
-
return
|
|
218
|
+
return privateConversationLabel(slackConversation);
|
|
209
219
|
}
|
|
210
220
|
return effectiveChannelName;
|
|
211
221
|
}
|
|
222
|
+
function channelNameRedactedFromConversation(conversation, details) {
|
|
223
|
+
const effectiveChannelName = details?.channelName ?? conversation.channelName;
|
|
224
|
+
const slackThread = parseSlackThreadId(conversation.conversationId);
|
|
225
|
+
if (!effectiveChannelName && !slackThread) {
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
return resolveConversationPrivacy({
|
|
229
|
+
conversationId: conversation.conversationId,
|
|
230
|
+
visibility: conversation.visibility
|
|
231
|
+
}) !== "public";
|
|
232
|
+
}
|
|
212
233
|
function applyConversationIndexMetadata(args) {
|
|
213
234
|
const surface = args.details?.originSurface ?? (args.conversation.source ? surfaceFromSource(
|
|
214
235
|
args.conversation.source,
|
|
@@ -216,6 +237,10 @@ function applyConversationIndexMetadata(args) {
|
|
|
216
237
|
) : args.report.surface);
|
|
217
238
|
const slackThread = parseSlackThreadId(args.conversation.conversationId);
|
|
218
239
|
const effectiveChannelName = channelNameFromConversation(args.conversation, args.details) ?? args.report.channelName;
|
|
240
|
+
const channelNameRedacted = channelNameRedactedFromConversation(
|
|
241
|
+
args.conversation,
|
|
242
|
+
args.details
|
|
243
|
+
);
|
|
219
244
|
const requesterIdentity = requesterIdentityReport(args.details?.originRequester) ?? args.report.requesterIdentity ?? requesterIdentityReport(args.conversation.requester);
|
|
220
245
|
const status = statusFromConversation(
|
|
221
246
|
args.conversation,
|
|
@@ -226,8 +251,9 @@ function applyConversationIndexMetadata(args) {
|
|
|
226
251
|
reportTime(args.report.lastSeenAt) ?? 0,
|
|
227
252
|
args.conversation.lastActivityAtMs
|
|
228
253
|
);
|
|
254
|
+
const { channelNameRedacted: _oldChannelNameRedacted, ...report } = args.report;
|
|
229
255
|
return {
|
|
230
|
-
...
|
|
256
|
+
...report,
|
|
231
257
|
displayTitle: titleFromConversation({
|
|
232
258
|
conversation: args.conversation,
|
|
233
259
|
details: args.details,
|
|
@@ -238,7 +264,8 @@ function applyConversationIndexMetadata(args) {
|
|
|
238
264
|
surface,
|
|
239
265
|
...requesterIdentity ? { requesterIdentity } : {},
|
|
240
266
|
...slackThread ? { channel: slackThread.channelId } : {},
|
|
241
|
-
...effectiveChannelName ? { channelName: effectiveChannelName } : {}
|
|
267
|
+
...effectiveChannelName ? { channelName: effectiveChannelName } : {},
|
|
268
|
+
...channelNameRedacted ? { channelNameRedacted: true } : {}
|
|
242
269
|
};
|
|
243
270
|
}
|
|
244
271
|
function sessionReportFromConversation(conversation, nowMs, details) {
|
|
@@ -248,6 +275,10 @@ function sessionReportFromConversation(conversation, nowMs, details) {
|
|
|
248
275
|
);
|
|
249
276
|
const slackThread = parseSlackThreadId(conversation.conversationId);
|
|
250
277
|
const channelName = channelNameFromConversation(conversation, details);
|
|
278
|
+
const channelNameRedacted = channelNameRedactedFromConversation(
|
|
279
|
+
conversation,
|
|
280
|
+
details
|
|
281
|
+
);
|
|
251
282
|
return {
|
|
252
283
|
conversationId: conversation.conversationId,
|
|
253
284
|
cumulativeDurationMs: 0,
|
|
@@ -262,7 +293,8 @@ function sessionReportFromConversation(conversation, nowMs, details) {
|
|
|
262
293
|
surface,
|
|
263
294
|
...requesterIdentity ? { requesterIdentity } : {},
|
|
264
295
|
...slackThread ? { channel: slackThread.channelId } : {},
|
|
265
|
-
...channelName ? { channelName } : {}
|
|
296
|
+
...channelName ? { channelName } : {},
|
|
297
|
+
...channelNameRedacted ? { channelNameRedacted: true } : {}
|
|
266
298
|
};
|
|
267
299
|
}
|
|
268
300
|
function reportTime(value) {
|
|
@@ -334,6 +366,9 @@ function requesterLabel(requester) {
|
|
|
334
366
|
function slackStatsLocationLabel(input) {
|
|
335
367
|
const channelId = input.channel;
|
|
336
368
|
if (!channelId) return void 0;
|
|
369
|
+
if (input.channelNameRedacted && input.channelName) {
|
|
370
|
+
return input.channelName;
|
|
371
|
+
}
|
|
337
372
|
const name = input.channelName?.replace(/^#/, "");
|
|
338
373
|
if (channelId.startsWith("D")) {
|
|
339
374
|
return "Direct Message";
|
|
@@ -353,14 +388,14 @@ function surfaceFallbackLabel(surface) {
|
|
|
353
388
|
if (surface === "internal") return "Internal";
|
|
354
389
|
return "Conversation";
|
|
355
390
|
}
|
|
356
|
-
function displayTitleFromDetails(conversationId, details) {
|
|
391
|
+
function displayTitleFromDetails(conversationId, details, visibility) {
|
|
357
392
|
if (!details) return void 0;
|
|
358
393
|
const slackThread = parseSlackThreadId(conversationId);
|
|
359
394
|
const slackConversation = resolveSlackConversationContextFromThreadId({
|
|
360
395
|
threadId: conversationId,
|
|
361
396
|
channelName: details.channelName
|
|
362
397
|
});
|
|
363
|
-
const privateLabel = resolveConversationPrivacy({ conversationId }) !== "public" ?
|
|
398
|
+
const privateLabel = resolveConversationPrivacy({ conversationId, visibility }) !== "public" ? privateConversationLabel(slackConversation) : void 0;
|
|
364
399
|
return privateLabel ?? details.displayTitle ?? slackStatsLocationLabel({
|
|
365
400
|
channel: slackThread?.channelId,
|
|
366
401
|
channelName: details.channelName
|
|
@@ -769,9 +804,10 @@ async function readRequesterProfileReport(email, options = {}) {
|
|
|
769
804
|
windowStart: start.toISOString()
|
|
770
805
|
};
|
|
771
806
|
}
|
|
772
|
-
function canExposeConversationTranscript(summary) {
|
|
807
|
+
function canExposeConversationTranscript(summary, visibility) {
|
|
773
808
|
return canExposeConversationPayload({
|
|
774
|
-
conversationId: summary.conversationId
|
|
809
|
+
conversationId: summary.conversationId,
|
|
810
|
+
visibility
|
|
775
811
|
});
|
|
776
812
|
}
|
|
777
813
|
function textPart(text) {
|
|
@@ -1172,7 +1208,12 @@ async function reportsFromConversations(args) {
|
|
|
1172
1208
|
conversation,
|
|
1173
1209
|
details,
|
|
1174
1210
|
nowMs: args.nowMs,
|
|
1175
|
-
report: sessionReportFromSummary(
|
|
1211
|
+
report: sessionReportFromSummary(
|
|
1212
|
+
summary,
|
|
1213
|
+
args.nowMs,
|
|
1214
|
+
details,
|
|
1215
|
+
conversation.visibility
|
|
1216
|
+
)
|
|
1176
1217
|
})
|
|
1177
1218
|
) : [sessionReportFromConversation(conversation, args.nowMs, details)];
|
|
1178
1219
|
reports.set(conversation.conversationId, conversationReports);
|
|
@@ -1252,6 +1293,10 @@ async function listRecentConversationSummaries(options = {}) {
|
|
|
1252
1293
|
conversation.conversationId
|
|
1253
1294
|
);
|
|
1254
1295
|
const channelName = channelNameFromConversation(conversation, details);
|
|
1296
|
+
const channelNameRedacted = channelNameRedactedFromConversation(
|
|
1297
|
+
conversation,
|
|
1298
|
+
details
|
|
1299
|
+
);
|
|
1255
1300
|
const report = newestRun(
|
|
1256
1301
|
reportsByConversation.get(conversation.conversationId) ?? [
|
|
1257
1302
|
sessionReportFromConversation(conversation, nowMs, details)
|
|
@@ -1266,6 +1311,7 @@ async function listRecentConversationSummaries(options = {}) {
|
|
|
1266
1311
|
).toISOString(),
|
|
1267
1312
|
status: report.status,
|
|
1268
1313
|
...channelName ? { channelName } : {},
|
|
1314
|
+
...channelNameRedacted ? { channelNameRedacted: true } : {},
|
|
1269
1315
|
...conversation.source ? { source: conversation.source } : {}
|
|
1270
1316
|
};
|
|
1271
1317
|
});
|
|
@@ -1294,7 +1340,10 @@ async function readConversationReport(conversationId, options = {}) {
|
|
|
1294
1340
|
sessionRecord.piMessages,
|
|
1295
1341
|
sessionRecord.turnStartMessageIndex
|
|
1296
1342
|
) : { messages: [], startsAtRunBoundary: false };
|
|
1297
|
-
const canExposeTranscript = canExposeConversationTranscript(
|
|
1343
|
+
const canExposeTranscript = canExposeConversationTranscript(
|
|
1344
|
+
summary,
|
|
1345
|
+
conversation?.visibility
|
|
1346
|
+
);
|
|
1298
1347
|
const normalizedTranscript = scopedMessages.messages.map(
|
|
1299
1348
|
normalizeTranscriptMessage
|
|
1300
1349
|
);
|
|
@@ -1312,7 +1361,12 @@ async function readConversationReport(conversationId, options = {}) {
|
|
|
1312
1361
|
const traceId = summary.traceId ?? sessionRecord?.traceId ?? (canExposeTranscript ? traceIdFromTranscript(transcript) : void 0);
|
|
1313
1362
|
const sentryTraceUrl = traceId ? buildSentryTraceUrl(traceId) : void 0;
|
|
1314
1363
|
const report = {
|
|
1315
|
-
...sessionReportFromSummary(
|
|
1364
|
+
...sessionReportFromSummary(
|
|
1365
|
+
summary,
|
|
1366
|
+
nowMs,
|
|
1367
|
+
details,
|
|
1368
|
+
conversation?.visibility
|
|
1369
|
+
),
|
|
1316
1370
|
...traceId ? { traceId } : {},
|
|
1317
1371
|
...sentryTraceUrl ? { sentryTraceUrl } : {},
|
|
1318
1372
|
activity,
|
|
@@ -1345,7 +1399,11 @@ async function readConversationReport(conversationId, options = {}) {
|
|
|
1345
1399
|
}
|
|
1346
1400
|
];
|
|
1347
1401
|
const firstRun = effectiveRuns[0];
|
|
1348
|
-
const displayTitle = firstRun?.displayTitle ?? displayTitleFromDetails(
|
|
1402
|
+
const displayTitle = firstRun?.displayTitle ?? displayTitleFromDetails(
|
|
1403
|
+
conversationId,
|
|
1404
|
+
details,
|
|
1405
|
+
conversation?.visibility
|
|
1406
|
+
) ?? surfaceFallbackLabel(firstRun?.surface ?? "slack");
|
|
1349
1407
|
const sentryConversationUrl = buildSentryConversationUrl(conversationId);
|
|
1350
1408
|
return {
|
|
1351
1409
|
conversationId,
|
|
@@ -1355,8 +1413,12 @@ async function readConversationReport(conversationId, options = {}) {
|
|
|
1355
1413
|
runs: effectiveRuns
|
|
1356
1414
|
};
|
|
1357
1415
|
}
|
|
1358
|
-
async function readConversationSubagentTranscriptReport(conversationId, runId, subagentId) {
|
|
1359
|
-
const
|
|
1416
|
+
async function readConversationSubagentTranscriptReport(conversationId, runId, subagentId, options = {}) {
|
|
1417
|
+
const store = conversationStore(options);
|
|
1418
|
+
const [summaries, conversation] = await Promise.all([
|
|
1419
|
+
listAgentTurnSessionSummariesForConversation(conversationId),
|
|
1420
|
+
store.get({ conversationId })
|
|
1421
|
+
]);
|
|
1360
1422
|
const summary = summaries.find((candidate) => candidate.sessionId === runId);
|
|
1361
1423
|
if (!summary) {
|
|
1362
1424
|
return {
|
|
@@ -1392,7 +1454,10 @@ async function readConversationSubagentTranscriptReport(conversationId, runId, s
|
|
|
1392
1454
|
unavailableReason: "not_found"
|
|
1393
1455
|
};
|
|
1394
1456
|
}
|
|
1395
|
-
const canExposeTranscript = canExposeConversationTranscript(
|
|
1457
|
+
const canExposeTranscript = canExposeConversationTranscript(
|
|
1458
|
+
summary,
|
|
1459
|
+
conversation?.visibility
|
|
1460
|
+
);
|
|
1396
1461
|
const activity = subagentActivity(start, { canExposeTranscript, end });
|
|
1397
1462
|
const conversationFields = subagentConversationFields(start.transcriptRef);
|
|
1398
1463
|
if (!canExposeTranscript) {
|
|
@@ -2,6 +2,8 @@ import {
|
|
|
2
2
|
buildConversationContext,
|
|
3
3
|
buildDeliveredTurnStatePatch,
|
|
4
4
|
coerceThreadArtifactsState,
|
|
5
|
+
completeDeliveredTurn,
|
|
6
|
+
finalizeFailedTurnReply,
|
|
5
7
|
generateAssistantReply,
|
|
6
8
|
getPersistedSandboxState,
|
|
7
9
|
getPersistedThreadState,
|
|
@@ -14,27 +16,27 @@ import {
|
|
|
14
16
|
startActiveTurn,
|
|
15
17
|
updateConversationStats,
|
|
16
18
|
upsertConversationMessage
|
|
17
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-B6FQPS7A.js";
|
|
18
20
|
import {
|
|
19
21
|
coerceThreadConversationState
|
|
20
22
|
} from "./chunk-66NX7MNW.js";
|
|
21
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-RIB3M6YA.js";
|
|
22
24
|
import "./chunk-KNFROR7R.js";
|
|
23
25
|
import {
|
|
24
26
|
commitMessages,
|
|
25
27
|
loadProjection
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-ACJJJEGG.js";
|
|
29
|
+
import "./chunk-2NFV5FMB.js";
|
|
30
|
+
import "./chunk-BRSQQRG6.js";
|
|
31
|
+
import "./chunk-6I6HBOQM.js";
|
|
30
32
|
import "./chunk-G3E7SCME.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-GB5DFM4D.js";
|
|
34
|
+
import "./chunk-GGD6WK6V.js";
|
|
33
35
|
import {
|
|
34
36
|
stripRuntimeTurnContext,
|
|
35
37
|
trimTrailingAssistantMessages
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-ZU2ALUVQ.js";
|
|
39
|
+
import "./chunk-L7OHKDOX.js";
|
|
38
40
|
import "./chunk-64ACM6AP.js";
|
|
39
41
|
import "./chunk-BQ3ITJA6.js";
|
|
40
42
|
import "./chunk-IXTBFABZ.js";
|
|
@@ -219,6 +221,11 @@ async function runLocalAgentTurn(input, deps) {
|
|
|
219
221
|
await deps.onToolResult?.(result);
|
|
220
222
|
}
|
|
221
223
|
});
|
|
224
|
+
reply = finalizeFailedTurnReply({
|
|
225
|
+
reply,
|
|
226
|
+
logException,
|
|
227
|
+
context: { conversationId: input.conversationId }
|
|
228
|
+
});
|
|
222
229
|
completedState = buildDeliveredTurnStatePatch({
|
|
223
230
|
artifacts,
|
|
224
231
|
conversation,
|
|
@@ -260,11 +267,18 @@ async function runLocalAgentTurn(input, deps) {
|
|
|
260
267
|
sandboxId: reply.sandboxId ?? sandboxId,
|
|
261
268
|
sandboxDependencyProfileHash: reply.sandboxDependencyProfileHash ?? sandboxDependencyProfileHash
|
|
262
269
|
});
|
|
263
|
-
if (reply.piMessages) {
|
|
264
|
-
await
|
|
270
|
+
if (reply.piMessages?.length) {
|
|
271
|
+
await completeDeliveredTurn({
|
|
265
272
|
conversationId: input.conversationId,
|
|
273
|
+
sessionId: turnId,
|
|
274
|
+
sliceId: 1,
|
|
266
275
|
messages: reply.piMessages,
|
|
267
|
-
|
|
276
|
+
durationMs: reply.diagnostics.durationMs,
|
|
277
|
+
usage: reply.diagnostics.usage,
|
|
278
|
+
destination,
|
|
279
|
+
source,
|
|
280
|
+
surface: "internal",
|
|
281
|
+
logContext: { modelId: reply.diagnostics.modelId }
|
|
268
282
|
});
|
|
269
283
|
}
|
|
270
284
|
if (reply.diagnostics.outcome === "success") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.87.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"pg": "^8.16.3",
|
|
71
71
|
"yaml": "^2.9.0",
|
|
72
72
|
"zod": "^4.4.3",
|
|
73
|
-
"@sentry/junior-plugin-api": "0.
|
|
73
|
+
"@sentry/junior-plugin-api": "0.87.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@emnapi/core": "^1.10.0",
|
|
@@ -86,10 +86,10 @@
|
|
|
86
86
|
"typescript": "^6.0.3",
|
|
87
87
|
"vercel": "^54.4.0",
|
|
88
88
|
"vitest": "^4.1.7",
|
|
89
|
-
"@sentry/junior-
|
|
90
|
-
"@sentry/junior-
|
|
91
|
-
"@sentry/junior-
|
|
92
|
-
"@sentry/junior-
|
|
89
|
+
"@sentry/junior-memory": "0.87.0",
|
|
90
|
+
"@sentry/junior-github": "0.87.0",
|
|
91
|
+
"@sentry/junior-testing": "0.0.0",
|
|
92
|
+
"@sentry/junior-scheduler": "0.87.0"
|
|
93
93
|
},
|
|
94
94
|
"scripts": {
|
|
95
95
|
"build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",
|