@womp/spark-agent 15.0.0 → 15.0.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/server/service.js +13 -3
- 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
|
+
## 15.0.1 — 2026-10-21
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Stopping a run or a goal while the model is streaming its answer ends the run as cancelled with
|
|
12
|
+
the stop's own reason. `SparkAgentService` aborted with a plain `Error`, which the AI SDK does not
|
|
13
|
+
recognise as an abort, so it reported the cut-off answer as `Failed to process successful
|
|
14
|
+
response`. Hosts showed that as an unreadable AI response until the stored run replaced it. The
|
|
15
|
+
stop, cancel and shutdown reasons are now named `AbortError`; their messages are unchanged.
|
|
16
|
+
|
|
7
17
|
## 15.0.0 — 2026-10-21
|
|
8
18
|
|
|
9
19
|
Procedural materials are FlowIR only. The native-JSON helper path and its skills are removed.
|
package/dist/server/service.js
CHANGED
|
@@ -24,6 +24,16 @@ function sleep(ms) {
|
|
|
24
24
|
timer.unref();
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The reason a run is stopped with on purpose. It must be NAMED `AbortError`:
|
|
29
|
+
* the AI SDK recognises an abort by that name only, so a plain Error that cuts
|
|
30
|
+
* off a streaming model response is reported as the response failing
|
|
31
|
+
* (`AI_APICallError: Failed to process successful response`), and a user's
|
|
32
|
+
* stop reached their chat as "a response that couldn't be read".
|
|
33
|
+
*/
|
|
34
|
+
function stopReason(message) {
|
|
35
|
+
return Object.assign(new Error(message), { name: "AbortError" });
|
|
36
|
+
}
|
|
27
37
|
function runNotSaved(cause) {
|
|
28
38
|
return new Error(RUN_NOT_SAVED_ERROR, { cause });
|
|
29
39
|
}
|
|
@@ -281,7 +291,7 @@ export class SparkAgentService {
|
|
|
281
291
|
}
|
|
282
292
|
});
|
|
283
293
|
if (interrupt) {
|
|
284
|
-
this.controllers.get(interrupt)?.abort(
|
|
294
|
+
this.controllers.get(interrupt)?.abort(stopReason("Goal stopped by the user."));
|
|
285
295
|
await this.executions.get(interrupt);
|
|
286
296
|
result.goal = (await this.getConversation(ownerId, conversationId)).goal;
|
|
287
297
|
}
|
|
@@ -330,7 +340,7 @@ export class SparkAgentService {
|
|
|
330
340
|
async close() {
|
|
331
341
|
this.closing = true;
|
|
332
342
|
for (const controller of this.controllers.values())
|
|
333
|
-
controller.abort(
|
|
343
|
+
controller.abort(stopReason("Standalone host is shutting down"));
|
|
334
344
|
await Promise.all([...this.executions.values()]);
|
|
335
345
|
}
|
|
336
346
|
async submitMessage(input) {
|
|
@@ -458,7 +468,7 @@ export class SparkAgentService {
|
|
|
458
468
|
return this.getRun(ownerId, runId);
|
|
459
469
|
throw new Error("The run's executor is unavailable; cancellation could not be confirmed.");
|
|
460
470
|
}
|
|
461
|
-
controller.abort(
|
|
471
|
+
controller.abort(stopReason("Run cancelled by the user."));
|
|
462
472
|
// Drain receipts and pending host work before publishing a terminal state.
|
|
463
473
|
await execution;
|
|
464
474
|
return this.getRun(ownerId, runId);
|