@tangle-network/agent-app 0.60.44 → 0.60.45
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.
|
@@ -1830,6 +1830,10 @@ function abortedToolCall(parts) {
|
|
|
1830
1830
|
}
|
|
1831
1831
|
return void 0;
|
|
1832
1832
|
}
|
|
1833
|
+
function sessionHoldsLiveWork(status) {
|
|
1834
|
+
if (status.status !== "queued" && status.status !== "running") return false;
|
|
1835
|
+
return status.raw?.state !== "stale";
|
|
1836
|
+
}
|
|
1833
1837
|
function missingTurnReceipt(turnId, error) {
|
|
1834
1838
|
return { turnId, state: "failed", text: "", parts: [], usage: {}, error };
|
|
1835
1839
|
}
|
|
@@ -1865,7 +1869,7 @@ async function observeNativeCompletion(options) {
|
|
|
1865
1869
|
}
|
|
1866
1870
|
const exactSession = session;
|
|
1867
1871
|
if (admission.state === "open") {
|
|
1868
|
-
if (status
|
|
1872
|
+
if (sessionHoldsLiveWork(status)) {
|
|
1869
1873
|
admission = await options.admissionStore.renew(options.executionId, new Date(now)) ?? admission;
|
|
1870
1874
|
} else if (leaseUntil <= now) {
|
|
1871
1875
|
admission = await options.admissionStore.closeExpired(options.executionId, new Date(now)) ?? admission;
|