@naylence/agent-sdk 0.3.4-test.717 → 0.3.4-test.720
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/dist/browser/index.js
CHANGED
|
@@ -15671,12 +15671,12 @@
|
|
|
15671
15671
|
// --- END ENV SHIM ---
|
|
15672
15672
|
|
|
15673
15673
|
// This file is auto-generated during build - do not edit manually
|
|
15674
|
-
// Generated from package.json version: 0.3.5-test.
|
|
15674
|
+
// Generated from package.json version: 0.3.5-test.920
|
|
15675
15675
|
/**
|
|
15676
15676
|
* The package version, injected at build time.
|
|
15677
15677
|
* @internal
|
|
15678
15678
|
*/
|
|
15679
|
-
const VERSION$1 = '0.3.5-test.
|
|
15679
|
+
const VERSION$1 = '0.3.5-test.920';
|
|
15680
15680
|
|
|
15681
15681
|
/**
|
|
15682
15682
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -16670,17 +16670,18 @@
|
|
|
16670
16670
|
grace_period_ms: gracePeriod,
|
|
16671
16671
|
});
|
|
16672
16672
|
const tasks = Array.from(this._tasks.values());
|
|
16673
|
-
// 1.
|
|
16673
|
+
// 1. Signal all tasks to stop immediately (abort signal)
|
|
16674
|
+
// This allows long-running loops to break out of waits/sleeps
|
|
16675
|
+
tasks.forEach((task) => task.cancel());
|
|
16676
|
+
// 2. Wait gracefully for tasks to complete their cleanup
|
|
16674
16677
|
const completed = await this._waitWithGracePeriod(tasks, gracePeriod);
|
|
16675
|
-
//
|
|
16678
|
+
// 3. Check for stragglers that didn't respond to cancellation
|
|
16676
16679
|
if (cancelHanging) {
|
|
16677
16680
|
const stillRunning = tasks.filter((task) => task.getState() === TaskState.RUNNING && !completed.has(task));
|
|
16678
16681
|
if (stillRunning.length > 0) {
|
|
16679
|
-
logger$1b.debug('
|
|
16682
|
+
logger$1b.debug('tasks_did_not_complete_within_grace_period', {
|
|
16680
16683
|
hanging_count: stillRunning.length,
|
|
16681
16684
|
});
|
|
16682
|
-
// Cancel all hanging tasks
|
|
16683
|
-
stillRunning.forEach((task) => task.cancel());
|
|
16684
16685
|
// Wait for them to finish with individual timeouts
|
|
16685
16686
|
await Promise.allSettled(stillRunning.map(async (task) => {
|
|
16686
16687
|
try {
|