@sentry/junior 0.95.0 → 0.96.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-FTQ5EGPO.js → agent-hooks-5URSMY3O.js} +6 -6
- package/dist/api/people/list.js +5 -5
- package/dist/api/people/profile.js +5 -5
- package/dist/api-reference.d.ts +1 -1
- package/dist/app.js +24 -20
- package/dist/{catalog-runtime-2D7IVKUT.js → catalog-runtime-MSMAYYIK.js} +3 -3
- package/dist/chat/logging.d.ts +2 -2
- package/dist/chat/plugins/auth/oauth-request.d.ts +2 -0
- package/dist/chat/resource-events/notification.d.ts +2 -0
- package/dist/chat/runtime/agent-run-outcome.d.ts +3 -0
- package/dist/chat/sentry.d.ts +1 -1
- package/dist/chat/state/turn-session.d.ts +3 -1
- package/dist/chat/usage.d.ts +27 -13
- package/dist/{chunk-E3E2XNCN.js → chunk-2NAZZPPS.js} +2 -2
- package/dist/{chunk-CRRBJ3JP.js → chunk-5C6XTTFI.js} +4 -4
- package/dist/{chunk-3DA7X2U3.js → chunk-6GWA276C.js} +15 -0
- package/dist/{chunk-EKNJM5IG.js → chunk-AAZXTVJT.js} +2 -2
- package/dist/{chunk-WCMQJE4F.js → chunk-BYZWPRJA.js} +3 -3
- package/dist/{chunk-HZNJLKKI.js → chunk-DZENG5ML.js} +1 -1
- package/dist/{chunk-5XMNOD3S.js → chunk-GQ3GK22G.js} +3 -3
- package/dist/{chunk-WPOJ443W.js → chunk-I35CTGPO.js} +58 -6
- package/dist/{chunk-HCXXB35T.js → chunk-IYM2SIVG.js} +21 -19
- package/dist/{chunk-GVOUCI2O.js → chunk-L7CDEIVJ.js} +12 -4
- package/dist/{chunk-WAGQ377B.js → chunk-MNTINMWR.js} +170 -29
- package/dist/{chunk-XX4N4E6C.js → chunk-P3YFQLEN.js} +8 -8
- package/dist/{chunk-HDTO3A74.js → chunk-PMNN6ST4.js} +2 -2
- package/dist/{chunk-6ONME5IG.js → chunk-RITD7E5L.js} +2 -2
- package/dist/{chunk-NSCHU54X.js → chunk-S5KZ5LPG.js} +4 -4
- package/dist/{chunk-KDPCGVIT.js → chunk-UKHVMPX5.js} +5 -61
- package/dist/{chunk-N4RNJ32C.js → chunk-WM6KHPBQ.js} +1 -1
- package/dist/{chunk-AYP4ERVZ.js → chunk-YDT7SNCN.js} +1 -1
- package/dist/{chunk-GUE7HTNR.js → chunk-YDVEH3SB.js} +1 -1
- package/dist/cli/chat.js +19 -19
- package/dist/cli/check.js +4 -4
- package/dist/cli/main.js +1 -1
- package/dist/cli/plugins.js +8 -8
- package/dist/cli/snapshot-warmup.js +5 -5
- package/dist/cli/upgrade.js +8 -8
- package/dist/{db-W55B74OP.js → db-2D6RMG67.js} +4 -4
- package/dist/instrumentation.js +1 -1
- package/dist/{legacy-import-ZPLGLAFD.js → legacy-import-VZ2MEGP7.js} +5 -5
- package/dist/reporting/conversations/summaries.d.ts +3 -0
- package/dist/reporting/conversations/types.d.ts +13 -0
- package/dist/reporting.d.ts +1 -1
- package/dist/reporting.js +113 -23
- package/dist/{runner-OOSBDYRK.js → runner-JZBRQP4F.js} +10 -10
- package/dist/{sentry-EGFOV3DH.js → sentry-JMWTS32N.js} +11 -1
- package/dist/{validation-QCGRFRFZ.js → validation-6XOOQGME.js} +4 -4
- package/package.json +7 -7
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createPluginLogger,
|
|
3
3
|
createPluginState
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2NAZZPPS.js";
|
|
5
5
|
import {
|
|
6
6
|
SANDBOX_WORKSPACE_ROOT,
|
|
7
7
|
sleep
|
|
8
8
|
} from "./chunk-CZEX6KIQ.js";
|
|
9
9
|
import {
|
|
10
10
|
getDb
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RITD7E5L.js";
|
|
12
12
|
import {
|
|
13
13
|
botConfig,
|
|
14
14
|
completeObject,
|
|
15
15
|
embedTexts,
|
|
16
16
|
getSlackBotToken
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YDVEH3SB.js";
|
|
18
18
|
import {
|
|
19
19
|
isActorUserId,
|
|
20
20
|
logInfo,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
setSpanAttributes,
|
|
24
24
|
setSpanStatus,
|
|
25
25
|
withSpan
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-I35CTGPO.js";
|
|
27
27
|
import {
|
|
28
28
|
parseSlackChannelReferenceId,
|
|
29
29
|
parseSlackMessageTs,
|
|
@@ -3,13 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-RAIB6WSG.js";
|
|
4
4
|
import {
|
|
5
5
|
abandonAgentTurnSessionRecord,
|
|
6
|
+
addAgentTurnUsage,
|
|
6
7
|
getAgentTurnSessionRecord,
|
|
7
8
|
upsertAgentTurnSessionRecord
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MNTINMWR.js";
|
|
9
10
|
import {
|
|
10
11
|
JUNIOR_THREAD_STATE_TTL_MS,
|
|
11
12
|
persistConversationMessages
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5C6XTTFI.js";
|
|
13
14
|
import {
|
|
14
15
|
sleep
|
|
15
16
|
} from "./chunk-CZEX6KIQ.js";
|
|
@@ -17,11 +18,11 @@ import {
|
|
|
17
18
|
getPiMessageRole,
|
|
18
19
|
getStateAdapter,
|
|
19
20
|
trimTrailingAssistantMessages
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YDVEH3SB.js";
|
|
21
22
|
import {
|
|
22
23
|
getActiveTraceId,
|
|
23
24
|
logException
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-I35CTGPO.js";
|
|
25
26
|
import {
|
|
26
27
|
isRecord,
|
|
27
28
|
toOptionalString
|
|
@@ -93,61 +94,6 @@ function markTurnFailed(args) {
|
|
|
93
94
|
args.updateConversationStats(args.conversation);
|
|
94
95
|
}
|
|
95
96
|
|
|
96
|
-
// src/chat/usage.ts
|
|
97
|
-
var COMPONENT_USAGE_FIELDS = [
|
|
98
|
-
"inputTokens",
|
|
99
|
-
"outputTokens",
|
|
100
|
-
"cachedInputTokens",
|
|
101
|
-
"cacheCreationTokens"
|
|
102
|
-
];
|
|
103
|
-
function hasAgentTurnUsage(usage) {
|
|
104
|
-
return Boolean(
|
|
105
|
-
usage && Object.values(usage).some(
|
|
106
|
-
(value) => typeof value === "number" && Number.isFinite(value)
|
|
107
|
-
)
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
function getFiniteCount(value) {
|
|
111
|
-
return typeof value === "number" && Number.isFinite(value) ? Math.max(0, Math.floor(value)) : void 0;
|
|
112
|
-
}
|
|
113
|
-
function getComponentTotal(usage) {
|
|
114
|
-
let total;
|
|
115
|
-
for (const field of COMPONENT_USAGE_FIELDS) {
|
|
116
|
-
const value = getFiniteCount(usage[field]);
|
|
117
|
-
if (value === void 0) continue;
|
|
118
|
-
total = (total ?? 0) + value;
|
|
119
|
-
}
|
|
120
|
-
return total;
|
|
121
|
-
}
|
|
122
|
-
function addAgentTurnUsage(...usages) {
|
|
123
|
-
const components = {};
|
|
124
|
-
let componentTotal;
|
|
125
|
-
let totalOnlyTokens;
|
|
126
|
-
for (const usage of usages) {
|
|
127
|
-
if (!usage) continue;
|
|
128
|
-
const usageComponentTotal = getComponentTotal(usage);
|
|
129
|
-
if (usageComponentTotal !== void 0) {
|
|
130
|
-
componentTotal = (componentTotal ?? 0) + usageComponentTotal;
|
|
131
|
-
for (const field of COMPONENT_USAGE_FIELDS) {
|
|
132
|
-
const value = getFiniteCount(usage[field]);
|
|
133
|
-
if (value === void 0) continue;
|
|
134
|
-
components[field] = (components[field] ?? 0) + value;
|
|
135
|
-
}
|
|
136
|
-
continue;
|
|
137
|
-
}
|
|
138
|
-
const totalTokens = getFiniteCount(usage.totalTokens);
|
|
139
|
-
if (totalTokens !== void 0) {
|
|
140
|
-
totalOnlyTokens = (totalOnlyTokens ?? 0) + totalTokens;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
if (totalOnlyTokens !== void 0) {
|
|
144
|
-
return {
|
|
145
|
-
totalTokens: totalOnlyTokens + (componentTotal ?? 0)
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
return hasAgentTurnUsage(components) ? components : void 0;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
97
|
// src/chat/services/persist-retry.ts
|
|
152
98
|
var PERSIST_ATTEMPTS = 3;
|
|
153
99
|
async function persistWithRetry(persist) {
|
|
@@ -993,8 +939,6 @@ export {
|
|
|
993
939
|
markTurnClosed,
|
|
994
940
|
markTurnCompleted,
|
|
995
941
|
markTurnFailed,
|
|
996
|
-
hasAgentTurnUsage,
|
|
997
|
-
addAgentTurnUsage,
|
|
998
942
|
persistWithRetry,
|
|
999
943
|
loadTurnSessionRecord,
|
|
1000
944
|
persistRunningSessionRecord,
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAgentRunner,
|
|
3
3
|
executeAgentRun
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-IYM2SIVG.js";
|
|
5
|
+
import "../chunk-UKHVMPX5.js";
|
|
6
6
|
import "../chunk-RAIB6WSG.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-BYZWPRJA.js";
|
|
8
8
|
import "../chunk-CM5EZD5F.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-WM6KHPBQ.js";
|
|
10
|
+
import "../chunk-MNTINMWR.js";
|
|
11
|
+
import "../chunk-5C6XTTFI.js";
|
|
12
12
|
import {
|
|
13
13
|
loadAppPluginSet
|
|
14
14
|
} from "../chunk-Y2CM7HXH.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-S5KZ5LPG.js";
|
|
16
|
+
import "../chunk-2NAZZPPS.js";
|
|
17
17
|
import "../chunk-CZEX6KIQ.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-RITD7E5L.js";
|
|
19
|
+
import "../chunk-YDVEH3SB.js";
|
|
20
20
|
import "../chunk-GY34VGP5.js";
|
|
21
21
|
import "../chunk-B7PUBQQM.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-PMNN6ST4.js";
|
|
23
|
+
import "../chunk-L7CDEIVJ.js";
|
|
24
|
+
import "../chunk-I35CTGPO.js";
|
|
25
25
|
import "../chunk-OB42YVAE.js";
|
|
26
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-6GWA276C.js";
|
|
27
27
|
import "../chunk-6APU57E6.js";
|
|
28
28
|
import "../chunk-7FBGKXPE.js";
|
|
29
29
|
import "../chunk-MLKGABMK.js";
|
|
@@ -148,10 +148,10 @@ async function configureLocalChatPlugins(pluginSet) {
|
|
|
148
148
|
databaseModule
|
|
149
149
|
] = await Promise.all([
|
|
150
150
|
import("../plugins-PZMDS7AT.js"),
|
|
151
|
-
import("../agent-hooks-
|
|
152
|
-
import("../catalog-runtime-
|
|
153
|
-
import("../validation-
|
|
154
|
-
import("../db-
|
|
151
|
+
import("../agent-hooks-5URSMY3O.js"),
|
|
152
|
+
import("../catalog-runtime-MSMAYYIK.js"),
|
|
153
|
+
import("../validation-6XOOQGME.js"),
|
|
154
|
+
import("../db-2D6RMG67.js")
|
|
155
155
|
]);
|
|
156
156
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
157
157
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -212,7 +212,7 @@ function newRunConversationId() {
|
|
|
212
212
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
213
213
|
defaultStateAdapterForLocalChat();
|
|
214
214
|
await configureLocalChatPlugins(pluginSet);
|
|
215
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
215
|
+
const { runLocalAgentTurn } = await import("../runner-JZBRQP4F.js");
|
|
216
216
|
const deps = {
|
|
217
217
|
agentRunner: createAgentRunner(executeAgentRun),
|
|
218
218
|
deliverReply: async (reply) => {
|
package/dist/cli/check.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseSkillFile
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-PMNN6ST4.js";
|
|
4
4
|
import {
|
|
5
5
|
parseInlinePluginManifest,
|
|
6
6
|
parsePluginManifest
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-L7CDEIVJ.js";
|
|
8
|
+
import "../chunk-I35CTGPO.js";
|
|
9
9
|
import "../chunk-OB42YVAE.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-6GWA276C.js";
|
|
11
11
|
import "../chunk-6APU57E6.js";
|
|
12
12
|
import {
|
|
13
13
|
JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE,
|
package/dist/cli/main.js
CHANGED
|
@@ -10,7 +10,7 @@ import "../chunk-MLKGABMK.js";
|
|
|
10
10
|
import { pathToFileURL } from "url";
|
|
11
11
|
var SENTRY_FLUSH_TIMEOUT_MS = 2e3;
|
|
12
12
|
async function flushSentry() {
|
|
13
|
-
const mod = await import("../sentry-
|
|
13
|
+
const mod = await import("../sentry-JMWTS32N.js");
|
|
14
14
|
await mod.flush(SENTRY_FLUSH_TIMEOUT_MS);
|
|
15
15
|
}
|
|
16
16
|
async function initSentry() {
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
validatePluginEgressCredentialHooks,
|
|
3
3
|
validatePluginRegistrations
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-YDT7SNCN.js";
|
|
5
5
|
import {
|
|
6
6
|
pluginCatalogConfigFromPluginSet,
|
|
7
7
|
pluginCliRegistrationsFromPluginSet,
|
|
@@ -13,23 +13,23 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
setPlugins,
|
|
15
15
|
validatePlugins
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-S5KZ5LPG.js";
|
|
17
17
|
import {
|
|
18
18
|
createPluginLogger
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-2NAZZPPS.js";
|
|
20
20
|
import "../chunk-CZEX6KIQ.js";
|
|
21
21
|
import {
|
|
22
22
|
getDb
|
|
23
|
-
} from "../chunk-
|
|
24
|
-
import "../chunk-
|
|
23
|
+
} from "../chunk-RITD7E5L.js";
|
|
24
|
+
import "../chunk-YDVEH3SB.js";
|
|
25
25
|
import "../chunk-GY34VGP5.js";
|
|
26
26
|
import "../chunk-B7PUBQQM.js";
|
|
27
27
|
import {
|
|
28
28
|
pluginCatalogRuntime
|
|
29
|
-
} from "../chunk-
|
|
30
|
-
import "../chunk-
|
|
29
|
+
} from "../chunk-L7CDEIVJ.js";
|
|
30
|
+
import "../chunk-I35CTGPO.js";
|
|
31
31
|
import "../chunk-OB42YVAE.js";
|
|
32
|
-
import "../chunk-
|
|
32
|
+
import "../chunk-6GWA276C.js";
|
|
33
33
|
import "../chunk-6APU57E6.js";
|
|
34
34
|
import "../chunk-7FBGKXPE.js";
|
|
35
35
|
import "../chunk-MLKGABMK.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveRuntimeDependencySnapshot
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-BYZWPRJA.js";
|
|
4
4
|
import "../chunk-CZEX6KIQ.js";
|
|
5
5
|
import {
|
|
6
6
|
disconnectStateAdapter
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-YDVEH3SB.js";
|
|
8
8
|
import "../chunk-GY34VGP5.js";
|
|
9
9
|
import {
|
|
10
10
|
pluginCatalogRuntime
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-L7CDEIVJ.js";
|
|
12
|
+
import "../chunk-I35CTGPO.js";
|
|
13
13
|
import "../chunk-OB42YVAE.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-6GWA276C.js";
|
|
15
15
|
import "../chunk-6APU57E6.js";
|
|
16
16
|
import "../chunk-7FBGKXPE.js";
|
|
17
17
|
import "../chunk-MLKGABMK.js";
|
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-GQ3GK22G.js";
|
|
8
8
|
import {
|
|
9
9
|
defineJuniorPlugins,
|
|
10
10
|
pluginCatalogConfigFromEnv,
|
|
@@ -17,26 +17,26 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
JUNIOR_THREAD_STATE_TTL_MS,
|
|
19
19
|
importConversationFromLegacy
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-5C6XTTFI.js";
|
|
21
21
|
import {
|
|
22
22
|
loadAppPluginSet
|
|
23
23
|
} from "../chunk-Y2CM7HXH.js";
|
|
24
24
|
import {
|
|
25
25
|
createPluginLogger,
|
|
26
26
|
createPluginState
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-2NAZZPPS.js";
|
|
28
28
|
import {
|
|
29
29
|
createJuniorSqlExecutor,
|
|
30
30
|
createSqlConversationMessageStore,
|
|
31
31
|
createSqlStore,
|
|
32
32
|
getDb,
|
|
33
33
|
migrateSchema
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-RITD7E5L.js";
|
|
35
35
|
import {
|
|
36
36
|
disconnectStateAdapter,
|
|
37
37
|
getChatConfig,
|
|
38
38
|
getConnectedStateContext
|
|
39
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-YDVEH3SB.js";
|
|
40
40
|
import "../chunk-GY34VGP5.js";
|
|
41
41
|
import {
|
|
42
42
|
parseDestination,
|
|
@@ -44,14 +44,14 @@ import {
|
|
|
44
44
|
} from "../chunk-B7PUBQQM.js";
|
|
45
45
|
import {
|
|
46
46
|
pluginCatalogRuntime
|
|
47
|
-
} from "../chunk-
|
|
48
|
-
import "../chunk-
|
|
47
|
+
} from "../chunk-L7CDEIVJ.js";
|
|
48
|
+
import "../chunk-I35CTGPO.js";
|
|
49
49
|
import {
|
|
50
50
|
isRecord,
|
|
51
51
|
toOptionalNumber,
|
|
52
52
|
toOptionalString
|
|
53
53
|
} from "../chunk-OB42YVAE.js";
|
|
54
|
-
import "../chunk-
|
|
54
|
+
import "../chunk-6GWA276C.js";
|
|
55
55
|
import "../chunk-6APU57E6.js";
|
|
56
56
|
import "../chunk-7FBGKXPE.js";
|
|
57
57
|
import "../chunk-MLKGABMK.js";
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
getConversationStore,
|
|
6
6
|
getDb,
|
|
7
7
|
getSqlExecutor
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-RITD7E5L.js";
|
|
9
|
+
import "./chunk-YDVEH3SB.js";
|
|
10
10
|
import "./chunk-GY34VGP5.js";
|
|
11
11
|
import "./chunk-B7PUBQQM.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-I35CTGPO.js";
|
|
13
13
|
import "./chunk-OB42YVAE.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-6GWA276C.js";
|
|
15
15
|
import "./chunk-7FBGKXPE.js";
|
|
16
16
|
import "./chunk-MLKGABMK.js";
|
|
17
17
|
export {
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureLegacyConversationImport,
|
|
3
3
|
importConversationFromLegacy
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-5C6XTTFI.js";
|
|
5
|
+
import "./chunk-RITD7E5L.js";
|
|
6
|
+
import "./chunk-YDVEH3SB.js";
|
|
7
7
|
import "./chunk-GY34VGP5.js";
|
|
8
8
|
import "./chunk-B7PUBQQM.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-I35CTGPO.js";
|
|
10
10
|
import "./chunk-OB42YVAE.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-6GWA276C.js";
|
|
12
12
|
import "./chunk-7FBGKXPE.js";
|
|
13
13
|
import "./chunk-MLKGABMK.js";
|
|
14
14
|
export {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AgentTurnSessionSummary } from "@/chat/state/turn-session";
|
|
1
2
|
import type { Conversation as StoredConversation } from "@/chat/conversations/store";
|
|
2
3
|
import { type ConversationReaderOptions } from "./context";
|
|
3
4
|
import type { ConversationFeed, ConversationSummaryReport, ConversationSurface, PluginConversationSummary } from "./types";
|
|
@@ -8,6 +9,8 @@ export declare function titleFromConversation(args: {
|
|
|
8
9
|
}): string;
|
|
9
10
|
/** Project the current stored execution into the public run summary shape. */
|
|
10
11
|
export declare function sessionReportFromConversation(conversation: StoredConversation, nowMs: number): ConversationSummaryReport;
|
|
12
|
+
/** Enrich a durable conversation projection with one complete turn summary. */
|
|
13
|
+
export declare function sessionReportFromTurnSummary(conversation: StoredConversation, summary: AgentTurnSessionSummary, nowMs: number): ConversationSummaryReport;
|
|
11
14
|
/** Read the recent conversation feed for reporting consumers. */
|
|
12
15
|
export declare function readConversationFeed(options?: ConversationReaderOptions): Promise<ConversationFeed>;
|
|
13
16
|
/** List recent conversation summaries for plugin operational reports. */
|
|
@@ -2,12 +2,23 @@ import type { PluginConversationStatus, PluginConversations, PluginConversationS
|
|
|
2
2
|
export type { PluginConversationStatus, PluginConversations, PluginConversationSummary, };
|
|
3
3
|
export type ConversationReportStatus = "active" | "completed" | "failed" | "hung" | "superseded";
|
|
4
4
|
export type ConversationSurface = "api" | "internal" | "scheduler" | "slack";
|
|
5
|
+
/** Estimated USD cost breakdown for a conversation run. */
|
|
6
|
+
export interface ConversationCost {
|
|
7
|
+
input?: number;
|
|
8
|
+
output?: number;
|
|
9
|
+
cacheRead?: number;
|
|
10
|
+
cacheWrite?: number;
|
|
11
|
+
total?: number;
|
|
12
|
+
}
|
|
13
|
+
/** Token and estimated USD cost usage for a conversation run. */
|
|
5
14
|
export interface ConversationUsage {
|
|
6
15
|
inputTokens?: number;
|
|
7
16
|
outputTokens?: number;
|
|
8
17
|
cachedInputTokens?: number;
|
|
9
18
|
cacheCreationTokens?: number;
|
|
19
|
+
reasoningTokens?: number;
|
|
10
20
|
totalTokens?: number;
|
|
21
|
+
cost?: ConversationCost;
|
|
11
22
|
}
|
|
12
23
|
export interface ActorIdentity {
|
|
13
24
|
email?: string;
|
|
@@ -156,6 +167,7 @@ export interface ConversationStatsItem {
|
|
|
156
167
|
hung: number;
|
|
157
168
|
label: string;
|
|
158
169
|
runs: number;
|
|
170
|
+
costUsd?: number;
|
|
159
171
|
tokens?: number;
|
|
160
172
|
}
|
|
161
173
|
export interface ConversationStatsReport {
|
|
@@ -170,6 +182,7 @@ export interface ConversationStatsReport {
|
|
|
170
182
|
sampleLimit: number;
|
|
171
183
|
sampleSize: number;
|
|
172
184
|
source: "conversation_index";
|
|
185
|
+
costUsd?: number;
|
|
173
186
|
tokens?: number;
|
|
174
187
|
truncated: boolean;
|
|
175
188
|
runs: number;
|
package/dist/reporting.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PluginOperationalReport } from "@sentry/junior-plugin-api";
|
|
2
2
|
import { type ConversationFeed, type PluginConversationSummary, type ConversationReport, type ConversationSubagentTranscriptReport, type ConversationStatsReport } from "./reporting/conversations";
|
|
3
|
-
export type { PluginConversationStatus, PluginConversations, PluginConversationSummary, ConversationActivityReport, ConversationActivityStatus, ConversationFeed, ConversationReport, ConversationReportStatus, ConversationRunReport, ConversationSubagentActivityReport, ConversationSubagentTranscriptReport, ConversationStatsItem, ConversationStatsReport, ConversationSummaryReport, ConversationSurface, ConversationToolActivityReport, ConversationUsage, ActorIdentity, TranscriptMessage, TranscriptPart, TranscriptPartType, TranscriptRole, } from "./reporting/conversations";
|
|
3
|
+
export type { PluginConversationStatus, PluginConversations, PluginConversationSummary, ConversationActivityReport, ConversationActivityStatus, ConversationCost, ConversationFeed, ConversationReport, ConversationReportStatus, ConversationRunReport, ConversationSubagentActivityReport, ConversationSubagentTranscriptReport, ConversationStatsItem, ConversationStatsReport, ConversationSummaryReport, ConversationSurface, ConversationToolActivityReport, ConversationUsage, ActorIdentity, TranscriptMessage, TranscriptPart, TranscriptPartType, TranscriptRole, } from "./reporting/conversations";
|
|
4
4
|
export interface HealthReport {
|
|
5
5
|
status: "ok";
|
|
6
6
|
service: string;
|