@womp/spark-agent 9.2.0 → 9.2.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 +10 -0
- package/dist/scene-health.js +3 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ Notable changes to `@womp/spark-agent`, newest first. Versions follow
|
|
|
4
4
|
[Semantic Versioning](https://semver.org/). Add an entry with each version bump; describe what
|
|
5
5
|
changed for hosts and users, and how to migrate across breaking changes.
|
|
6
6
|
|
|
7
|
+
## 9.2.1 — 2026-10-13
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- SDK scene health reads `get_thermometer` directly. Kakapo now holds that reply until the
|
|
12
|
+
latest edits are processed (wompxyz/kakapo#3708), so the read no longer waits for a renderer
|
|
13
|
+
frame first (`waitForRenderer()`: 500 ms plus a frame request after each edit). It no longer
|
|
14
|
+
gives up after 15 s either. Kakapo's own 20 s timeout, like any other read failure, still
|
|
15
|
+
reports unverified health.
|
|
16
|
+
|
|
7
17
|
## 9.2.0 — 2026-10-12
|
|
8
18
|
|
|
9
19
|
### Added
|
package/dist/scene-health.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export const MAX_GEOMETRY_REPAIR_ATTEMPTS = 2;
|
|
3
|
-
const HEALTH_TIMEOUT_MS = 15_000;
|
|
4
3
|
const count = z.number().finite().nonnegative();
|
|
5
4
|
export const sceneHealthObjectSchema = z.object({
|
|
6
5
|
num_prims: count,
|
|
@@ -204,7 +203,6 @@ export function parseSceneHealth(response, affectedAreaIds) {
|
|
|
204
203
|
};
|
|
205
204
|
}
|
|
206
205
|
export async function readSdkSceneHealth(api, affectedAreaIds, signal) {
|
|
207
|
-
let timeout;
|
|
208
206
|
let removeAbortListener;
|
|
209
207
|
try {
|
|
210
208
|
signal?.throwIfAborted();
|
|
@@ -215,15 +213,10 @@ export async function readSdkSceneHealth(api, affectedAreaIds, signal) {
|
|
|
215
213
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
216
214
|
removeAbortListener = () => signal.removeEventListener("abort", onAbort);
|
|
217
215
|
});
|
|
216
|
+
// Kakapo holds the reply until the latest edits are processed, and fails
|
|
217
|
+
// it after 20 s; that failure reads as unverified health.
|
|
218
218
|
return await Promise.race([
|
|
219
|
-
(
|
|
220
|
-
await api.waitForRenderer();
|
|
221
|
-
signal?.throwIfAborted();
|
|
222
|
-
return parseSceneHealth(await api.rpc("get_thermometer"), affectedAreaIds);
|
|
223
|
-
})(),
|
|
224
|
-
new Promise((resolve) => {
|
|
225
|
-
timeout = setTimeout(() => resolve(unverifiedSceneHealth(affectedAreaIds, "Scene health timed out.")), HEALTH_TIMEOUT_MS);
|
|
226
|
-
}),
|
|
219
|
+
api.rpc("get_thermometer").then((response) => parseSceneHealth(response, affectedAreaIds)),
|
|
227
220
|
aborted,
|
|
228
221
|
]);
|
|
229
222
|
}
|
|
@@ -231,8 +224,6 @@ export async function readSdkSceneHealth(api, affectedAreaIds, signal) {
|
|
|
231
224
|
return unverifiedSceneHealth(affectedAreaIds, String(error));
|
|
232
225
|
}
|
|
233
226
|
finally {
|
|
234
|
-
if (timeout !== undefined)
|
|
235
|
-
clearTimeout(timeout);
|
|
236
227
|
removeAbortListener?.();
|
|
237
228
|
}
|
|
238
229
|
}
|