@mozaik-ai/core 4.0.1 → 4.0.2

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/dist/index.js CHANGED
@@ -886,10 +886,10 @@ var EventPublisherLoopVisitor = class {
886
886
  this.cloud = (0, import_cloud_sdk.createCloudClient)();
887
887
  }
888
888
  visitContextUpdateStarted(input) {
889
- this.publish("context_update.started", { ...input, loopId: this.loopId });
889
+ this.publish("context_update.started", input);
890
890
  }
891
891
  visitContextUpdateCompleted(output) {
892
- this.publish("context_update.completed", { ...output, loopId: this.loopId });
892
+ this.publish("context_update.completed", output);
893
893
  }
894
894
  visitInferenceStarted(input) {
895
895
  this.publish("inference.started", input);
@@ -919,7 +919,23 @@ var EventPublisherLoopVisitor = class {
919
919
  const event = new SemanticEvent(type, this.agentId, /* @__PURE__ */ new Date(), payload);
920
920
  this.runtime.publish(event);
921
921
  if (this.cloud.enabled) {
922
- this.cloud.send(event);
922
+ const participant = this.runtime.getParticipant(this.agentId);
923
+ const agent = participant;
924
+ if (agent) {
925
+ this.cloud.send({
926
+ ...event,
927
+ payload: {
928
+ ...payload,
929
+ loopId: this.loopId,
930
+ agent: {
931
+ manfifeset: agent.getManifest(),
932
+ developerMessage: agent.getDeveloperMessage(),
933
+ tools: agent.getTools(),
934
+ memory: agent.getMemory().getContext().getItems()
935
+ }
936
+ }
937
+ });
938
+ }
923
939
  }
924
940
  }
925
941
  };