@theokit/sdk 3.1.0 → 3.1.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/CHANGELOG.md +6 -0
- package/dist/a2a/index.cjs +14 -9
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.js +14 -9
- package/dist/a2a/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5f0507c: Fix a leaked timeout timer in `MessageBus.request` (a2a). The request raced the handler against a `setTimeout`, but never cleared the timer when the handler won — a successful request left a live 30s timer that kept the Node event loop alive, so a process hung after the reply. The timer is now cleared in a `finally`.
|
|
8
|
+
|
|
3
9
|
## 3.1.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/a2a/index.cjs
CHANGED
|
@@ -19201,15 +19201,20 @@ var MessageBus = class {
|
|
|
19201
19201
|
// SE3 — provenance projection of the sender address (thin view over `from`).
|
|
19202
19202
|
origin: { kind: "peer", from }
|
|
19203
19203
|
};
|
|
19204
|
-
|
|
19205
|
-
|
|
19206
|
-
|
|
19207
|
-
(
|
|
19208
|
-
|
|
19209
|
-
|
|
19210
|
-
|
|
19211
|
-
|
|
19212
|
-
|
|
19204
|
+
let timer;
|
|
19205
|
+
try {
|
|
19206
|
+
return await Promise.race([
|
|
19207
|
+
Promise.resolve(handler(message)),
|
|
19208
|
+
new Promise((_, reject) => {
|
|
19209
|
+
timer = setTimeout(
|
|
19210
|
+
() => reject(new Error(`A2A request timeout: ${to} did not respond within ${timeoutMs}ms`)),
|
|
19211
|
+
timeoutMs
|
|
19212
|
+
);
|
|
19213
|
+
})
|
|
19214
|
+
]);
|
|
19215
|
+
} finally {
|
|
19216
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
19217
|
+
}
|
|
19213
19218
|
}
|
|
19214
19219
|
has(agentId) {
|
|
19215
19220
|
return this._handlers.has(agentId);
|