@mozaik-ai/core 4.0.0-beta.8 → 4.0.0-beta.9
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 +7 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -813,11 +813,13 @@ var ModelMessageToIdleRule = class {
|
|
|
813
813
|
};
|
|
814
814
|
|
|
815
815
|
// src/domain/agentic-environment/loop/event-publisher-visitor.ts
|
|
816
|
+
import { createCloudClient } from "@mozaik-ai/cloud-sdk";
|
|
816
817
|
var EventPublisherLoopVisitor = class {
|
|
817
818
|
constructor(agentId, loopId, runtime) {
|
|
818
819
|
this.agentId = agentId;
|
|
819
820
|
this.loopId = loopId;
|
|
820
821
|
this.runtime = runtime;
|
|
822
|
+
this.cloud = createCloudClient();
|
|
821
823
|
}
|
|
822
824
|
visitContextUpdateStarted(input) {
|
|
823
825
|
this.publish("context_update.started", { ...input, loopId: this.loopId });
|
|
@@ -850,12 +852,11 @@ var EventPublisherLoopVisitor = class {
|
|
|
850
852
|
this.publish("interception.finished", transition);
|
|
851
853
|
}
|
|
852
854
|
publish(type, payload) {
|
|
853
|
-
this.
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
});
|
|
855
|
+
const event = new SemanticEvent(type, this.agentId, /* @__PURE__ */ new Date(), payload);
|
|
856
|
+
this.runtime.publish(event);
|
|
857
|
+
if (this.cloud.enabled) {
|
|
858
|
+
this.cloud.send(event);
|
|
859
|
+
}
|
|
859
860
|
}
|
|
860
861
|
};
|
|
861
862
|
|