@11agents/cli 0.1.31 → 0.1.32
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/package.json +1 -1
- package/src/commands/runtime.js +4 -1
package/package.json
CHANGED
package/src/commands/runtime.js
CHANGED
|
@@ -1540,7 +1540,10 @@ async function claimAndRunRuntimeTasks(registration, flags, deps, handlerModule,
|
|
|
1540
1540
|
const config = configFromFlags(flags)
|
|
1541
1541
|
const machineKey = registration?.machine?.machine_key || machineOverride(flags) || ''
|
|
1542
1542
|
|
|
1543
|
-
|
|
1543
|
+
// Each registered runtime must get at least one slot so no runtime is starved.
|
|
1544
|
+
// maxConcurrent controls the ceiling but never drops below runtimes.length.
|
|
1545
|
+
const effectiveConcurrent = Math.max(maxConcurrent, runtimes.length)
|
|
1546
|
+
const slots = Array.from({ length: effectiveConcurrent }, (_, i) => runtimes[i % runtimes.length])
|
|
1544
1547
|
const results = await Promise.allSettled(
|
|
1545
1548
|
slots.map(runtime => runOneRuntimeTaskSlot(runtime, config, machineKey, registration, flags, deps, handlerModule, retryState, heartbeatIntervalMs))
|
|
1546
1549
|
)
|