@sentry/junior 0.83.0 → 0.84.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-EEWWWIS2.js → agent-hooks-TFPY6V3T.js} +7 -7
- package/dist/app.js +58 -17
- package/dist/{catalog-runtime-IVWRAPSI.js → catalog-runtime-XOD7YPRS.js} +2 -2
- package/dist/chat/config.d.ts +1 -1
- package/dist/chat/requester.d.ts +1 -1
- package/dist/chat/slack/client.d.ts +1 -1
- package/dist/chat/state/session-log.d.ts +4 -0
- package/dist/chat/task-execution/state.d.ts +1 -1
- package/dist/{chunk-FAGWUF44.js → chunk-2TAIGJPQ.js} +1 -1
- package/dist/{chunk-WCXVEQPI.js → chunk-64ACM6AP.js} +1 -1
- package/dist/{chunk-5C3RY6IZ.js → chunk-AL6ZFV7U.js} +5 -5
- package/dist/{chunk-ABRNFE3N.js → chunk-ALL7GG6U.js} +7 -6
- package/dist/{chunk-KZLRUQAA.js → chunk-BAPRSWNW.js} +4 -1
- package/dist/{chunk-TW23AT22.js → chunk-BQ3ITJA6.js} +1 -1
- package/dist/{chunk-GUO4EE7L.js → chunk-CWMMGUWM.js} +1 -1
- package/dist/{chunk-ORRLK22J.js → chunk-FPN7NYTE.js} +4 -4
- package/dist/{chunk-ZPCGQRFJ.js → chunk-IXTBFABZ.js} +4 -5
- package/dist/{chunk-GK5CITCY.js → chunk-JK7376UT.js} +12 -6
- package/dist/{chunk-3JKTVW4R.js → chunk-LSG6PQF4.js} +3 -3
- package/dist/{chunk-X2FL5ZH5.js → chunk-MJ4E2PK7.js} +1 -1
- package/dist/{chunk-QVMLDCVR.js → chunk-QWKB6NJV.js} +3 -11
- package/dist/{chunk-AK7T7XRQ.js → chunk-SBYMRDH7.js} +1 -1
- package/dist/{chunk-BFQ7IUTE.js → chunk-SVFA43LT.js} +3 -3
- package/dist/{chunk-LK53AHO5.js → chunk-T2YRJZ5A.js} +20 -13
- package/dist/cli/chat.js +6 -6
- package/dist/cli/check.js +3 -3
- package/dist/cli/plugins.js +9 -9
- package/dist/cli/snapshot-warmup.js +5 -5
- package/dist/cli/upgrade.js +18 -34
- package/dist/{db-TRIVS6BW.js → db-ELRCNB4A.js} +4 -4
- package/dist/nitro.js +3 -3
- package/dist/reporting/conversations.d.ts +77 -0
- package/dist/reporting.d.ts +10 -2
- package/dist/reporting.js +423 -13
- package/dist/{runner-KS4XDMHF.js → runner-2XU6QQND.js} +12 -12
- package/dist/{validation-TN6HMZAD.js → validation-MBNJKWPQ.js} +3 -3
- package/package.json +6 -6
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
isSnapshotMissingError,
|
|
11
11
|
resolveRuntimeDependencySnapshot,
|
|
12
12
|
runNonInteractiveCommand
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LSG6PQF4.js";
|
|
14
14
|
import {
|
|
15
15
|
pluginTaskId,
|
|
16
16
|
pluginTaskParamsSchema,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
recordSubagentStarted,
|
|
32
32
|
recordToolExecutionStarted,
|
|
33
33
|
upsertAgentTurnSessionRecord
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-JK7376UT.js";
|
|
35
35
|
import {
|
|
36
36
|
createPluginEmbedder,
|
|
37
37
|
createPluginHookRunner,
|
|
@@ -42,14 +42,14 @@ import {
|
|
|
42
42
|
getPlugins,
|
|
43
43
|
getSlackToolContext,
|
|
44
44
|
resolveChannelCapabilities
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-AL6ZFV7U.js";
|
|
46
46
|
import {
|
|
47
47
|
createPluginLogger,
|
|
48
48
|
createPluginState
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-CWMMGUWM.js";
|
|
50
50
|
import {
|
|
51
51
|
getDb
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-QWKB6NJV.js";
|
|
53
53
|
import {
|
|
54
54
|
SANDBOX_DATA_ROOT,
|
|
55
55
|
SANDBOX_SKILLS_ROOT,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
import {
|
|
61
61
|
acquireActiveLock,
|
|
62
62
|
getStateAdapter
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-MJ4E2PK7.js";
|
|
64
64
|
import {
|
|
65
65
|
SlackActionError,
|
|
66
66
|
downloadPrivateSlackFile,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
normalizeSlackConversationId,
|
|
72
72
|
parseDestination,
|
|
73
73
|
withSlackRetries
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-BAPRSWNW.js";
|
|
75
75
|
import {
|
|
76
76
|
GEN_AI_PROVIDER_NAME,
|
|
77
77
|
GEN_AI_SERVER_ADDRESS,
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
toObservablePromptPart,
|
|
105
105
|
trimTrailingAssistantMessages,
|
|
106
106
|
upsertActiveSkill
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-ALL7GG6U.js";
|
|
108
108
|
import {
|
|
109
109
|
parseSlackThreadId,
|
|
110
110
|
resolveConversationPrivacy,
|
|
@@ -120,18 +120,18 @@ import {
|
|
|
120
120
|
findSkillByName,
|
|
121
121
|
loadSkillsByName,
|
|
122
122
|
parseSkillInvocation
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-64ACM6AP.js";
|
|
124
124
|
import {
|
|
125
125
|
CredentialUnavailableError,
|
|
126
126
|
credentialContextSchema,
|
|
127
127
|
pluginCatalogRuntime,
|
|
128
128
|
resolveAuthTokenPlaceholder,
|
|
129
129
|
resolvePluginCommandEnv
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-BQ3ITJA6.js";
|
|
131
131
|
import {
|
|
132
132
|
createRequester,
|
|
133
133
|
parseActorUserId
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-IXTBFABZ.js";
|
|
135
135
|
import {
|
|
136
136
|
listReferenceFiles
|
|
137
137
|
} from "./chunk-6APU57E6.js";
|
|
@@ -6453,12 +6453,16 @@ function createAdvisorTool(context) {
|
|
|
6453
6453
|
const conversationId = context.conversationId;
|
|
6454
6454
|
const advisorSessionKey = getAdvisorSessionKey(conversationId);
|
|
6455
6455
|
const subagentInvocationId = typeof toolCallId === "string" && toolCallId.length > 0 ? toolCallId : `advisor:${Date.now()}`;
|
|
6456
|
-
const endSubagent = async (outcome, errorCode) => recordSubagentEnded({
|
|
6456
|
+
const endSubagent = async (outcome, errorCode, transcriptRange) => recordSubagentEnded({
|
|
6457
6457
|
conversationId,
|
|
6458
6458
|
sessionId: context.parentSessionId,
|
|
6459
6459
|
subagentInvocationId,
|
|
6460
6460
|
outcome,
|
|
6461
6461
|
...errorCode ? { errorCode } : {},
|
|
6462
|
+
...transcriptRange ? {
|
|
6463
|
+
transcriptEndMessageIndex: transcriptRange.endMessageIndex,
|
|
6464
|
+
transcriptStartMessageIndex: transcriptRange.startMessageIndex
|
|
6465
|
+
} : {},
|
|
6462
6466
|
ttlMs: THREAD_STATE_TTL_MS
|
|
6463
6467
|
});
|
|
6464
6468
|
await recordSubagentStarted({
|
|
@@ -6577,7 +6581,10 @@ function createAdvisorTool(context) {
|
|
|
6577
6581
|
"Advisor guidance is unavailable because advisor history could not be saved. Retry the advisor call or continue without assuming advisor history."
|
|
6578
6582
|
);
|
|
6579
6583
|
}
|
|
6580
|
-
await endSubagent("success"
|
|
6584
|
+
await endSubagent("success", void 0, {
|
|
6585
|
+
endMessageIndex: advisorAgent.state.messages.length,
|
|
6586
|
+
startMessageIndex: beforeMessageCount
|
|
6587
|
+
});
|
|
6581
6588
|
setSpanStatus("ok");
|
|
6582
6589
|
return success(memo);
|
|
6583
6590
|
},
|
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-
|
|
134
|
-
import("../catalog-runtime-
|
|
135
|
-
import("../validation-
|
|
136
|
-
import("../db-
|
|
133
|
+
import("../agent-hooks-TFPY6V3T.js"),
|
|
134
|
+
import("../catalog-runtime-XOD7YPRS.js"),
|
|
135
|
+
import("../validation-MBNJKWPQ.js"),
|
|
136
|
+
import("../db-ELRCNB4A.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-2XU6QQND.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-2XU6QQND.js");
|
|
223
223
|
const rl = readline.createInterface({
|
|
224
224
|
input: io.input,
|
|
225
225
|
output: io.output,
|
package/dist/cli/check.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseSkillFile
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-64ACM6AP.js";
|
|
4
4
|
import {
|
|
5
5
|
parseInlinePluginManifest,
|
|
6
6
|
parsePluginManifest
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-BQ3ITJA6.js";
|
|
8
|
+
import "../chunk-IXTBFABZ.js";
|
|
9
9
|
import "../chunk-6APU57E6.js";
|
|
10
10
|
import "../chunk-KF7522P3.js";
|
|
11
11
|
import {
|
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-2TAIGJPQ.js";
|
|
5
5
|
import {
|
|
6
6
|
pluginCatalogConfigFromPluginSet,
|
|
7
7
|
pluginCliRegistrationsFromPluginSet,
|
|
@@ -10,25 +10,25 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
setPlugins,
|
|
12
12
|
validatePlugins
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-AL6ZFV7U.js";
|
|
14
14
|
import {
|
|
15
15
|
createPluginLogger
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-CWMMGUWM.js";
|
|
17
17
|
import {
|
|
18
18
|
getDb
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-QWKB6NJV.js";
|
|
20
20
|
import "../chunk-G3E7SCME.js";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-MJ4E2PK7.js";
|
|
22
|
+
import "../chunk-BAPRSWNW.js";
|
|
23
|
+
import "../chunk-ALL7GG6U.js";
|
|
24
24
|
import "../chunk-DR75T7J3.js";
|
|
25
25
|
import {
|
|
26
26
|
loadAppPluginSet
|
|
27
27
|
} from "../chunk-Y2CM7HXH.js";
|
|
28
28
|
import {
|
|
29
29
|
pluginCatalogRuntime
|
|
30
|
-
} from "../chunk-
|
|
31
|
-
import "../chunk-
|
|
30
|
+
} from "../chunk-BQ3ITJA6.js";
|
|
31
|
+
import "../chunk-IXTBFABZ.js";
|
|
32
32
|
import "../chunk-6APU57E6.js";
|
|
33
33
|
import "../chunk-KF7522P3.js";
|
|
34
34
|
import "../chunk-FTMXFBDC.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveRuntimeDependencySnapshot
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-LSG6PQF4.js";
|
|
4
4
|
import "../chunk-G3E7SCME.js";
|
|
5
5
|
import {
|
|
6
6
|
disconnectStateAdapter
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-MJ4E2PK7.js";
|
|
8
|
+
import "../chunk-ALL7GG6U.js";
|
|
9
9
|
import "../chunk-DR75T7J3.js";
|
|
10
10
|
import {
|
|
11
11
|
pluginCatalogRuntime
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-BQ3ITJA6.js";
|
|
13
|
+
import "../chunk-IXTBFABZ.js";
|
|
14
14
|
import "../chunk-6APU57E6.js";
|
|
15
15
|
import "../chunk-KF7522P3.js";
|
|
16
16
|
import "../chunk-FTMXFBDC.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-FPN7NYTE.js";
|
|
8
8
|
import {
|
|
9
9
|
JUNIOR_THREAD_STATE_TTL_MS,
|
|
10
10
|
coerceThreadConversationState
|
|
@@ -18,31 +18,31 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
createPluginLogger,
|
|
20
20
|
createPluginState
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-CWMMGUWM.js";
|
|
22
22
|
import {
|
|
23
23
|
createJuniorSqlExecutor,
|
|
24
24
|
createSqlStore,
|
|
25
25
|
getDb
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-QWKB6NJV.js";
|
|
27
27
|
import {
|
|
28
28
|
disconnectStateAdapter,
|
|
29
29
|
getConnectedStateContext
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-MJ4E2PK7.js";
|
|
31
31
|
import {
|
|
32
32
|
parseDestination,
|
|
33
33
|
sameDestination
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-BAPRSWNW.js";
|
|
35
35
|
import {
|
|
36
36
|
getChatConfig
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-ALL7GG6U.js";
|
|
38
38
|
import "../chunk-DR75T7J3.js";
|
|
39
39
|
import {
|
|
40
40
|
loadAppPluginSet
|
|
41
41
|
} from "../chunk-Y2CM7HXH.js";
|
|
42
42
|
import {
|
|
43
43
|
pluginCatalogRuntime
|
|
44
|
-
} from "../chunk-
|
|
45
|
-
import "../chunk-
|
|
44
|
+
} from "../chunk-BQ3ITJA6.js";
|
|
45
|
+
import "../chunk-IXTBFABZ.js";
|
|
46
46
|
import "../chunk-6APU57E6.js";
|
|
47
47
|
import "../chunk-KF7522P3.js";
|
|
48
48
|
import {
|
|
@@ -83,23 +83,15 @@ function createStateConversationStore(state) {
|
|
|
83
83
|
|
|
84
84
|
// src/cli/upgrade/migrations/conversations-sql.ts
|
|
85
85
|
var CONVERSATION_BACKFILL_LIMIT = 1e4;
|
|
86
|
-
var REQUIRED_SQL_DATABASE_URL_MESSAGE = "Junior SQL database URL is required for conversation metadata upgrade. Set JUNIOR_DATABASE_URL or DATABASE_URL.";
|
|
87
|
-
function requireConversationSqlDatabaseUrl(context) {
|
|
88
|
-
const databaseUrl = context.sqlDatabaseUrl ?? getChatConfig().sql.databaseUrl;
|
|
89
|
-
if (!databaseUrl) {
|
|
90
|
-
throw new Error(REQUIRED_SQL_DATABASE_URL_MESSAGE);
|
|
91
|
-
}
|
|
92
|
-
return databaseUrl;
|
|
93
|
-
}
|
|
94
86
|
async function migrateConversationsToSql(context, options = {}) {
|
|
95
87
|
const source = createStateConversationStore(context.stateAdapter);
|
|
96
88
|
let target = options.target;
|
|
97
89
|
let closeTarget;
|
|
98
90
|
if (!target) {
|
|
99
|
-
const
|
|
91
|
+
const { sql } = getChatConfig();
|
|
100
92
|
const executor = createJuniorSqlExecutor({
|
|
101
|
-
connectionString: databaseUrl,
|
|
102
|
-
driver:
|
|
93
|
+
connectionString: sql.databaseUrl,
|
|
94
|
+
driver: sql.driver
|
|
103
95
|
});
|
|
104
96
|
target = createSqlStore(executor);
|
|
105
97
|
closeTarget = () => executor.close();
|
|
@@ -219,9 +211,10 @@ async function runPluginStorageMigrations(context) {
|
|
|
219
211
|
return emptyResult();
|
|
220
212
|
}
|
|
221
213
|
const previousConfig = pluginCatalogRuntime.setConfig(pluginCatalogConfig);
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
|
|
214
|
+
const sql = getChatConfig().sql;
|
|
215
|
+
const ownedExecutor = context.db ? void 0 : createJuniorSqlExecutor({
|
|
216
|
+
connectionString: sql.databaseUrl,
|
|
217
|
+
driver: sql.driver
|
|
225
218
|
});
|
|
226
219
|
const sqlUrlDb = ownedExecutor ? ownedExecutor.db() : void 0;
|
|
227
220
|
try {
|
|
@@ -377,21 +370,13 @@ async function migratePluginSchemas(executor, migrations) {
|
|
|
377
370
|
}
|
|
378
371
|
|
|
379
372
|
// src/cli/upgrade/migrations/plugin-sql.ts
|
|
380
|
-
var REQUIRED_SQL_DATABASE_URL_MESSAGE2 = "Junior SQL database URL is required for plugin schema migration. Set JUNIOR_DATABASE_URL or DATABASE_URL.";
|
|
381
|
-
function requirePluginSqlDatabaseUrl(context) {
|
|
382
|
-
const databaseUrl = context.sqlDatabaseUrl ?? getChatConfig().sql.databaseUrl;
|
|
383
|
-
if (!databaseUrl) {
|
|
384
|
-
throw new Error(REQUIRED_SQL_DATABASE_URL_MESSAGE2);
|
|
385
|
-
}
|
|
386
|
-
return databaseUrl;
|
|
387
|
-
}
|
|
388
373
|
async function migratePluginsToSql(context) {
|
|
389
|
-
const
|
|
374
|
+
const { sql } = getChatConfig();
|
|
390
375
|
const { pluginCatalogConfig } = await resolveUpgradePlugins(context);
|
|
391
376
|
const previousConfig = pluginCatalogRuntime.setConfig(pluginCatalogConfig);
|
|
392
377
|
const executor = createJuniorSqlExecutor({
|
|
393
|
-
connectionString: databaseUrl,
|
|
394
|
-
driver:
|
|
378
|
+
connectionString: sql.databaseUrl,
|
|
379
|
+
driver: sql.driver
|
|
395
380
|
});
|
|
396
381
|
try {
|
|
397
382
|
const migrations = pluginCatalogRuntime.getMigrationRoots().flatMap((root) => readPluginMigrations(root));
|
|
@@ -991,7 +976,6 @@ function formatMigrationResult(result) {
|
|
|
991
976
|
async function runUpgradeMigrations(context) {
|
|
992
977
|
const plugins = await resolveUpgradePlugins(context);
|
|
993
978
|
const migrationContext = { ...context, ...plugins };
|
|
994
|
-
migrationContext.sqlDatabaseUrl ??= requireConversationSqlDatabaseUrl(migrationContext);
|
|
995
979
|
const results = [];
|
|
996
980
|
for (const migration of MIGRATIONS) {
|
|
997
981
|
migrationContext.io.info(`Running migration ${migration.name}...`);
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
closeDb,
|
|
3
3
|
getConversationStore,
|
|
4
4
|
getDb
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-QWKB6NJV.js";
|
|
6
|
+
import "./chunk-BAPRSWNW.js";
|
|
7
|
+
import "./chunk-ALL7GG6U.js";
|
|
8
8
|
import "./chunk-DR75T7J3.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-IXTBFABZ.js";
|
|
10
10
|
import "./chunk-KF7522P3.js";
|
|
11
11
|
import "./chunk-FTMXFBDC.js";
|
|
12
12
|
import "./chunk-3DA7X2U3.js";
|
package/dist/nitro.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveConversationWorkQueueTopic
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SBYMRDH7.js";
|
|
4
4
|
import {
|
|
5
5
|
PLUGIN_TASK_QUEUE_TOPIC
|
|
6
6
|
} from "./chunk-KNFROR7R.js";
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
pluginCatalogConfigFromPluginSet,
|
|
9
9
|
pluginRuntimeRegistrationsFromPluginSet
|
|
10
10
|
} from "./chunk-SG5WAA7H.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-BAPRSWNW.js";
|
|
12
|
+
import "./chunk-ALL7GG6U.js";
|
|
13
13
|
import "./chunk-DR75T7J3.js";
|
|
14
14
|
import {
|
|
15
15
|
loadPluginSetFromModule,
|
|
@@ -90,6 +90,7 @@ export interface ConversationSubagentActivityReport {
|
|
|
90
90
|
parentToolCallId?: string;
|
|
91
91
|
status: ConversationActivityStatus;
|
|
92
92
|
subagentKind: string;
|
|
93
|
+
transcriptAvailable?: boolean;
|
|
93
94
|
}
|
|
94
95
|
export interface ConversationToolActivityReport extends ActivityPayloadMetadata {
|
|
95
96
|
type: "tool_execution";
|
|
@@ -111,6 +112,24 @@ export interface ConversationReport {
|
|
|
111
112
|
sentryConversationUrl?: string;
|
|
112
113
|
runs: ConversationRunReport[];
|
|
113
114
|
}
|
|
115
|
+
export interface ConversationSubagentTranscriptReport {
|
|
116
|
+
type: "subagent";
|
|
117
|
+
createdAt: string;
|
|
118
|
+
endedAt?: string;
|
|
119
|
+
id: string;
|
|
120
|
+
outcome?: "success" | "error" | "aborted";
|
|
121
|
+
parentToolCallId?: string;
|
|
122
|
+
status: ConversationActivityStatus;
|
|
123
|
+
subagentConversationId?: string;
|
|
124
|
+
subagentKind: string;
|
|
125
|
+
subagentSentryConversationUrl?: string;
|
|
126
|
+
transcript: TranscriptMessage[];
|
|
127
|
+
transcriptAvailable: boolean;
|
|
128
|
+
transcriptMessageCount?: number;
|
|
129
|
+
transcriptRedacted?: boolean;
|
|
130
|
+
transcriptRedactionReason?: "non_public_conversation";
|
|
131
|
+
unavailableReason?: "missing_transcript_range" | "missing_transcript_ref" | "not_found";
|
|
132
|
+
}
|
|
114
133
|
export interface ConversationFeed {
|
|
115
134
|
conversations: ConversationSummaryReport[];
|
|
116
135
|
source: "conversation_index";
|
|
@@ -144,6 +163,62 @@ export interface ConversationStatsReport {
|
|
|
144
163
|
windowEnd: string;
|
|
145
164
|
windowStart: string;
|
|
146
165
|
}
|
|
166
|
+
export interface RequesterActivityDayReport {
|
|
167
|
+
active: number;
|
|
168
|
+
conversations: number;
|
|
169
|
+
date: string;
|
|
170
|
+
durationMs: number;
|
|
171
|
+
failed: number;
|
|
172
|
+
hung: number;
|
|
173
|
+
runs: number;
|
|
174
|
+
tokens?: number;
|
|
175
|
+
}
|
|
176
|
+
export interface RequesterTotalsReport {
|
|
177
|
+
active: number;
|
|
178
|
+
activeDays: number;
|
|
179
|
+
conversations: number;
|
|
180
|
+
durationMs: number;
|
|
181
|
+
failed: number;
|
|
182
|
+
hung: number;
|
|
183
|
+
runs: number;
|
|
184
|
+
tokens?: number;
|
|
185
|
+
}
|
|
186
|
+
export interface RequesterSummaryReport extends RequesterTotalsReport {
|
|
187
|
+
firstSeenAt: string;
|
|
188
|
+
lastSeenAt: string;
|
|
189
|
+
requester: RequesterIdentity & {
|
|
190
|
+
email: string;
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
export interface RequesterDirectoryReport {
|
|
194
|
+
generatedAt: string;
|
|
195
|
+
people: RequesterSummaryReport[];
|
|
196
|
+
sampleLimit: number;
|
|
197
|
+
sampleSize: number;
|
|
198
|
+
source: "conversation_index";
|
|
199
|
+
truncated: boolean;
|
|
200
|
+
}
|
|
201
|
+
export interface RequesterProfileReport {
|
|
202
|
+
activityDays: RequesterActivityDayReport[];
|
|
203
|
+
generatedAt: string;
|
|
204
|
+
locations: ConversationStatsItem[];
|
|
205
|
+
recentConversations: ConversationSummaryReport[];
|
|
206
|
+
requester: RequesterIdentity & {
|
|
207
|
+
email: string;
|
|
208
|
+
};
|
|
209
|
+
sampleLimit: number;
|
|
210
|
+
sampleSize: number;
|
|
211
|
+
source: "conversation_index";
|
|
212
|
+
surfaces: ConversationStatsItem[];
|
|
213
|
+
totals: RequesterTotalsReport;
|
|
214
|
+
truncated: boolean;
|
|
215
|
+
windowEnd: string;
|
|
216
|
+
windowStart: string;
|
|
217
|
+
}
|
|
218
|
+
/** Read the requester directory from durable conversation metadata. */
|
|
219
|
+
export declare function readRequesterDirectoryReport(options?: ConversationReaderOptions): Promise<RequesterDirectoryReport>;
|
|
220
|
+
/** Read one requester profile without exposing transcript payloads. */
|
|
221
|
+
export declare function readRequesterProfileReport(email: string, options?: ConversationReaderOptions): Promise<RequesterProfileReport>;
|
|
147
222
|
/** Read the recent conversation feed for reporting consumers. */
|
|
148
223
|
export declare function readConversationFeed(options?: ConversationReaderOptions): Promise<ConversationFeed>;
|
|
149
224
|
/** Read aggregate conversation statistics for reporting consumers. */
|
|
@@ -154,3 +229,5 @@ export declare function listRecentConversationSummaries(options?: {
|
|
|
154
229
|
} & ConversationReaderOptions): Promise<PluginConversationSummary[]>;
|
|
155
230
|
/** Read one conversation transcript for reporting consumers. */
|
|
156
231
|
export declare function readConversationReport(conversationId: string, options?: ConversationReaderOptions): Promise<ConversationReport>;
|
|
232
|
+
/** Read one child-agent transcript through its parent conversation run. */
|
|
233
|
+
export declare function readConversationSubagentTranscriptReport(conversationId: string, runId: string, subagentId: string): Promise<ConversationSubagentTranscriptReport>;
|
package/dist/reporting.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PluginOperationalReport } from "@sentry/junior-plugin-api";
|
|
2
|
-
import { type ConversationFeed, type PluginConversationSummary, type ConversationReport, type ConversationStatsReport } from "./reporting/conversations";
|
|
3
|
-
export type { PluginConversationStatus, PluginConversations, PluginConversationSummary, ConversationActivityReport, ConversationActivityStatus, ConversationFeed, ConversationReport, ConversationReportStatus, ConversationRunReport, ConversationSubagentActivityReport, ConversationStatsItem, ConversationStatsReport, ConversationSummaryReport, ConversationSurface, ConversationToolActivityReport, ConversationUsage, RequesterIdentity, TranscriptMessage, TranscriptPart, TranscriptPartType, TranscriptRole, } from "./reporting/conversations";
|
|
2
|
+
import { type ConversationFeed, type PluginConversationSummary, type ConversationReport, type ConversationSubagentTranscriptReport, type ConversationStatsReport, type RequesterDirectoryReport, type RequesterProfileReport } from "./reporting/conversations";
|
|
3
|
+
export type { PluginConversationStatus, PluginConversations, PluginConversationSummary, ConversationActivityReport, ConversationActivityStatus, ConversationFeed, ConversationReport, ConversationReportStatus, ConversationRunReport, ConversationSubagentActivityReport, ConversationSubagentTranscriptReport, ConversationStatsItem, ConversationStatsReport, ConversationSummaryReport, ConversationSurface, ConversationToolActivityReport, ConversationUsage, RequesterActivityDayReport, RequesterDirectoryReport, RequesterIdentity, RequesterProfileReport, RequesterSummaryReport, RequesterTotalsReport, TranscriptMessage, TranscriptPart, TranscriptPartType, TranscriptRole, } from "./reporting/conversations";
|
|
4
4
|
export interface HealthReport {
|
|
5
5
|
status: "ok";
|
|
6
6
|
service: string;
|
|
@@ -53,6 +53,10 @@ export interface JuniorReporting {
|
|
|
53
53
|
listConversations(): Promise<ConversationFeed>;
|
|
54
54
|
/** Read aggregate conversation stats for reporting consumers. */
|
|
55
55
|
getConversationStats?(): Promise<ConversationStatsReport>;
|
|
56
|
+
/** List requester profiles derived from trusted conversation requester emails. */
|
|
57
|
+
listRequesters?(): Promise<RequesterDirectoryReport>;
|
|
58
|
+
/** Read one requester profile derived from trusted conversation requester emails. */
|
|
59
|
+
getRequesterProfile?(email: string): Promise<RequesterProfileReport>;
|
|
56
60
|
/** Read recent conversation summaries without transcript payloads. */
|
|
57
61
|
listRecentConversations?(options?: {
|
|
58
62
|
limit?: number;
|
|
@@ -67,10 +71,14 @@ export interface JuniorReporting {
|
|
|
67
71
|
* source. Avoid adding fields that require Redis-only transcript internals.
|
|
68
72
|
*/
|
|
69
73
|
getConversation(conversationId: string): Promise<ConversationReport>;
|
|
74
|
+
/** Load a child-agent transcript only when an operator opens that subagent. */
|
|
75
|
+
getConversationSubagentTranscript(conversationId: string, runId: string, subagentId: string): Promise<ConversationSubagentTranscriptReport>;
|
|
70
76
|
}
|
|
71
77
|
/** Create the read-only reporting boundary used by plugins and other consumers. */
|
|
72
78
|
export declare function createJuniorReporting(): JuniorReporting & {
|
|
73
79
|
getConversationStats(): Promise<ConversationStatsReport>;
|
|
80
|
+
listRequesters(): Promise<RequesterDirectoryReport>;
|
|
81
|
+
getRequesterProfile(email: string): Promise<RequesterProfileReport>;
|
|
74
82
|
listRecentConversations(options?: {
|
|
75
83
|
limit?: number;
|
|
76
84
|
}): Promise<PluginConversationSummary[]>;
|