agent-swarm-kit 1.0.30 → 1.0.31

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 CHANGED
@@ -1650,42 +1650,27 @@ var ClientSession = /** @class */ (function () {
1650
1650
  * @param {boolean} [noEmit=false] - Whether to emit the output or not.
1651
1651
  * @returns {Promise<string>} - The output of the execution.
1652
1652
  */
1653
- this.execute = function (message_1, mode_1) {
1654
- var args_1 = [];
1655
- for (var _i = 2; _i < arguments.length; _i++) {
1656
- args_1[_i - 2] = arguments[_i];
1657
- }
1658
- return __awaiter(_this, __spreadArray([message_1, mode_1], __read(args_1), false), void 0, function (message, mode, noEmit) {
1659
- var agent, outputAwaiter, output, _a;
1660
- if (noEmit === void 0) { noEmit = false; }
1661
- return __generator(this, function (_b) {
1662
- switch (_b.label) {
1663
- case 0:
1664
- this.params.logger.debug("ClientSession clientId=".concat(this.params.clientId, " execute"), {
1665
- message: message,
1666
- mode: mode,
1667
- noEmit: noEmit,
1668
- });
1669
- return [4 /*yield*/, this.params.swarm.getAgent()];
1670
- case 1:
1671
- agent = _b.sent();
1672
- outputAwaiter = this.params.swarm.waitForOutput();
1673
- agent.execute(message, mode);
1674
- return [4 /*yield*/, outputAwaiter];
1675
- case 2:
1676
- output = _b.sent();
1677
- _a = !noEmit;
1678
- if (!_a) return [3 /*break*/, 4];
1679
- return [4 /*yield*/, this._emitSubject.next(output)];
1680
- case 3:
1681
- _a = (_b.sent());
1682
- _b.label = 4;
1683
- case 4:
1684
- return [2 /*return*/, output];
1685
- }
1686
- });
1653
+ this.execute = function (message, mode) { return __awaiter(_this, void 0, void 0, function () {
1654
+ var agent, outputAwaiter, output;
1655
+ return __generator(this, function (_a) {
1656
+ switch (_a.label) {
1657
+ case 0:
1658
+ this.params.logger.debug("ClientSession clientId=".concat(this.params.clientId, " execute"), {
1659
+ message: message,
1660
+ mode: mode,
1661
+ });
1662
+ return [4 /*yield*/, this.params.swarm.getAgent()];
1663
+ case 1:
1664
+ agent = _a.sent();
1665
+ outputAwaiter = this.params.swarm.waitForOutput();
1666
+ agent.execute(message, mode);
1667
+ return [4 /*yield*/, outputAwaiter];
1668
+ case 2:
1669
+ output = _a.sent();
1670
+ return [2 /*return*/, output];
1671
+ }
1687
1672
  });
1688
- };
1673
+ }); };
1689
1674
  /**
1690
1675
  * Commits tool output.
1691
1676
  * @param {string} content - The content to commit.
@@ -1783,7 +1768,7 @@ var ClientSession = /** @class */ (function () {
1783
1768
  this.params.logger.debug("ClientSession clientId=".concat(this.params.clientId, " connect call"));
1784
1769
  _a = connector;
1785
1770
  _b = {};
1786
- return [4 /*yield*/, this.execute(incoming.data, "user", true)];
1771
+ return [4 /*yield*/, this.execute(incoming.data, "user")];
1787
1772
  case 1:
1788
1773
  _b.data = _c.sent();
1789
1774
  return [4 /*yield*/, this.params.swarm.getAgentName()];
package/build/index.mjs CHANGED
@@ -1648,42 +1648,27 @@ var ClientSession = /** @class */ (function () {
1648
1648
  * @param {boolean} [noEmit=false] - Whether to emit the output or not.
1649
1649
  * @returns {Promise<string>} - The output of the execution.
1650
1650
  */
1651
- this.execute = function (message_1, mode_1) {
1652
- var args_1 = [];
1653
- for (var _i = 2; _i < arguments.length; _i++) {
1654
- args_1[_i - 2] = arguments[_i];
1655
- }
1656
- return __awaiter(_this, __spreadArray([message_1, mode_1], __read(args_1), false), void 0, function (message, mode, noEmit) {
1657
- var agent, outputAwaiter, output, _a;
1658
- if (noEmit === void 0) { noEmit = false; }
1659
- return __generator(this, function (_b) {
1660
- switch (_b.label) {
1661
- case 0:
1662
- this.params.logger.debug("ClientSession clientId=".concat(this.params.clientId, " execute"), {
1663
- message: message,
1664
- mode: mode,
1665
- noEmit: noEmit,
1666
- });
1667
- return [4 /*yield*/, this.params.swarm.getAgent()];
1668
- case 1:
1669
- agent = _b.sent();
1670
- outputAwaiter = this.params.swarm.waitForOutput();
1671
- agent.execute(message, mode);
1672
- return [4 /*yield*/, outputAwaiter];
1673
- case 2:
1674
- output = _b.sent();
1675
- _a = !noEmit;
1676
- if (!_a) return [3 /*break*/, 4];
1677
- return [4 /*yield*/, this._emitSubject.next(output)];
1678
- case 3:
1679
- _a = (_b.sent());
1680
- _b.label = 4;
1681
- case 4:
1682
- return [2 /*return*/, output];
1683
- }
1684
- });
1651
+ this.execute = function (message, mode) { return __awaiter(_this, void 0, void 0, function () {
1652
+ var agent, outputAwaiter, output;
1653
+ return __generator(this, function (_a) {
1654
+ switch (_a.label) {
1655
+ case 0:
1656
+ this.params.logger.debug("ClientSession clientId=".concat(this.params.clientId, " execute"), {
1657
+ message: message,
1658
+ mode: mode,
1659
+ });
1660
+ return [4 /*yield*/, this.params.swarm.getAgent()];
1661
+ case 1:
1662
+ agent = _a.sent();
1663
+ outputAwaiter = this.params.swarm.waitForOutput();
1664
+ agent.execute(message, mode);
1665
+ return [4 /*yield*/, outputAwaiter];
1666
+ case 2:
1667
+ output = _a.sent();
1668
+ return [2 /*return*/, output];
1669
+ }
1685
1670
  });
1686
- };
1671
+ }); };
1687
1672
  /**
1688
1673
  * Commits tool output.
1689
1674
  * @param {string} content - The content to commit.
@@ -1781,7 +1766,7 @@ var ClientSession = /** @class */ (function () {
1781
1766
  this.params.logger.debug("ClientSession clientId=".concat(this.params.clientId, " connect call"));
1782
1767
  _a = connector;
1783
1768
  _b = {};
1784
- return [4 /*yield*/, this.execute(incoming.data, "user", true)];
1769
+ return [4 /*yield*/, this.execute(incoming.data, "user")];
1785
1770
  case 1:
1786
1771
  _b.data = _c.sent();
1787
1772
  return [4 /*yield*/, this.params.swarm.getAgentName()];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-swarm-kit",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "A TypeScript library for building orchestrated framework-agnostic multi-agent AI systems",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",
package/types.d.ts CHANGED
@@ -962,7 +962,7 @@ declare class ClientSession implements ISession {
962
962
  * @param {boolean} [noEmit=false] - Whether to emit the output or not.
963
963
  * @returns {Promise<string>} - The output of the execution.
964
964
  */
965
- execute: (message: string, mode: ExecutionMode, noEmit?: boolean) => Promise<string>;
965
+ execute: (message: string, mode: ExecutionMode) => Promise<string>;
966
966
  /**
967
967
  * Commits tool output.
968
968
  * @param {string} content - The content to commit.