@sentry/junior 0.82.0 → 0.83.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-5ZRILRC3.js → agent-hooks-EEWWWIS2.js} +5 -5
- package/dist/api-reference.d.ts +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +3798 -3269
- package/dist/chat/conversations/store.d.ts +1 -1
- package/dist/chat/plugins/agent-hooks.d.ts +3 -3
- package/dist/chat/resource-events/ingest.d.ts +23 -0
- package/dist/chat/resource-events/notification.d.ts +20 -0
- package/dist/chat/resource-events/store.d.ts +79 -0
- package/dist/chat/services/pending-auth.d.ts +5 -0
- package/dist/chat/slack/client.d.ts +2 -0
- package/dist/chat/task-execution/slack-work.d.ts +22 -0
- package/dist/chat/task-execution/state.d.ts +7 -1
- package/dist/chat/task-execution/store.d.ts +30 -8
- package/dist/chat/tools/resource-events.d.ts +19 -0
- package/dist/{chunk-TR2G37II.js → chunk-5C3RY6IZ.js} +6 -6
- package/dist/{chunk-IOBSRZK5.js → chunk-AK7T7XRQ.js} +1 -1
- package/dist/{chunk-LX5GBMEP.js → chunk-BFQ7IUTE.js} +1 -1
- package/dist/{chunk-YA2JCC7G.js → chunk-GK5CITCY.js} +4 -2
- package/dist/{chunk-4XHCVBXH.js → chunk-KZLRUQAA.js} +77 -12
- package/dist/{chunk-NC6LR6U4.js → chunk-LK53AHO5.js} +712 -163
- package/dist/{chunk-2AJ4TEKE.js → chunk-ORRLK22J.js} +24 -2
- package/dist/{chunk-PQ2U2AO3.js → chunk-QVMLDCVR.js} +10 -2
- package/dist/cli/chat.js +4 -4
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/upgrade.js +3 -3
- package/dist/{db-GQJKBX5W.js → db-TRIVS6BW.js} +2 -2
- package/dist/handlers/github-webhook/check-suite.d.ts +3 -0
- package/dist/handlers/github-webhook/pull-request-review.d.ts +3 -0
- package/dist/handlers/github-webhook/pull-request.d.ts +3 -0
- package/dist/handlers/github-webhook/resource.d.ts +10 -0
- package/dist/handlers/github-webhook.d.ts +15 -0
- package/dist/nitro.js +2 -2
- package/dist/reporting/conversations.d.ts +2 -2
- package/dist/reporting.d.ts +2 -2
- package/dist/reporting.js +16 -22
- package/dist/{runner-VRFJLG2M.js → runner-KS4XDMHF.js} +5 -5
- package/package.json +5 -5
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
parseDestination,
|
|
10
10
|
sameDestination
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KZLRUQAA.js";
|
|
12
12
|
import {
|
|
13
13
|
getChatConfig
|
|
14
14
|
} from "./chunk-ABRNFE3N.js";
|
|
@@ -68,7 +68,7 @@ function uniqueStrings(values) {
|
|
|
68
68
|
return [...new Set(values)];
|
|
69
69
|
}
|
|
70
70
|
function normalizeSource(value) {
|
|
71
|
-
if (value === "api" || value === "internal" || value === "local" || value === "plugin" || value === "scheduler" || value === "slack") {
|
|
71
|
+
if (value === "api" || value === "internal" || value === "local" || value === "plugin" || value === "resource_event" || value === "scheduler" || value === "slack") {
|
|
72
72
|
return value;
|
|
73
73
|
}
|
|
74
74
|
return void 0;
|
|
@@ -801,6 +801,27 @@ async function markConversationWorkEnqueued(args) {
|
|
|
801
801
|
);
|
|
802
802
|
});
|
|
803
803
|
}
|
|
804
|
+
async function clearConsumedConversationWake(args) {
|
|
805
|
+
const nowMs = args.nowMs ?? now();
|
|
806
|
+
return await withConversationMutation(args, async (state) => {
|
|
807
|
+
const current = await readConversation(state, args.conversationId);
|
|
808
|
+
if (!current || hasRunnableWork(current) || current.execution.lastEnqueuedAtMs === void 0) {
|
|
809
|
+
return false;
|
|
810
|
+
}
|
|
811
|
+
await writeConversation(
|
|
812
|
+
state,
|
|
813
|
+
withExecutionUpdate(
|
|
814
|
+
current,
|
|
815
|
+
{
|
|
816
|
+
...current.execution,
|
|
817
|
+
lastEnqueuedAtMs: void 0
|
|
818
|
+
},
|
|
819
|
+
nowMs
|
|
820
|
+
)
|
|
821
|
+
);
|
|
822
|
+
return true;
|
|
823
|
+
});
|
|
824
|
+
}
|
|
804
825
|
async function startConversationWork(args) {
|
|
805
826
|
const nowMs = args.nowMs ?? now();
|
|
806
827
|
return await withConversationMutation(args, async (state) => {
|
|
@@ -1108,6 +1129,7 @@ export {
|
|
|
1108
1129
|
recordConversationActivity,
|
|
1109
1130
|
recordConversationExecution,
|
|
1110
1131
|
markConversationWorkEnqueued,
|
|
1132
|
+
clearConsumedConversationWake,
|
|
1111
1133
|
startConversationWork,
|
|
1112
1134
|
checkInConversationWork,
|
|
1113
1135
|
drainConversationMailbox,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseDestination,
|
|
3
3
|
sameDestination
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KZLRUQAA.js";
|
|
5
5
|
import {
|
|
6
6
|
getChatConfig
|
|
7
7
|
} from "./chunk-ABRNFE3N.js";
|
|
@@ -371,7 +371,7 @@ function requiredMsFromDate(value) {
|
|
|
371
371
|
return ms;
|
|
372
372
|
}
|
|
373
373
|
function sourceFromValue(value) {
|
|
374
|
-
if (value === "api" || value === "internal" || value === "local" || value === "plugin" || value === "scheduler" || value === "slack") {
|
|
374
|
+
if (value === "api" || value === "internal" || value === "local" || value === "plugin" || value === "resource_event" || value === "scheduler" || value === "slack") {
|
|
375
375
|
return value;
|
|
376
376
|
}
|
|
377
377
|
return void 0;
|
|
@@ -408,6 +408,14 @@ function systemIdentityFromSource(source) {
|
|
|
408
408
|
displayName: "Local CLI"
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
|
+
if (source === "resource_event") {
|
|
412
|
+
return {
|
|
413
|
+
kind: "system",
|
|
414
|
+
provider: "junior",
|
|
415
|
+
providerSubjectId: "resource-event",
|
|
416
|
+
displayName: "Resource Event"
|
|
417
|
+
};
|
|
418
|
+
}
|
|
411
419
|
return void 0;
|
|
412
420
|
}
|
|
413
421
|
function actorIdentityForConversation(conversation) {
|
package/dist/cli/chat.js
CHANGED
|
@@ -130,10 +130,10 @@ async function configureLocalChatPlugins(pluginSet) {
|
|
|
130
130
|
databaseModule
|
|
131
131
|
] = await Promise.all([
|
|
132
132
|
import("../plugins-PZMDS7AT.js"),
|
|
133
|
-
import("../agent-hooks-
|
|
133
|
+
import("../agent-hooks-EEWWWIS2.js"),
|
|
134
134
|
import("../catalog-runtime-IVWRAPSI.js"),
|
|
135
135
|
import("../validation-TN6HMZAD.js"),
|
|
136
|
-
import("../db-
|
|
136
|
+
import("../db-TRIVS6BW.js")
|
|
137
137
|
]);
|
|
138
138
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
139
139
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -195,7 +195,7 @@ async function runPrompt(options, io, pluginSet) {
|
|
|
195
195
|
defaultStateAdapterForLocalChat();
|
|
196
196
|
await configureLocalChatPlugins(pluginSet);
|
|
197
197
|
const conversationId = newRunConversationId();
|
|
198
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
198
|
+
const { runLocalAgentTurn } = await import("../runner-KS4XDMHF.js");
|
|
199
199
|
const result = await runLocalAgentTurn(
|
|
200
200
|
{
|
|
201
201
|
conversationId,
|
|
@@ -219,7 +219,7 @@ async function runInteractive(io, pluginSet) {
|
|
|
219
219
|
defaultStateAdapterForLocalChat();
|
|
220
220
|
await configureLocalChatPlugins(pluginSet);
|
|
221
221
|
const conversationId = newRunConversationId();
|
|
222
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
222
|
+
const { runLocalAgentTurn } = await import("../runner-KS4XDMHF.js");
|
|
223
223
|
const rl = readline.createInterface({
|
|
224
224
|
input: io.input,
|
|
225
225
|
output: io.output,
|
package/dist/cli/plugins.js
CHANGED
|
@@ -10,16 +10,16 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
setPlugins,
|
|
12
12
|
validatePlugins
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-5C3RY6IZ.js";
|
|
14
14
|
import {
|
|
15
15
|
createPluginLogger
|
|
16
16
|
} from "../chunk-GUO4EE7L.js";
|
|
17
17
|
import {
|
|
18
18
|
getDb
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-QVMLDCVR.js";
|
|
20
20
|
import "../chunk-G3E7SCME.js";
|
|
21
21
|
import "../chunk-X2FL5ZH5.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-KZLRUQAA.js";
|
|
23
23
|
import "../chunk-ABRNFE3N.js";
|
|
24
24
|
import "../chunk-DR75T7J3.js";
|
|
25
25
|
import {
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
recordConversationActivity,
|
|
5
5
|
recordConversationExecution,
|
|
6
6
|
requestConversationWork
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-ORRLK22J.js";
|
|
8
8
|
import {
|
|
9
9
|
JUNIOR_THREAD_STATE_TTL_MS,
|
|
10
10
|
coerceThreadConversationState
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
createJuniorSqlExecutor,
|
|
24
24
|
createSqlStore,
|
|
25
25
|
getDb
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-QVMLDCVR.js";
|
|
27
27
|
import {
|
|
28
28
|
disconnectStateAdapter,
|
|
29
29
|
getConnectedStateContext
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
import {
|
|
32
32
|
parseDestination,
|
|
33
33
|
sameDestination
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-KZLRUQAA.js";
|
|
35
35
|
import {
|
|
36
36
|
getChatConfig
|
|
37
37
|
} from "../chunk-ABRNFE3N.js";
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
closeDb,
|
|
3
3
|
getConversationStore,
|
|
4
4
|
getDb
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-QVMLDCVR.js";
|
|
6
|
+
import "./chunk-KZLRUQAA.js";
|
|
7
7
|
import "./chunk-ABRNFE3N.js";
|
|
8
8
|
import "./chunk-DR75T7J3.js";
|
|
9
9
|
import "./chunk-ZPCGQRFJ.js";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IngestResourceEventInput } from "@/chat/resource-events/ingest";
|
|
2
|
+
/** Normalize GitHub `check_suite` webhooks for subscribed PR check outcomes. */
|
|
3
|
+
export declare function normalizeGitHubCheckSuiteEvents(deliveryId: string, body: unknown): IngestResourceEventInput[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IngestResourceEventInput } from "@/chat/resource-events/ingest";
|
|
2
|
+
/** Normalize GitHub `pull_request_review` webhooks for subscribed review outcomes. */
|
|
3
|
+
export declare function normalizeGitHubPullRequestReviewEvent(deliveryId: string, body: unknown): IngestResourceEventInput | undefined;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IngestResourceEventInput } from "@/chat/resource-events/ingest";
|
|
2
|
+
/** Normalize GitHub `pull_request` webhooks for subscribed PR state changes. */
|
|
3
|
+
export declare function normalizeGitHubPullRequestEvent(deliveryId: string, body: unknown): IngestResourceEventInput | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Build the normalized resource identity for a GitHub pull request. */
|
|
2
|
+
export declare function gitHubPullRequestResource(input: {
|
|
3
|
+
pullRequestNumber: number;
|
|
4
|
+
repositoryFullName: string;
|
|
5
|
+
}): {
|
|
6
|
+
label: string;
|
|
7
|
+
resourceRef: string;
|
|
8
|
+
};
|
|
9
|
+
/** Build a stable provider retry key for one normalized GitHub event. */
|
|
10
|
+
export declare function gitHubEventKey(deliveryId: string, eventType: string): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StateAdapter } from "chat";
|
|
2
|
+
import { type IngestResourceEventInput } from "@/chat/resource-events/ingest";
|
|
3
|
+
import type { ConversationWorkQueue } from "@/chat/task-execution/queue";
|
|
4
|
+
export interface GitHubWebhookHandlerOptions {
|
|
5
|
+
queue: ConversationWorkQueue | (() => ConversationWorkQueue);
|
|
6
|
+
state?: StateAdapter | (() => StateAdapter | undefined);
|
|
7
|
+
}
|
|
8
|
+
/** Normalize a verified GitHub webhook delivery into resource events. */
|
|
9
|
+
export declare function normalizeGitHubResourceEvents(args: {
|
|
10
|
+
body: unknown;
|
|
11
|
+
deliveryId: string;
|
|
12
|
+
eventName: string;
|
|
13
|
+
}): IngestResourceEventInput[];
|
|
14
|
+
/** Handle signed GitHub webhooks for resource event subscriptions. */
|
|
15
|
+
export declare function POST(request: Request, options: GitHubWebhookHandlerOptions): Promise<Response>;
|
package/dist/nitro.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveConversationWorkQueueTopic
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AK7T7XRQ.js";
|
|
4
4
|
import {
|
|
5
5
|
PLUGIN_TASK_QUEUE_TOPIC
|
|
6
6
|
} from "./chunk-KNFROR7R.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
pluginCatalogConfigFromPluginSet,
|
|
9
9
|
pluginRuntimeRegistrationsFromPluginSet
|
|
10
10
|
} from "./chunk-SG5WAA7H.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-KZLRUQAA.js";
|
|
12
12
|
import "./chunk-ABRNFE3N.js";
|
|
13
13
|
import "./chunk-DR75T7J3.js";
|
|
14
14
|
import {
|
|
@@ -35,7 +35,6 @@ export interface ConversationSummaryReport {
|
|
|
35
35
|
requesterIdentity?: RequesterIdentity;
|
|
36
36
|
channel?: string;
|
|
37
37
|
channelName?: string;
|
|
38
|
-
sentryConversationUrl?: string;
|
|
39
38
|
sentryTraceUrl?: string;
|
|
40
39
|
traceId?: string;
|
|
41
40
|
}
|
|
@@ -109,10 +108,11 @@ export interface ConversationReport {
|
|
|
109
108
|
/** Always-populated display title, computed the same way as per-run reports. */
|
|
110
109
|
displayTitle: string;
|
|
111
110
|
generatedAt: string;
|
|
111
|
+
sentryConversationUrl?: string;
|
|
112
112
|
runs: ConversationRunReport[];
|
|
113
113
|
}
|
|
114
114
|
export interface ConversationFeed {
|
|
115
|
-
|
|
115
|
+
conversations: ConversationSummaryReport[];
|
|
116
116
|
source: "conversation_index";
|
|
117
117
|
generatedAt: string;
|
|
118
118
|
}
|
package/dist/reporting.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export interface JuniorReporting {
|
|
|
49
49
|
getPlugins(): Promise<PluginReport[]>;
|
|
50
50
|
/** Read discovered skill names for reporting consumers. */
|
|
51
51
|
getSkills(): Promise<SkillReport[]>;
|
|
52
|
-
/**
|
|
53
|
-
|
|
52
|
+
/** List recent conversation summaries for reporting consumers. */
|
|
53
|
+
listConversations(): Promise<ConversationFeed>;
|
|
54
54
|
/** Read aggregate conversation stats for reporting consumers. */
|
|
55
55
|
getConversationStats?(): Promise<ConversationStatsReport>;
|
|
56
56
|
/** Read recent conversation summaries without transcript payloads. */
|
package/dist/reporting.js
CHANGED
|
@@ -6,23 +6,23 @@ import {
|
|
|
6
6
|
getConversationDetails,
|
|
7
7
|
getConversationDetailsForIds,
|
|
8
8
|
resolveSlackConversationContextFromThreadId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BFQ7IUTE.js";
|
|
10
10
|
import {
|
|
11
11
|
buildSystemPrompt,
|
|
12
12
|
getAgentTurnSessionRecord,
|
|
13
13
|
listAgentTurnSessionSummariesForConversation,
|
|
14
14
|
loadActivityEntries
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GK5CITCY.js";
|
|
16
16
|
import {
|
|
17
17
|
getPluginOperationalReports
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5C3RY6IZ.js";
|
|
19
19
|
import "./chunk-GUO4EE7L.js";
|
|
20
20
|
import {
|
|
21
21
|
getConversationStore
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QVMLDCVR.js";
|
|
23
23
|
import "./chunk-G3E7SCME.js";
|
|
24
24
|
import "./chunk-X2FL5ZH5.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-KZLRUQAA.js";
|
|
26
26
|
import "./chunk-ABRNFE3N.js";
|
|
27
27
|
import {
|
|
28
28
|
canExposeConversationPayload,
|
|
@@ -132,9 +132,6 @@ function sessionReportFromSummary(summary, nowMs = Date.now(), details) {
|
|
|
132
132
|
channelName: effectiveChannelName
|
|
133
133
|
}) ?? surfaceFallbackLabel(effectiveSurface);
|
|
134
134
|
const requesterIdentity = requesterIdentityReport(details?.originRequester) ?? sessionRequesterIdentityReport(summary.requester);
|
|
135
|
-
const sentryConversationUrl = buildSentryConversationUrl(
|
|
136
|
-
summary.conversationId
|
|
137
|
-
);
|
|
138
135
|
const sentryTraceUrl = summary.traceId ? buildSentryTraceUrl(summary.traceId) : void 0;
|
|
139
136
|
const cumulativeUsage = usageReport(summary.cumulativeUsage);
|
|
140
137
|
return {
|
|
@@ -152,7 +149,6 @@ function sessionReportFromSummary(summary, nowMs = Date.now(), details) {
|
|
|
152
149
|
...requesterIdentity ? { requesterIdentity } : {},
|
|
153
150
|
...slackThread ? { channel: slackThread.channelId } : {},
|
|
154
151
|
...channelName ? { channelName } : {},
|
|
155
|
-
...sentryConversationUrl ? { sentryConversationUrl } : {},
|
|
156
152
|
...summary.traceId ? { traceId: summary.traceId } : {},
|
|
157
153
|
...sentryTraceUrl ? { sentryTraceUrl } : {}
|
|
158
154
|
};
|
|
@@ -239,9 +235,6 @@ function applyConversationIndexMetadata(args) {
|
|
|
239
235
|
}
|
|
240
236
|
function sessionReportFromConversation(conversation, nowMs, details) {
|
|
241
237
|
const surface = details?.originSurface ?? surfaceFromSource(conversation.source, conversation.conversationId);
|
|
242
|
-
const sentryConversationUrl = buildSentryConversationUrl(
|
|
243
|
-
conversation.conversationId
|
|
244
|
-
);
|
|
245
238
|
const requesterIdentity = requesterIdentityReport(
|
|
246
239
|
details?.originRequester ?? conversation.requester
|
|
247
240
|
);
|
|
@@ -261,8 +254,7 @@ function sessionReportFromConversation(conversation, nowMs, details) {
|
|
|
261
254
|
surface,
|
|
262
255
|
...requesterIdentity ? { requesterIdentity } : {},
|
|
263
256
|
...slackThread ? { channel: slackThread.channelId } : {},
|
|
264
|
-
...channelName ? { channelName } : {}
|
|
265
|
-
...sentryConversationUrl ? { sentryConversationUrl } : {}
|
|
257
|
+
...channelName ? { channelName } : {}
|
|
266
258
|
};
|
|
267
259
|
}
|
|
268
260
|
function reportTime(value) {
|
|
@@ -405,10 +397,10 @@ function newestRun(runs) {
|
|
|
405
397
|
function recentConversationGroups(args) {
|
|
406
398
|
const startMs = args.nowMs - RECENT_CONVERSATION_STATS_WINDOW_MS;
|
|
407
399
|
const groups = /* @__PURE__ */ new Map();
|
|
408
|
-
for (const
|
|
409
|
-
groups.set(
|
|
410
|
-
...groups.get(
|
|
411
|
-
|
|
400
|
+
for (const summary of args.summaries) {
|
|
401
|
+
groups.set(summary.conversationId, [
|
|
402
|
+
...groups.get(summary.conversationId) ?? [],
|
|
403
|
+
summary
|
|
412
404
|
]);
|
|
413
405
|
}
|
|
414
406
|
return [...groups.values()].map(
|
|
@@ -858,7 +850,7 @@ async function readConversationFeed(options = {}) {
|
|
|
858
850
|
return {
|
|
859
851
|
source: "conversation_index",
|
|
860
852
|
generatedAt: new Date(nowMs).toISOString(),
|
|
861
|
-
|
|
853
|
+
conversations: conversations.map(
|
|
862
854
|
(conversation) => newestRun(
|
|
863
855
|
reportsByConversation.get(conversation.conversationId) ?? [
|
|
864
856
|
sessionReportFromConversation(
|
|
@@ -880,7 +872,7 @@ async function readConversationStatsReport(options = {}) {
|
|
|
880
872
|
});
|
|
881
873
|
const truncated = conversations.length > CONVERSATION_STATS_LIMIT;
|
|
882
874
|
const sampledConversations = conversations.slice(0, CONVERSATION_STATS_LIMIT);
|
|
883
|
-
const
|
|
875
|
+
const summaries = sampledConversations.map(
|
|
884
876
|
(conversation) => sessionReportFromConversation(conversation, nowMs)
|
|
885
877
|
);
|
|
886
878
|
return buildConversationStatsReport({
|
|
@@ -888,7 +880,7 @@ async function readConversationStatsReport(options = {}) {
|
|
|
888
880
|
nowMs,
|
|
889
881
|
sampleLimit: CONVERSATION_STATS_LIMIT,
|
|
890
882
|
sampleSize: sampledConversations.length,
|
|
891
|
-
|
|
883
|
+
summaries,
|
|
892
884
|
truncated
|
|
893
885
|
});
|
|
894
886
|
}
|
|
@@ -1008,10 +1000,12 @@ async function readConversationReport(conversationId, options = {}) {
|
|
|
1008
1000
|
];
|
|
1009
1001
|
const firstRun = effectiveRuns[0];
|
|
1010
1002
|
const displayTitle = firstRun?.displayTitle ?? displayTitleFromDetails(conversationId, details) ?? surfaceFallbackLabel(firstRun?.surface ?? "slack");
|
|
1003
|
+
const sentryConversationUrl = buildSentryConversationUrl(conversationId);
|
|
1011
1004
|
return {
|
|
1012
1005
|
conversationId,
|
|
1013
1006
|
displayTitle,
|
|
1014
1007
|
generatedAt: new Date(nowMs).toISOString(),
|
|
1008
|
+
...sentryConversationUrl ? { sentryConversationUrl } : {},
|
|
1015
1009
|
runs: effectiveRuns
|
|
1016
1010
|
};
|
|
1017
1011
|
}
|
|
@@ -1068,7 +1062,7 @@ function createJuniorReporting() {
|
|
|
1068
1062
|
},
|
|
1069
1063
|
getPlugins: readPlugins,
|
|
1070
1064
|
getSkills: readSkills,
|
|
1071
|
-
|
|
1065
|
+
listConversations: () => readConversationFeed({ conversationStore: conversationStore2 }),
|
|
1072
1066
|
getConversationStats: () => readConversationStatsReport({ conversationStore: conversationStore2 }),
|
|
1073
1067
|
listRecentConversations: listRecent,
|
|
1074
1068
|
getPluginOperationalReports: async () => {
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
startActiveTurn,
|
|
15
15
|
updateConversationStats,
|
|
16
16
|
upsertConversationMessage
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LK53AHO5.js";
|
|
18
18
|
import {
|
|
19
19
|
coerceThreadConversationState
|
|
20
20
|
} from "./chunk-66NX7MNW.js";
|
|
@@ -23,13 +23,13 @@ import "./chunk-KNFROR7R.js";
|
|
|
23
23
|
import {
|
|
24
24
|
commitMessages,
|
|
25
25
|
loadProjection
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-GK5CITCY.js";
|
|
27
|
+
import "./chunk-5C3RY6IZ.js";
|
|
28
28
|
import "./chunk-GUO4EE7L.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-QVMLDCVR.js";
|
|
30
30
|
import "./chunk-G3E7SCME.js";
|
|
31
31
|
import "./chunk-X2FL5ZH5.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-KZLRUQAA.js";
|
|
33
33
|
import {
|
|
34
34
|
stripRuntimeTurnContext,
|
|
35
35
|
trimTrailingAssistantMessages
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.83.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.83.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@emnapi/core": "^1.10.0",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
"typescript": "^6.0.3",
|
|
87
87
|
"vercel": "^54.4.0",
|
|
88
88
|
"vitest": "^4.1.7",
|
|
89
|
-
"@sentry/junior-github": "0.
|
|
90
|
-
"@sentry/junior-memory": "0.
|
|
91
|
-
"@sentry/junior-scheduler": "0.
|
|
89
|
+
"@sentry/junior-github": "0.83.0",
|
|
90
|
+
"@sentry/junior-memory": "0.83.0",
|
|
91
|
+
"@sentry/junior-scheduler": "0.83.0",
|
|
92
92
|
"@sentry/junior-testing": "0.0.0"
|
|
93
93
|
},
|
|
94
94
|
"scripts": {
|