@sentry/junior 0.66.1 → 0.66.3
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/app.js +7 -4
- package/package.json +3 -3
package/dist/app.js
CHANGED
|
@@ -11904,7 +11904,7 @@ async function generateAssistantReply(messageText2, context = {}) {
|
|
|
11904
11904
|
let canRecordMcpProviders = false;
|
|
11905
11905
|
let sandboxExecutor;
|
|
11906
11906
|
let timedOut = false;
|
|
11907
|
-
let
|
|
11907
|
+
let cooperativeYieldError;
|
|
11908
11908
|
let inputCommitted = false;
|
|
11909
11909
|
let turnUsage;
|
|
11910
11910
|
let thinkingSelection;
|
|
@@ -12502,11 +12502,11 @@ async function generateAssistantReply(messageText2, context = {}) {
|
|
|
12502
12502
|
if (!context.shouldYield?.()) {
|
|
12503
12503
|
return;
|
|
12504
12504
|
}
|
|
12505
|
-
yielded = true;
|
|
12506
12505
|
timeoutResumeMessages = getResumeSnapshot();
|
|
12507
|
-
|
|
12506
|
+
cooperativeYieldError = new CooperativeTurnYieldError(
|
|
12508
12507
|
`Agent turn yielded at a safe boundary after ${Date.now() - replyStartedAtMs}ms`
|
|
12509
12508
|
);
|
|
12509
|
+
throw cooperativeYieldError;
|
|
12510
12510
|
};
|
|
12511
12511
|
agent = new Agent2({
|
|
12512
12512
|
getApiKey: () => getPiGatewayApiKeyOverride(),
|
|
@@ -12668,6 +12668,9 @@ async function generateAssistantReply(messageText2, context = {}) {
|
|
|
12668
12668
|
let retryUsage;
|
|
12669
12669
|
for (let attempt = 0; ; attempt += 1) {
|
|
12670
12670
|
promptResult = await runAgentStep(run);
|
|
12671
|
+
if (cooperativeYieldError) {
|
|
12672
|
+
throw cooperativeYieldError;
|
|
12673
|
+
}
|
|
12671
12674
|
newMessages = agent.state.messages.slice(beforeMessageCount);
|
|
12672
12675
|
const outputMessages = newMessages.filter(isAssistantMessage);
|
|
12673
12676
|
const outputMessagesAttribute = serializeGenAiAttribute(
|
|
@@ -12768,7 +12771,7 @@ async function generateAssistantReply(messageText2, context = {}) {
|
|
|
12768
12771
|
assistantUserName: botConfig.userName
|
|
12769
12772
|
});
|
|
12770
12773
|
} catch (error) {
|
|
12771
|
-
if (
|
|
12774
|
+
if (cooperativeYieldError && error instanceof CooperativeTurnYieldError && timeoutResumeConversationId && timeoutResumeSessionId) {
|
|
12772
12775
|
turnUsage = turnUsage ?? extractSliceUsage(timeoutResumeMessages, beforeMessageCount);
|
|
12773
12776
|
await recordActiveMcpProviders();
|
|
12774
12777
|
const sessionRecord = await persistYieldSessionRecord({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.66.
|
|
3
|
+
"version": "0.66.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"node-html-markdown": "^2.0.0",
|
|
66
66
|
"yaml": "^2.9.0",
|
|
67
67
|
"zod": "^4.4.3",
|
|
68
|
-
"@sentry/junior-plugin-api": "0.66.
|
|
68
|
+
"@sentry/junior-plugin-api": "0.66.3"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@types/node": "^25.9.1",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"typescript": "^6.0.3",
|
|
78
78
|
"vercel": "^54.4.0",
|
|
79
79
|
"vitest": "^4.1.7",
|
|
80
|
-
"@sentry/junior-scheduler": "0.66.
|
|
80
|
+
"@sentry/junior-scheduler": "0.66.3"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",
|