@sentry/junior 0.264.0 → 0.266.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/README.md +1 -1
- package/dist/{adapter-BIbMSKlG.js → adapter-eRFA_naf.js} +1 -1
- package/dist/{admin-D4d0HXax.js → admin-tILpP51p.js} +1 -1
- package/dist/{agent-runner-CvRxb09K.js → agent-runner-BtYK7bht.js} +263 -198
- package/dist/api/schema.d.ts +216 -15
- package/dist/api/schema.js +5 -5
- package/dist/api.js +109 -42
- package/dist/{app-Buc5gIWz.d.ts → app-Csbi9dW7.d.ts} +0 -4
- package/dist/app.d.ts +1 -1
- package/dist/app.js +79 -390
- package/dist/{assistant-reply-BcJj_ORj.js → assistant-reply-UyzAfZQo.js} +1 -1
- package/dist/{automation-CWX0qL8U.js → automation-BKpY9LPa.js} +31 -10
- package/dist/{briefs-BFfIE5N6.js → briefs-DgfWMU7e.js} +5 -5
- package/dist/{catalog-runtime-R53MWcMi.js → catalog-runtime-DAJjAbSx.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +4 -18
- package/dist/cli/main.js +4 -4
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-DpOwh_zX.js → client-B0YZfxNy.js} +3 -8
- package/dist/{config-BxPrFVJP.js → config-C0UwYqDK.js} +100 -3
- package/dist/{connections-BnTM1nRf.js → connections-Bwu3VORi.js} +11 -10
- package/dist/{conversation-B0baEwoA.js → conversation-DF4rUcjb.js} +6 -2
- package/dist/{conversation-privacy-ueJ6i-t9.js → conversation-privacy-CY7JVjxn.js} +1 -1
- package/dist/{credential-sync-DeDkof_D.js → credential-sync-VGAMUTGp.js} +20 -20
- package/dist/{agent-hooks-D_PbluRX.js → credentialed-enF5Bf3y.js} +3316 -179
- package/dist/{executor-D3WIS4vl.js → executor-TnWbvL09.js} +10 -300
- package/dist/{history-AY8rs-FR.js → history-C84mlAwO.js} +2 -1
- package/dist/{images-5VNK_yYC.js → images-BKQqSi5W.js} +3 -3
- package/dist/instrumentation.js +41 -25
- package/dist/{job-queue-BYHonCAH.js → job-queue-DBpHmKnd.js} +53 -14
- package/dist/{logging-DNQqsQ57.js → logging-Ce0mXZ8J.js} +19 -32
- package/dist/{message-CDTJISxL.js → message-VZ3DFpGb.js} +4 -4
- package/dist/nitro.d.ts +17 -2
- package/dist/nitro.js +26 -27
- package/dist/{oauth-callback-server-Bk4rbLOs.js → oauth-callback-server-CpqWLjVY.js} +2 -2
- package/dist/{prompt-CxatQVaj.js → prompt-BcCGlmg2.js} +2 -2
- package/dist/{registry-CfdUEk4N.js → registry-1BEIPdbT.js} +1 -1
- package/dist/{resolve-BXShI336.js → resolve-BSHHkEGE.js} +7 -106
- package/dist/{result-R35jcahx.js → result-CwOpzqdh.js} +8 -8
- package/dist/{runner-IC4Drh3Y.js → runner-CEaX04kz.js} +11 -11
- package/dist/{sandbox-egress-signals-C4RIfjb8.js → sandbox-egress-signals-BwtGHwqa.js} +1 -1
- package/dist/{schema-QidbykYl.js → schema-RsaBHxRH.js} +45 -4
- package/dist/{sentry-BBUlHih9.js → sentry-MDkYAVPV.js} +3 -6
- package/dist/{service-account-DJSRo2cL.js → service-account-6wC76eBZ.js} +5 -5
- package/dist/{service-account-DifohWyX.js → service-account-Dg4lIbHm.js} +3 -3
- package/dist/{session-stop-B9RRGC-P.js → session-stop-tZOw9AJD.js} +120 -80
- package/dist/{skills-DVJmS_ZP.js → skills-DzyGN7wd.js} +2 -2
- package/dist/{spawn-DkVYGfSY.js → spawn-6rokq7l_.js} +2 -2
- package/dist/{store-BvolNnx4.js → store-DcKkzrdt.js} +3 -3
- package/dist/{store-C_mHwAnR.js → store-FALy-JQb.js} +6 -6
- package/dist/{task-queue-BcEyPhtX.js → task-queue-Bg4RS2Gy.js} +14 -19
- package/dist/{task-runner-CiQj5M_9.js → task-runner-8N5LIkSg.js} +47 -29
- package/dist/{tasks-OgXmReUv.js → tasks-DDT-J3Rf.js} +17 -2078
- package/dist/{thread-state-XFvpWXE9.js → thread-state-cprEaxgl.js} +5 -5
- package/dist/{turn-failure-response-BjBAtnVt.js → turn-failure-response-C8sMdsdX.js} +8 -8
- package/dist/{turn-lifecycle-nvKL2rul.js → turn-lifecycle-DaBVoz7h.js} +2 -2
- package/dist/{turn-session-routing-DEMxHySb.js → turn-session-routing-a9CHX-w6.js} +1 -1
- package/dist/{validation-XOFldwvE.js → validation-C2lllinq.js} +1 -1
- package/dist/{version-C9f5hdHD.js → version-oaLfxxnf.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-BuPwzOC9.js → viewer-BpE6Z3qf.js} +22 -6
- package/dist/{web-input-4t7TYLsY.js → web-input-B-bMjD1V.js} +147 -48
- package/dist/{work-C_aF6JN5.js → work-VX1SHWha.js} +52 -51
- package/dist/{worker-DR633sA-.js → worker-hook-y_Y.js} +5 -5
- package/package.json +10 -9
- package/dist/profile-ieODOp4u.js +0 -582
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { At as abandonTurnRecord, Ht as isTurnExecutionLimitExceededError, Kt as getTerminalAssistantMessages, Mt as failTurnRecord, Nt as getTurnRecord, R as openConversationProjection, bt as AuthorizationFlowDisabledError, gt as PluginCredentialFailureError, kt as saveTurnCheckpoint } from "./tasks-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import {
|
|
5
|
-
import { m as sameActorIdentity, u as agentInstructionProvenance } from "./history-
|
|
6
|
-
import {
|
|
7
|
-
import { E as markAgentInvocationSteered, H as TurnInputCommitLostError, K as isTurnInputCommitLostError, L as agentTypeInstructions, O as reportReplacedAgentInvocation, R as agentTypeStartsWithParentHistory, S as markAgentInvocationMailboxAppended, T as markAgentInvocationRunning, W as getConversationTurnBoundaryError, _ as getLatestAgentInvocationForConversation, c as getAgentInvocation, f as getAgentInvocationMessageId, m as getAgentInvocationTurnId, n as completeAgentInvocation, r as createAgentInvocation, s as getActiveAgentInvocationForConversation, w as markAgentInvocationPaused, y as isTerminalAgentInvocation } from "./store-
|
|
8
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
9
|
-
import { F as
|
|
10
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
11
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
12
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-
|
|
2
|
+
import { At as abandonTurnRecord, Ht as isTurnExecutionLimitExceededError, Kt as getTerminalAssistantMessages, Mt as failTurnRecord, Nt as getTurnRecord, R as openConversationProjection, bt as AuthorizationFlowDisabledError, gt as PluginCredentialFailureError, kt as saveTurnCheckpoint } from "./tasks-DDT-J3Rf.js";
|
|
3
|
+
import { n as botConfig } from "./config-C0UwYqDK.js";
|
|
4
|
+
import { d as getConversationStore, l as getConversationEventStore } from "./viewer-BpE6Z3qf.js";
|
|
5
|
+
import { m as sameActorIdentity, u as agentInstructionProvenance } from "./history-C84mlAwO.js";
|
|
6
|
+
import { B as stopChildAgentsOf, H as recordSubagentEnded, U as recordSubagentStarted, X as buildSteeringPiMessage, Z as withoutSavedSteeringMessages, tt as readBlockedReport } from "./agent-runner-BtYK7bht.js";
|
|
7
|
+
import { E as markAgentInvocationSteered, H as TurnInputCommitLostError, K as isTurnInputCommitLostError, L as agentTypeInstructions, O as reportReplacedAgentInvocation, R as agentTypeStartsWithParentHistory, S as markAgentInvocationMailboxAppended, T as markAgentInvocationRunning, W as getConversationTurnBoundaryError, _ as getLatestAgentInvocationForConversation, c as getAgentInvocation, f as getAgentInvocationMessageId, m as getAgentInvocationTurnId, n as completeAgentInvocation, r as createAgentInvocation, s as getActiveAgentInvocationForConversation, w as markAgentInvocationPaused, y as isTerminalAgentInvocation } from "./store-DcKkzrdt.js";
|
|
8
|
+
import { n as getAssistantReplyText } from "./assistant-reply-UyzAfZQo.js";
|
|
9
|
+
import { F as recordFinishedTurnForAutomatedLimit, I as resetAutomatedTurnLimit, P as maybePostAutomatedTurnLimitNotice } from "./session-stop-tZOw9AJD.js";
|
|
10
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-FALy-JQb.js";
|
|
11
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DaBVoz7h.js";
|
|
12
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-cprEaxgl.js";
|
|
13
13
|
import { isDeepStrictEqual } from "node:util";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
// src/chat/runtime/turn-execution.ts
|
|
@@ -35,11 +35,16 @@ async function executeTurn(agentRunner, run, saveResult) {
|
|
|
35
35
|
}
|
|
36
36
|
if (outcome.status !== "completed") return outcome;
|
|
37
37
|
const saved = await saveResult(outcome.result);
|
|
38
|
+
await finishTurn(run.conversationId, run.turnId, saved);
|
|
39
|
+
return { status: "completed" };
|
|
40
|
+
}
|
|
41
|
+
/** Record the terminal lifecycle event of a Turn from its saved result. */
|
|
42
|
+
async function finishTurn(conversationId, turnId, saved) {
|
|
38
43
|
const lifecycle = new ConversationTurnLifecycleService(getConversationEventStore());
|
|
39
44
|
const common = {
|
|
40
|
-
conversationId
|
|
45
|
+
conversationId,
|
|
41
46
|
createdAtMs: saved.finishedAtMs ?? Date.now(),
|
|
42
|
-
turnId
|
|
47
|
+
turnId
|
|
43
48
|
};
|
|
44
49
|
if (saved.outcome === "failed") await lifecycle.fail({
|
|
45
50
|
...common,
|
|
@@ -51,7 +56,6 @@ async function executeTurn(agentRunner, run, saveResult) {
|
|
|
51
56
|
...common,
|
|
52
57
|
outcome: saved.outcome
|
|
53
58
|
});
|
|
54
|
-
return { status: "completed" };
|
|
55
59
|
}
|
|
56
60
|
// src/chat/agent-invocations/fork-history.ts
|
|
57
61
|
/**
|
|
@@ -234,32 +238,41 @@ function createAgentMessageSteeringDrain(context, running) {
|
|
|
234
238
|
return accepted;
|
|
235
239
|
};
|
|
236
240
|
}
|
|
237
|
-
/**
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
await abandonTurnRecord({
|
|
251
|
-
conversationId: common.conversationId,
|
|
252
|
-
errorMessage: "Turn cancelled",
|
|
253
|
-
turnId: common.turnId
|
|
254
|
-
});
|
|
255
|
-
await lifecycle.complete({
|
|
256
|
-
...common,
|
|
241
|
+
/**
|
|
242
|
+
* How a terminal agent invocation ends its child Turn. The live save and the
|
|
243
|
+
* recovery paths both use this, so a status cannot end the Turn two ways.
|
|
244
|
+
*/
|
|
245
|
+
function agentInvocationTurnEnd(terminal) {
|
|
246
|
+
const finishedAtMs = terminal.terminalAtMs;
|
|
247
|
+
switch (terminal.status) {
|
|
248
|
+
case "completed": return {
|
|
249
|
+
finishedAtMs,
|
|
250
|
+
outcome: terminal.result.trim() ? "success" : "no_reply"
|
|
251
|
+
};
|
|
252
|
+
case "stopped": return {
|
|
253
|
+
finishedAtMs,
|
|
257
254
|
outcome: "cancelled"
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
255
|
+
};
|
|
256
|
+
case "blocked": return {
|
|
257
|
+
finishedAtMs,
|
|
258
|
+
outcome: "blocked"
|
|
259
|
+
};
|
|
260
|
+
case "failed": return {
|
|
261
|
+
failureCode: "model_execution_failed",
|
|
262
|
+
finishedAtMs,
|
|
263
|
+
outcome: "failed"
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
/** Project the terminal invocation into the idempotent turn lifecycle. */
|
|
268
|
+
async function persistTerminalLifecycle(terminal) {
|
|
269
|
+
const turnId = getAgentInvocationTurnId(terminal.invocationId);
|
|
270
|
+
if (terminal.status === "stopped") await abandonTurnRecord({
|
|
271
|
+
conversationId: terminal.childConversationId,
|
|
272
|
+
errorMessage: "Turn cancelled",
|
|
273
|
+
turnId
|
|
262
274
|
});
|
|
275
|
+
await finishTurn(terminal.childConversationId, turnId, agentInvocationTurnEnd(terminal));
|
|
263
276
|
}
|
|
264
277
|
/** Stop an invocation whose worker died, or project its terminal turn result. */
|
|
265
278
|
async function projectTerminalTurn(invocation) {
|
|
@@ -345,19 +358,7 @@ async function saveAgentInvocationResult(args) {
|
|
|
345
358
|
}
|
|
346
359
|
});
|
|
347
360
|
if (!terminal || !isTerminalAgentInvocation(terminal)) throw new Error(`Agent invocation did not finish for ${args.invocation.invocationId}`);
|
|
348
|
-
|
|
349
|
-
finishedAtMs: terminal.terminalAtMs,
|
|
350
|
-
outcome: terminal.result.trim() ? "success" : "no_reply"
|
|
351
|
-
};
|
|
352
|
-
if (terminal.status === "stopped") return {
|
|
353
|
-
finishedAtMs: terminal.terminalAtMs,
|
|
354
|
-
outcome: "cancelled"
|
|
355
|
-
};
|
|
356
|
-
return {
|
|
357
|
-
finishedAtMs: terminal.terminalAtMs,
|
|
358
|
-
failureCode: "model_execution_failed",
|
|
359
|
-
outcome: "failed"
|
|
360
|
-
};
|
|
361
|
+
return agentInvocationTurnEnd(terminal);
|
|
361
362
|
}
|
|
362
363
|
/**
|
|
363
364
|
* Read how many parents a child Conversation has and the root Conversation's
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { y as isProviderRetryError } from "./client-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { f as getTurnRequestDeadline, m as ConversationQueueMessageRejectedError } from "./job-queue-
|
|
6
|
-
import { C as requestAnotherSlice, M as isInvalidConversationRecordError, T as startConversationWork, b as recordConversationRetry, d as countPendingConversationMessages, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, j as isFinalAttempt, k as hasConversationStop, l as completeConversationStop, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, s as clearConsumedConversationWake, t as ackMessages, u as completeConversationWork, x as releaseConversationWork, y as recordAttemptFailure } from "./store-
|
|
2
|
+
import { y as isProviderRetryError } from "./client-B0YZfxNy.js";
|
|
3
|
+
import { i as getChatConfig } from "./config-C0UwYqDK.js";
|
|
4
|
+
import { f as logException, m as logWarn, p as logInfo, w as withLogContext, y as setSpanAttributes } from "./logging-Ce0mXZ8J.js";
|
|
5
|
+
import { f as getTurnRequestDeadline, m as ConversationQueueMessageRejectedError } from "./job-queue-DBpHmKnd.js";
|
|
6
|
+
import { C as requestAnotherSlice, M as isInvalidConversationRecordError, T as startConversationWork, b as recordConversationRetry, d as countPendingConversationMessages, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, j as isFinalAttempt, k as hasConversationStop, l as completeConversationStop, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, s as clearConsumedConversationWake, t as ackMessages, u as completeConversationWork, x as releaseConversationWork, y as recordAttemptFailure } from "./store-FALy-JQb.js";
|
|
7
7
|
// src/chat/task-execution/worker.ts
|
|
8
8
|
var worker_exports = /* @__PURE__ */ __exportAll({
|
|
9
9
|
CONVERSATION_WORK_DEFER_DELAY_MS: () => CONVERSATION_WORK_DEFER_DELAY_MS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.266.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"@logtape/logtape": "^2.1.1",
|
|
64
64
|
"@modelcontextprotocol/sdk": "1.32.0",
|
|
65
65
|
"@neondatabase/serverless": "^1.1.0",
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
68
|
-
"@sentry/
|
|
66
|
+
"@sentry/nitro": "11.10.0",
|
|
67
|
+
"@sentry/node": "11.10.0",
|
|
68
|
+
"@sentry/server-utils": "11.10.0",
|
|
69
69
|
"@sinclair/typebox": "^0.34.49",
|
|
70
70
|
"@slack/types": "^2.21.1",
|
|
71
71
|
"@slack/web-api": "^7.16.0",
|
|
@@ -75,7 +75,8 @@
|
|
|
75
75
|
"@vercel/queue": "^0.2.0",
|
|
76
76
|
"@vercel/sandbox": "2.8.0",
|
|
77
77
|
"ai": "^7.0.153",
|
|
78
|
-
"
|
|
78
|
+
"aws4fetch": "^1.0.20",
|
|
79
|
+
"better-auth": "^1.7.14",
|
|
79
80
|
"chat": "4.29.0",
|
|
80
81
|
"commander": "^14.0.3",
|
|
81
82
|
"diff": "^8.0.4",
|
|
@@ -89,12 +90,12 @@
|
|
|
89
90
|
"sharp": "^0.35.3",
|
|
90
91
|
"yaml": "^2.9.0",
|
|
91
92
|
"zod": "^4.5.4",
|
|
92
|
-
"@sentry/junior-plugin-api": "0.
|
|
93
|
+
"@sentry/junior-plugin-api": "0.266.0"
|
|
93
94
|
},
|
|
94
95
|
"devDependencies": {
|
|
95
96
|
"@emnapi/core": "^1.10.0",
|
|
96
97
|
"@emnapi/runtime": "^1.10.0",
|
|
97
|
-
"@hono/node-server": "1.
|
|
98
|
+
"@hono/node-server": "2.1.3",
|
|
98
99
|
"@oxlint/plugins": "1.79.0",
|
|
99
100
|
"@types/node": "^25.9.1",
|
|
100
101
|
"@types/pg": "^8.15.6",
|
|
@@ -109,9 +110,9 @@
|
|
|
109
110
|
"typescript": "^7.0.2",
|
|
110
111
|
"vercel": "^54.4.0",
|
|
111
112
|
"vitest": "^4.1.12",
|
|
113
|
+
"@sentry/junior-github": "0.266.0",
|
|
112
114
|
"@sentry/junior-testing": "0.0.0",
|
|
113
|
-
"@sentry/junior-
|
|
114
|
-
"@sentry/junior-memory": "0.264.0"
|
|
115
|
+
"@sentry/junior-memory": "0.266.0"
|
|
115
116
|
},
|
|
116
117
|
"scripts": {
|
|
117
118
|
"build": "tsdown",
|