@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.js
CHANGED
|
@@ -877,11 +877,13 @@ var ModelMessageToIdleRule = class {
|
|
|
877
877
|
};
|
|
878
878
|
|
|
879
879
|
// src/domain/agentic-environment/loop/event-publisher-visitor.ts
|
|
880
|
+
var import_cloud_sdk = require("@mozaik-ai/cloud-sdk");
|
|
880
881
|
var EventPublisherLoopVisitor = class {
|
|
881
882
|
constructor(agentId, loopId, runtime) {
|
|
882
883
|
this.agentId = agentId;
|
|
883
884
|
this.loopId = loopId;
|
|
884
885
|
this.runtime = runtime;
|
|
886
|
+
this.cloud = (0, import_cloud_sdk.createCloudClient)();
|
|
885
887
|
}
|
|
886
888
|
visitContextUpdateStarted(input) {
|
|
887
889
|
this.publish("context_update.started", { ...input, loopId: this.loopId });
|
|
@@ -914,12 +916,11 @@ var EventPublisherLoopVisitor = class {
|
|
|
914
916
|
this.publish("interception.finished", transition);
|
|
915
917
|
}
|
|
916
918
|
publish(type, payload) {
|
|
917
|
-
this.
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
});
|
|
919
|
+
const event = new SemanticEvent(type, this.agentId, /* @__PURE__ */ new Date(), payload);
|
|
920
|
+
this.runtime.publish(event);
|
|
921
|
+
if (this.cloud.enabled) {
|
|
922
|
+
this.cloud.send(event);
|
|
923
|
+
}
|
|
923
924
|
}
|
|
924
925
|
};
|
|
925
926
|
|