@sentry/junior 0.58.0 → 0.59.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/app.js +10 -6
- package/dist/chat/agent-dispatch/store.d.ts +4 -2
- package/package.json +3 -3
package/dist/app.js
CHANGED
|
@@ -14248,9 +14248,12 @@ function buildDispatchId(plugin, idempotencyKey) {
|
|
|
14248
14248
|
const digest = createHash2("sha256").update(plugin).update("\0").update(idempotencyKey).digest("hex").slice(0, 32);
|
|
14249
14249
|
return `dispatch_${digest}`;
|
|
14250
14250
|
}
|
|
14251
|
-
function
|
|
14251
|
+
function getDispatchDestinationLockId(destination) {
|
|
14252
14252
|
return `slack:${destination.teamId}:${destination.channelId}`;
|
|
14253
14253
|
}
|
|
14254
|
+
function getDispatchConversationId(dispatch) {
|
|
14255
|
+
return `agent-dispatch:${dispatch.id}`;
|
|
14256
|
+
}
|
|
14254
14257
|
function getDispatchTurnId(dispatchId) {
|
|
14255
14258
|
return `dispatch:${dispatchId}`;
|
|
14256
14259
|
}
|
|
@@ -14466,14 +14469,15 @@ async function runAgentDispatchSlice(callback, deps = {}) {
|
|
|
14466
14469
|
return;
|
|
14467
14470
|
}
|
|
14468
14471
|
let dispatch = claimedDispatch;
|
|
14469
|
-
const conversationId = getDispatchConversationId(dispatch
|
|
14472
|
+
const conversationId = getDispatchConversationId(dispatch);
|
|
14473
|
+
const destinationLockId = getDispatchDestinationLockId(dispatch.destination);
|
|
14470
14474
|
const stateAdapter = getStateAdapter();
|
|
14471
14475
|
await stateAdapter.connect();
|
|
14472
|
-
const
|
|
14473
|
-
|
|
14476
|
+
const destinationLock = await stateAdapter.acquireLock(
|
|
14477
|
+
destinationLockId,
|
|
14474
14478
|
DISPATCH_SLICE_LEASE_MS
|
|
14475
14479
|
);
|
|
14476
|
-
if (!
|
|
14480
|
+
if (!destinationLock) {
|
|
14477
14481
|
await markDispatch({
|
|
14478
14482
|
dispatch,
|
|
14479
14483
|
status: "pending",
|
|
@@ -14698,7 +14702,7 @@ async function runAgentDispatchSlice(callback, deps = {}) {
|
|
|
14698
14702
|
errorMessage: error instanceof Error ? error.message : String(error)
|
|
14699
14703
|
});
|
|
14700
14704
|
} finally {
|
|
14701
|
-
await stateAdapter.releaseLock(
|
|
14705
|
+
await stateAdapter.releaseLock(destinationLock);
|
|
14702
14706
|
}
|
|
14703
14707
|
}
|
|
14704
14708
|
|
|
@@ -2,8 +2,10 @@ import type { StateAdapter } from "chat";
|
|
|
2
2
|
import type { DispatchCreateResult, DispatchOptions, DispatchProjection, DispatchRecord, DispatchStatus } from "./types";
|
|
3
3
|
/** Keep dispatch persistence keys consistent across callback and recovery paths. */
|
|
4
4
|
export declare function getDispatchStorageKey(id: string): string;
|
|
5
|
-
/** Map a dispatch destination to the
|
|
6
|
-
export declare function
|
|
5
|
+
/** Map a dispatch destination to the lock key that serializes Slack delivery. */
|
|
6
|
+
export declare function getDispatchDestinationLockId(destination: DispatchRecord["destination"]): string;
|
|
7
|
+
/** Return the isolated persisted conversation key for one dispatch run. */
|
|
8
|
+
export declare function getDispatchConversationId(dispatch: Pick<DispatchRecord, "id">): string;
|
|
7
9
|
/** Give dispatch slices stable turn ids for resumability and trace correlation. */
|
|
8
10
|
export declare function getDispatchTurnId(dispatchId: string): string;
|
|
9
11
|
/** Gate recovery to dispatches that can still make progress. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"node-html-markdown": "^2.0.0",
|
|
65
65
|
"yaml": "^2.9.0",
|
|
66
66
|
"zod": "^4.4.3",
|
|
67
|
-
"@sentry/junior-plugin-api": "0.
|
|
67
|
+
"@sentry/junior-plugin-api": "0.59.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/node": "^25.9.1",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"typescript": "^6.0.3",
|
|
77
77
|
"vercel": "^54.4.0",
|
|
78
78
|
"vitest": "^4.1.7",
|
|
79
|
-
"@sentry/junior-scheduler": "0.
|
|
79
|
+
"@sentry/junior-scheduler": "0.59.0"
|
|
80
80
|
},
|
|
81
81
|
"scripts": {
|
|
82
82
|
"build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",
|