agent-swarm-kit 1.0.146 → 1.0.147

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
@@ -2346,28 +2346,36 @@ var ClientAgent = /** @class */ (function () {
2346
2346
  validation = null;
2347
2347
  return [4 /*yield*/, this.params.validate(result)];
2348
2348
  case 12:
2349
- if (!(validation = _a.sent())) return [3 /*break*/, 15];
2349
+ if (!(validation = _a.sent())) return [3 /*break*/, 16];
2350
2350
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_DEBUG &&
2351
2351
  this.params.logger.debug("ClientAgent agentName=".concat(this.params.agentName, " clientId=").concat(this.params.clientId, " _resurrectModel validation error: ").concat(validation));
2352
2352
  console.warn("agent-swarm model ressurect did not solved the problem for agentName=".concat(this.params.agentName, " clientId=").concat(this.params.clientId, " strategy=").concat(GLOBAL_CONFIG.CC_RESQUE_STRATEGY));
2353
2353
  content = createPlaceholder();
2354
+ return [4 /*yield*/, this.params.history.push({
2355
+ role: "resque",
2356
+ mode: "tool",
2357
+ agentName: this.params.agentName,
2358
+ content: reason || "Unknown error",
2359
+ })];
2360
+ case 13:
2361
+ _a.sent();
2354
2362
  return [4 /*yield*/, this.params.history.push({
2355
2363
  agentName: this.params.agentName,
2356
2364
  role: "assistant",
2357
2365
  mode: "tool",
2358
2366
  content: content,
2359
2367
  })];
2360
- case 13:
2368
+ case 14:
2361
2369
  _a.sent();
2362
2370
  return [4 /*yield*/, this._resqueSubject.next(MODEL_RESQUE_SYMBOL)];
2363
- case 14:
2371
+ case 15:
2364
2372
  _a.sent();
2365
2373
  return [2 /*return*/, content];
2366
- case 15: return [4 /*yield*/, this.params.history.push(__assign(__assign({}, message), { agentName: this.params.agentName }))];
2367
- case 16:
2374
+ case 16: return [4 /*yield*/, this.params.history.push(__assign(__assign({}, message), { agentName: this.params.agentName }))];
2375
+ case 17:
2368
2376
  _a.sent();
2369
2377
  return [4 /*yield*/, this._resqueSubject.next(MODEL_RESQUE_SYMBOL)];
2370
- case 17:
2378
+ case 18:
2371
2379
  _a.sent();
2372
2380
  return [2 /*return*/, result];
2373
2381
  }
package/build/index.mjs CHANGED
@@ -2344,28 +2344,36 @@ var ClientAgent = /** @class */ (function () {
2344
2344
  validation = null;
2345
2345
  return [4 /*yield*/, this.params.validate(result)];
2346
2346
  case 12:
2347
- if (!(validation = _a.sent())) return [3 /*break*/, 15];
2347
+ if (!(validation = _a.sent())) return [3 /*break*/, 16];
2348
2348
  GLOBAL_CONFIG.CC_LOGGER_ENABLE_DEBUG &&
2349
2349
  this.params.logger.debug("ClientAgent agentName=".concat(this.params.agentName, " clientId=").concat(this.params.clientId, " _resurrectModel validation error: ").concat(validation));
2350
2350
  console.warn("agent-swarm model ressurect did not solved the problem for agentName=".concat(this.params.agentName, " clientId=").concat(this.params.clientId, " strategy=").concat(GLOBAL_CONFIG.CC_RESQUE_STRATEGY));
2351
2351
  content = createPlaceholder();
2352
+ return [4 /*yield*/, this.params.history.push({
2353
+ role: "resque",
2354
+ mode: "tool",
2355
+ agentName: this.params.agentName,
2356
+ content: reason || "Unknown error",
2357
+ })];
2358
+ case 13:
2359
+ _a.sent();
2352
2360
  return [4 /*yield*/, this.params.history.push({
2353
2361
  agentName: this.params.agentName,
2354
2362
  role: "assistant",
2355
2363
  mode: "tool",
2356
2364
  content: content,
2357
2365
  })];
2358
- case 13:
2366
+ case 14:
2359
2367
  _a.sent();
2360
2368
  return [4 /*yield*/, this._resqueSubject.next(MODEL_RESQUE_SYMBOL)];
2361
- case 14:
2369
+ case 15:
2362
2370
  _a.sent();
2363
2371
  return [2 /*return*/, content];
2364
- case 15: return [4 /*yield*/, this.params.history.push(__assign(__assign({}, message), { agentName: this.params.agentName }))];
2365
- case 16:
2372
+ case 16: return [4 /*yield*/, this.params.history.push(__assign(__assign({}, message), { agentName: this.params.agentName }))];
2373
+ case 17:
2366
2374
  _a.sent();
2367
2375
  return [4 /*yield*/, this._resqueSubject.next(MODEL_RESQUE_SYMBOL)];
2368
- case 17:
2376
+ case 18:
2369
2377
  _a.sent();
2370
2378
  return [2 /*return*/, result];
2371
2379
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-swarm-kit",
3
- "version": "1.0.146",
3
+ "version": "1.0.147",
4
4
  "description": "A TypeScript library for building orchestrated framework-agnostic multi-agent AI systems",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",