@mozaik-ai/core 4.0.1 → 4.0.3
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 +23 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -822,10 +822,10 @@ var EventPublisherLoopVisitor = class {
|
|
|
822
822
|
this.cloud = createCloudClient();
|
|
823
823
|
}
|
|
824
824
|
visitContextUpdateStarted(input) {
|
|
825
|
-
this.publish("context_update.started",
|
|
825
|
+
this.publish("context_update.started", input);
|
|
826
826
|
}
|
|
827
827
|
visitContextUpdateCompleted(output) {
|
|
828
|
-
this.publish("context_update.completed",
|
|
828
|
+
this.publish("context_update.completed", output);
|
|
829
829
|
}
|
|
830
830
|
visitInferenceStarted(input) {
|
|
831
831
|
this.publish("inference.started", input);
|
|
@@ -852,10 +852,29 @@ var EventPublisherLoopVisitor = class {
|
|
|
852
852
|
this.publish("interception.finished", transition);
|
|
853
853
|
}
|
|
854
854
|
publish(type, payload) {
|
|
855
|
-
const event = new SemanticEvent(type, this.agentId, /* @__PURE__ */ new Date(),
|
|
855
|
+
const event = new SemanticEvent(type, this.agentId, /* @__PURE__ */ new Date(), {
|
|
856
|
+
...payload,
|
|
857
|
+
loopId: this.loopId
|
|
858
|
+
});
|
|
856
859
|
this.runtime.publish(event);
|
|
857
860
|
if (this.cloud.enabled) {
|
|
858
|
-
this.
|
|
861
|
+
const participant = this.runtime.getParticipant(this.agentId);
|
|
862
|
+
const agent = participant;
|
|
863
|
+
if (agent) {
|
|
864
|
+
this.cloud.send({
|
|
865
|
+
...event,
|
|
866
|
+
payload: {
|
|
867
|
+
...payload,
|
|
868
|
+
loopId: this.loopId,
|
|
869
|
+
agent: {
|
|
870
|
+
manifest: agent.getManifest(),
|
|
871
|
+
developerMessage: agent.getDeveloperMessage(),
|
|
872
|
+
tools: agent.getTools(),
|
|
873
|
+
memory: agent.getMemory().getContext().getItems()
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
});
|
|
877
|
+
}
|
|
859
878
|
}
|
|
860
879
|
}
|
|
861
880
|
};
|