@indra.ai/deva 1.1.85 → 1.1.87

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 +5 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -630,6 +630,7 @@ class Deva {
630
630
  ***************/
631
631
  _methodNotFound(packet) {
632
632
  packet.a = {
633
+ id: this.uid(),
633
634
  agent: this.agent() || false,
634
635
  client: this.client() || false,
635
636
  text: `${this._messages.method_not_found}`,
@@ -845,16 +846,16 @@ class Deva {
845
846
  };
846
847
 
847
848
  // create a hash for the answer and insert into answer meta.
848
- packet_answer.meta.hash = this.hash(packet_answer);
849
+ packet_answer.meta.hash = this.hash(JSON.stringify(packet_answer));
849
850
 
850
- packet.a = packet_answer;
851
+ packet.a = this.copy(packet_answer);
851
852
  packet.hash = this.hash(packet); // hash the entire packet.
852
853
 
853
854
 
854
855
  this.action('answer_talk');
855
856
  this.talk(config.events.answer, this.copy(packet)); // global talk event
856
857
 
857
- return resolve(this.copy(packet)); // resolve the packet to the caller.
858
+ return resolve(packet); // resolve the packet to the caller.
858
859
  }).catch(err => { // catch any errors in the method
859
860
  this.action('error');
860
861
  return this.error(err, packet, reject); // return this.error with err, packet, reject
@@ -885,6 +886,7 @@ class Deva {
885
886
  const client = this.client();
886
887
  // build the answer packet from this model
887
888
  packet.a = {
889
+ id: this.uid(),
888
890
  agent,
889
891
  client,
890
892
  meta: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.1.85",
3
+ "version": "1.1.87",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "scripts": {