agent-swarm-kit 1.0.57 → 1.0.58

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
@@ -926,6 +926,7 @@ var AgentConnectionService = /** @class */ (function () {
926
926
  this.contextService = inject(TYPES.contextService);
927
927
  this.sessionValidationService = inject(TYPES.sessionValidationService);
928
928
  this.historyConnectionService = inject(TYPES.historyConnectionService);
929
+ this.storageConnectionService = inject(TYPES.storageConnectionService);
929
930
  this.agentSchemaService = inject(TYPES.agentSchemaService);
930
931
  this.toolSchemaService = inject(TYPES.toolSchemaService);
931
932
  this.completionSchemaService = inject(TYPES.completionSchemaService);
@@ -939,9 +940,14 @@ var AgentConnectionService = /** @class */ (function () {
939
940
  var _b = __read(_a, 2), clientId = _b[0], agentName = _b[1];
940
941
  return "".concat(clientId, "-").concat(agentName);
941
942
  }, function (clientId, agentName) {
942
- var _a = _this.agentSchemaService.get(agentName), prompt = _a.prompt, system = _a.system, tools = _a.tools, _b = _a.transform, transform = _b === void 0 ? GLOBAL_CONFIG.CC_AGENT_OUTPUT_TRANSFORM : _b, _c = _a.map, map = _c === void 0 ? GLOBAL_CONFIG.CC_AGENT_OUTPUT_MAP : _c, callbacks = _a.callbacks, completionName = _a.completion, _d = _a.validate, validate = _d === void 0 ? validateDefault : _d;
943
+ var _a = _this.agentSchemaService.get(agentName), prompt = _a.prompt, system = _a.system, tools = _a.tools, _b = _a.transform, transform = _b === void 0 ? GLOBAL_CONFIG.CC_AGENT_OUTPUT_TRANSFORM : _b, _c = _a.map, map = _c === void 0 ? GLOBAL_CONFIG.CC_AGENT_OUTPUT_MAP : _c, callbacks = _a.callbacks, storages = _a.storages, completionName = _a.completion, _d = _a.validate, validate = _d === void 0 ? validateDefault : _d;
943
944
  var completion = _this.completionSchemaService.get(completionName);
944
945
  _this.sessionValidationService.addAgentUsage(clientId, agentName);
946
+ storages === null || storages === void 0 ? void 0 : storages.forEach(function (storageName) {
947
+ return _this.storageConnectionService
948
+ .getStorage(clientId, storageName)
949
+ .waitForInit();
950
+ });
945
951
  return new ClientAgent(__assign({ clientId: clientId, agentName: agentName, validate: validate, logger: _this.loggerService, history: _this.historyConnectionService.getHistory(clientId, agentName), prompt: prompt, system: system, transform: transform, map: map, tools: tools === null || tools === void 0 ? void 0 : tools.map(_this.toolSchemaService.get), completion: completion }, callbacks));
946
952
  });
947
953
  /**
package/build/index.mjs CHANGED
@@ -924,6 +924,7 @@ var AgentConnectionService = /** @class */ (function () {
924
924
  this.contextService = inject(TYPES.contextService);
925
925
  this.sessionValidationService = inject(TYPES.sessionValidationService);
926
926
  this.historyConnectionService = inject(TYPES.historyConnectionService);
927
+ this.storageConnectionService = inject(TYPES.storageConnectionService);
927
928
  this.agentSchemaService = inject(TYPES.agentSchemaService);
928
929
  this.toolSchemaService = inject(TYPES.toolSchemaService);
929
930
  this.completionSchemaService = inject(TYPES.completionSchemaService);
@@ -937,9 +938,14 @@ var AgentConnectionService = /** @class */ (function () {
937
938
  var _b = __read(_a, 2), clientId = _b[0], agentName = _b[1];
938
939
  return "".concat(clientId, "-").concat(agentName);
939
940
  }, function (clientId, agentName) {
940
- var _a = _this.agentSchemaService.get(agentName), prompt = _a.prompt, system = _a.system, tools = _a.tools, _b = _a.transform, transform = _b === void 0 ? GLOBAL_CONFIG.CC_AGENT_OUTPUT_TRANSFORM : _b, _c = _a.map, map = _c === void 0 ? GLOBAL_CONFIG.CC_AGENT_OUTPUT_MAP : _c, callbacks = _a.callbacks, completionName = _a.completion, _d = _a.validate, validate = _d === void 0 ? validateDefault : _d;
941
+ var _a = _this.agentSchemaService.get(agentName), prompt = _a.prompt, system = _a.system, tools = _a.tools, _b = _a.transform, transform = _b === void 0 ? GLOBAL_CONFIG.CC_AGENT_OUTPUT_TRANSFORM : _b, _c = _a.map, map = _c === void 0 ? GLOBAL_CONFIG.CC_AGENT_OUTPUT_MAP : _c, callbacks = _a.callbacks, storages = _a.storages, completionName = _a.completion, _d = _a.validate, validate = _d === void 0 ? validateDefault : _d;
941
942
  var completion = _this.completionSchemaService.get(completionName);
942
943
  _this.sessionValidationService.addAgentUsage(clientId, agentName);
944
+ storages === null || storages === void 0 ? void 0 : storages.forEach(function (storageName) {
945
+ return _this.storageConnectionService
946
+ .getStorage(clientId, storageName)
947
+ .waitForInit();
948
+ });
943
949
  return new ClientAgent(__assign({ clientId: clientId, agentName: agentName, validate: validate, logger: _this.loggerService, history: _this.historyConnectionService.getHistory(clientId, agentName), prompt: prompt, system: system, transform: transform, map: map, tools: tools === null || tools === void 0 ? void 0 : tools.map(_this.toolSchemaService.get), completion: completion }, callbacks));
944
950
  });
945
951
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-swarm-kit",
3
- "version": "1.0.57",
3
+ "version": "1.0.58",
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
@@ -915,6 +915,7 @@ declare class AgentConnectionService implements IAgent {
915
915
  private readonly contextService;
916
916
  private readonly sessionValidationService;
917
917
  private readonly historyConnectionService;
918
+ private readonly storageConnectionService;
918
919
  private readonly agentSchemaService;
919
920
  private readonly toolSchemaService;
920
921
  private readonly completionSchemaService;