@gajae-code/agent-core 0.12.12 → 0.12.14
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 +8 -0
- package/package.json +4 -4
- package/src/agent-loop.ts +26 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.12.14] - 2026-08-06
|
|
6
|
+
|
|
7
|
+
## [0.12.13] - 2026-08-06
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- An aborted run whose tool ignores its `AbortSignal` now terminates on its own (#3894). `Promise.allSettled` waited on the unresolved call forever, so the turn only ended when the session's force-abort budget expired; the loop now emits a synthetic aborted result for the outstanding calls and `waitForIdle` settles immediately. Session dispose consequently reaches idle through the cooperative path instead of force-invalidating the run.
|
|
12
|
+
|
|
5
13
|
## [0.12.12] - 2026-08-05
|
|
6
14
|
|
|
7
15
|
### Fixed
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gajae-code/agent-core",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.14",
|
|
5
5
|
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
|
|
6
6
|
"homepage": "https://gajae-code.com",
|
|
7
7
|
"author": "Yeachan-Heo and Gajae Code Contributors",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"fmt": "biome format --write ."
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@gajae-code/ai": "0.12.
|
|
36
|
-
"@gajae-code/natives": "0.12.
|
|
37
|
-
"@gajae-code/utils": "0.12.
|
|
35
|
+
"@gajae-code/ai": "0.12.14",
|
|
36
|
+
"@gajae-code/natives": "0.12.14",
|
|
37
|
+
"@gajae-code/utils": "0.12.14",
|
|
38
38
|
"@opentelemetry/api": "^1.9.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
package/src/agent-loop.ts
CHANGED
|
@@ -2895,7 +2895,26 @@ async function executeToolCalls(
|
|
|
2895
2895
|
}
|
|
2896
2896
|
}
|
|
2897
2897
|
|
|
2898
|
-
|
|
2898
|
+
const allTasks = Promise.allSettled(tasks);
|
|
2899
|
+
if (!signal) {
|
|
2900
|
+
await allTasks;
|
|
2901
|
+
} else {
|
|
2902
|
+
const abortPromise = Promise.withResolvers<boolean>();
|
|
2903
|
+
const onAbort = () => abortPromise.resolve(true);
|
|
2904
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
2905
|
+
try {
|
|
2906
|
+
const aborted = signal.aborted || (await Promise.race([allTasks.then(() => false), abortPromise.promise]));
|
|
2907
|
+
if (aborted) {
|
|
2908
|
+
for (const record of records) {
|
|
2909
|
+
if (record.toolResultMessage) continue;
|
|
2910
|
+
record.skipped = true;
|
|
2911
|
+
emitToolResult(record, createAbortedToolExecutionResult(), true);
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
} finally {
|
|
2915
|
+
signal.removeEventListener("abort", onAbort);
|
|
2916
|
+
}
|
|
2917
|
+
}
|
|
2899
2918
|
|
|
2900
2919
|
for (const record of records) {
|
|
2901
2920
|
if (!record.toolResultMessage) {
|
|
@@ -2970,3 +2989,9 @@ function createSkippedToolResult(): AgentToolResult<any> {
|
|
|
2970
2989
|
details: {},
|
|
2971
2990
|
};
|
|
2972
2991
|
}
|
|
2992
|
+
function createAbortedToolExecutionResult(): AgentToolResult<any> {
|
|
2993
|
+
return {
|
|
2994
|
+
content: [{ type: "text", text: "Tool execution was aborted." }],
|
|
2995
|
+
details: {},
|
|
2996
|
+
};
|
|
2997
|
+
}
|