@indra.ai/deva 1.11.0 → 1.12.0

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.
Files changed (2) hide show
  1. package/index.js +4 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -334,7 +334,7 @@ class Deva {
334
334
 
335
335
  // setup the complete talk event
336
336
  this.action('talk', `${this._events[key]}:${data.id.uid}`); // action talk for the event.
337
- this.talk(this._events[key], data); // talk the complete event
337
+ this.talk(this._events[key], this.lib.copy(data)); // talk the complete event
338
338
 
339
339
  if (clear) {
340
340
  this.state('loop', `${key}:clear:${data.id.uid}`);
@@ -882,7 +882,7 @@ class Deva {
882
882
  // if: isAsk wait for the once event which is key'd to the packet ID for specified responses
883
883
  this.action('ask', `${key}:${id.uid}`);
884
884
  this.intent('good', `ask:${key}:${id.uid}`);
885
- this.talk(`${key}:ask`, packet);
885
+ this.talk(`${key}:ask`, this.lib.copy(packet));
886
886
  this.once(`${key}:ask:${packet.id.uid}`, answer => {
887
887
  this.action('talk', `${this._events.ask}:${id.uid}`);
888
888
  this.intent('good', `${this.events.ask}:${id.uid}`);
@@ -1523,7 +1523,7 @@ class Deva {
1523
1523
  data.sha256 = this.hash(data, 'sha256');
1524
1524
  data.sha512 = this.hash(data, 'sha512');
1525
1525
 
1526
- this.talk(this._events.context, data);
1526
+ this.talk(this._events.context, this.lib.copy(data));
1527
1527
  return data;
1528
1528
  } catch (e) {
1529
1529
  this.state('catch', `context:${value}:${id.uid}`);
@@ -1705,7 +1705,7 @@ class Deva {
1705
1705
  data.sha256 = this.hash(data, 'sha256');
1706
1706
  data.sha512 = this.hash(data, 'sha512');
1707
1707
 
1708
- this.talk(this._events[key], data); // broadcast the state event
1708
+ this.talk(this._events[key], this.lib.copy(data)); // broadcast the state event
1709
1709
  return data;
1710
1710
  } catch (e) { // catch any errors
1711
1711
  return this.err(e); // return if an error happens
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "44091450722329207445",
3
3
  "name": "@indra.ai/deva",
4
- "version": "1.11.0",
4
+ "version": "1.12.0",
5
5
  "description": "Deva Core a Vedic-inspired Event Based Context Aware Feature, Zone, Action, and State Machine integrated Artificial Intelligence Framework",
6
6
  "main": "index.js",
7
7
  "license": "VLA:44091450722329207445 LICENSE.md",