@indra.ai/deva 1.1.18 → 1.1.20

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 +7 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -165,6 +165,13 @@ class Deva {
165
165
  try {
166
166
  // set the assigned listeners for the agent.
167
167
  for (let listener in this.listeners) {
168
+ // set the default listeners for the states of the agent.
169
+ for (let state in this._states) {
170
+ this.events.on(`${this.agent.key}:${state}`, packet => {
171
+ return this[state](packet);
172
+ })
173
+ }
174
+
168
175
  this.events.on(listener, packet => {
169
176
  return this.listeners[listener](packet);
170
177
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.1.18",
3
+ "version": "1.1.20",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "scripts": {