@indra.ai/deva 1.3.15 → 1.4.2

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 (3) hide show
  1. package/config.json +5 -5
  2. package/index.js +6 -8
  3. package/package.json +1 -1
package/config.json CHANGED
@@ -49,7 +49,7 @@
49
49
  "legal": "🏛️ Legal",
50
50
  "authority": "🚔 Authority",
51
51
  "justice": "⚖️ Justice",
52
- "defense": "🪖 Defense",
52
+ "defense": "🪖 Defense",
53
53
  "help": "💚 Help",
54
54
  "error": "❌ Error!"
55
55
  },
@@ -64,7 +64,7 @@
64
64
  "listen": "👂 Listen",
65
65
  "ask": "🗣️ Ask",
66
66
  "question": "💬 Question",
67
- "cmd": "🪖 Command",
67
+ "cmd": "🪖 Command",
68
68
  "answer": "💡 Answer",
69
69
  "ready": "😊 Ready",
70
70
  "wait": "⏳ Waiting",
@@ -184,7 +184,7 @@
184
184
  "legal": "🗃️ Legal",
185
185
  "justice": "🗄️ Justice",
186
186
  "authority": "👮 Authority",
187
- "defense": "🪖 Defense",
187
+ "defense": "🪖 Defense",
188
188
 
189
189
  "invalid": "❌ Invalid",
190
190
  "states": "🛻 States",
@@ -202,7 +202,7 @@
202
202
  "image": "🌄 Image",
203
203
  "image": "📽️ Video",
204
204
  "signature": "✍️ Signature",
205
- "orders": "🪖 Orders",
205
+ "orders": "🪖 Orders",
206
206
  "law": "🔏 Law",
207
207
  "decree": "📜 Decree"
208
208
  },
@@ -218,7 +218,7 @@
218
218
  "legal": "🗂️️️ Legal",
219
219
  "justice": "🏛️️ Justice",
220
220
  "authority": "🚓️️ Authority",
221
- "defense": "🪖️️ Defense",
221
+ "defense": "🪖️️ Defense",
222
222
  "cipher": "🔒 Cipher",
223
223
  "decipher": "🔓 Decipher",
224
224
  "promp": "🪵 Prompt",
package/index.js CHANGED
@@ -799,9 +799,8 @@ class Deva {
799
799
  params:
800
800
  - packet: the data to pass to the resolve
801
801
  - resolve: the complete resolve to pass back
802
- describe: This function is use to relay the Agent ito a complete state when
803
- resolving a question or data.
804
- usage: this.complete(data, resolve)
802
+ describe: This function is use to relay the to the ready state.
803
+ usage: this.ready(data, resolve)
805
804
  ***************/
806
805
  ready(packet, resolve) {
807
806
  if (!this._active) return Promise.resolve(this._messages.offline);
@@ -825,8 +824,7 @@ class Deva {
825
824
  params:
826
825
  - packet: the data to pass to the resolve
827
826
  - resolve: the finish resolve to pass back
828
- describe: This function is use to relay the Agent ito a finish state when
829
- resolving a question or data.
827
+ describe: This function is used to relay into the finish state when resolving a question or data.
830
828
  usage: this.finish(data, resolve)
831
829
  ***************/
832
830
  finish(packet, resolve) {
@@ -840,7 +838,7 @@ class Deva {
840
838
  this.state('finish'); // set the finish state
841
839
 
842
840
  // return the provided resolve function or a promise resolve.
843
- return hasOnFinish ? this.onFinish(packet) : this.complete(packet, resolve);
841
+ return hasOnFinish ? this.onFinish(packet, resolve) : this.complete(packet, resolve);
844
842
  }
845
843
 
846
844
  /**************
@@ -848,7 +846,7 @@ class Deva {
848
846
  params:
849
847
  - packet: the data to pass to the resolve
850
848
  - resolve: the complete resolve to pass back
851
- describe: This function is use to relay the Agent ito a complete state when
849
+ describe: This function is use to relay into a complete state when
852
850
  resolving a question or data.
853
851
  usage: this.complete(data, resolve)
854
852
  ***************/
@@ -863,7 +861,7 @@ class Deva {
863
861
  // if: agent has on complete then return on complete
864
862
  this.state('complete'); // set the finish state
865
863
  // return the provided resolve function or a promise resolve.
866
- return hasOnComplete ? this.onComplete(packet) : resolve(packet);
864
+ return hasOnComplete ? this.onComplete(packet, resolve) : resolve(packet);
867
865
  }
868
866
 
869
867
  /**************
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.3.15",
3
+ "version": "1.4.2",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "type": "module",