agent-swarm-kit 1.1.137 → 1.1.138
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/build/index.cjs +4 -4
- package/build/index.mjs +4 -4
- package/package.json +1 -1
package/build/index.cjs
CHANGED
|
@@ -6619,7 +6619,7 @@ class ClientSwarm {
|
|
|
6619
6619
|
getCheckBusy() {
|
|
6620
6620
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_DEBUG &&
|
|
6621
6621
|
this.params.logger.debug(`ClientSwarm swarmName=${this.params.swarmName} clientId=${this.params.clientId} getCheckBusy`);
|
|
6622
|
-
return Promise.resolve(this._isBusy);
|
|
6622
|
+
return Promise.resolve(!!this._isBusy);
|
|
6623
6623
|
}
|
|
6624
6624
|
/**
|
|
6625
6625
|
* Sets the busy state of the swarm.
|
|
@@ -6630,7 +6630,7 @@ class ClientSwarm {
|
|
|
6630
6630
|
setBusy(isBusy) {
|
|
6631
6631
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_DEBUG &&
|
|
6632
6632
|
this.params.logger.debug(`ClientSwarm swarmName=${this.params.swarmName} clientId=${this.params.clientId} setBusy`, { isBusy });
|
|
6633
|
-
this._isBusy
|
|
6633
|
+
this._isBusy += isBusy ? 1 : -1;
|
|
6634
6634
|
}
|
|
6635
6635
|
/**
|
|
6636
6636
|
* Getter for the list of agent name-agent pairs from the agent map (params.agentMap).
|
|
@@ -6647,7 +6647,7 @@ class ClientSwarm {
|
|
|
6647
6647
|
*/
|
|
6648
6648
|
constructor(params) {
|
|
6649
6649
|
this.params = params;
|
|
6650
|
-
this._isBusy =
|
|
6650
|
+
this._isBusy = 0;
|
|
6651
6651
|
/**
|
|
6652
6652
|
* Subject that emits when an agent reference changes, providing the agent name and instance.
|
|
6653
6653
|
* Used by setAgentRef to notify subscribers (e.g., waitForOutput) of updates to agent instances.
|
|
@@ -7491,8 +7491,8 @@ class ClientSession {
|
|
|
7491
7491
|
const outputAwaiter = this.params.swarm.waitForOutput();
|
|
7492
7492
|
agent.execute(message, mode);
|
|
7493
7493
|
const output = await outputAwaiter;
|
|
7494
|
-
await swarm$1.executionValidationService.flushCount(this.params.clientId, this.params.swarmName);
|
|
7495
7494
|
this.params.swarm.setBusy(false);
|
|
7495
|
+
await swarm$1.executionValidationService.flushCount(this.params.clientId, this.params.swarmName);
|
|
7496
7496
|
if (await functoolsKit.not(this.params.policy.validateOutput(output, this.params.clientId, this.params.swarmName))) {
|
|
7497
7497
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_DEBUG &&
|
|
7498
7498
|
this.params.logger.debug(`ClientSession clientId=${this.params.clientId} execution output emit canceled due to the banhammer of a client`, {
|
package/build/index.mjs
CHANGED
|
@@ -6617,7 +6617,7 @@ class ClientSwarm {
|
|
|
6617
6617
|
getCheckBusy() {
|
|
6618
6618
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_DEBUG &&
|
|
6619
6619
|
this.params.logger.debug(`ClientSwarm swarmName=${this.params.swarmName} clientId=${this.params.clientId} getCheckBusy`);
|
|
6620
|
-
return Promise.resolve(this._isBusy);
|
|
6620
|
+
return Promise.resolve(!!this._isBusy);
|
|
6621
6621
|
}
|
|
6622
6622
|
/**
|
|
6623
6623
|
* Sets the busy state of the swarm.
|
|
@@ -6628,7 +6628,7 @@ class ClientSwarm {
|
|
|
6628
6628
|
setBusy(isBusy) {
|
|
6629
6629
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_DEBUG &&
|
|
6630
6630
|
this.params.logger.debug(`ClientSwarm swarmName=${this.params.swarmName} clientId=${this.params.clientId} setBusy`, { isBusy });
|
|
6631
|
-
this._isBusy
|
|
6631
|
+
this._isBusy += isBusy ? 1 : -1;
|
|
6632
6632
|
}
|
|
6633
6633
|
/**
|
|
6634
6634
|
* Getter for the list of agent name-agent pairs from the agent map (params.agentMap).
|
|
@@ -6645,7 +6645,7 @@ class ClientSwarm {
|
|
|
6645
6645
|
*/
|
|
6646
6646
|
constructor(params) {
|
|
6647
6647
|
this.params = params;
|
|
6648
|
-
this._isBusy =
|
|
6648
|
+
this._isBusy = 0;
|
|
6649
6649
|
/**
|
|
6650
6650
|
* Subject that emits when an agent reference changes, providing the agent name and instance.
|
|
6651
6651
|
* Used by setAgentRef to notify subscribers (e.g., waitForOutput) of updates to agent instances.
|
|
@@ -7489,8 +7489,8 @@ class ClientSession {
|
|
|
7489
7489
|
const outputAwaiter = this.params.swarm.waitForOutput();
|
|
7490
7490
|
agent.execute(message, mode);
|
|
7491
7491
|
const output = await outputAwaiter;
|
|
7492
|
-
await swarm$1.executionValidationService.flushCount(this.params.clientId, this.params.swarmName);
|
|
7493
7492
|
this.params.swarm.setBusy(false);
|
|
7493
|
+
await swarm$1.executionValidationService.flushCount(this.params.clientId, this.params.swarmName);
|
|
7494
7494
|
if (await not(this.params.policy.validateOutput(output, this.params.clientId, this.params.swarmName))) {
|
|
7495
7495
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_DEBUG &&
|
|
7496
7496
|
this.params.logger.debug(`ClientSession clientId=${this.params.clientId} execution output emit canceled due to the banhammer of a client`, {
|