@indra.ai/deva 1.2.4 → 1.2.6
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/config.json +22 -22
- package/index.js +5 -5
- package/package.json +1 -1
package/config.json
CHANGED
|
@@ -48,18 +48,18 @@
|
|
|
48
48
|
},
|
|
49
49
|
"zone": false,
|
|
50
50
|
"zones": {
|
|
51
|
-
"deva": "
|
|
52
|
-
"config": "
|
|
53
|
-
"features": "
|
|
54
|
-
"idle": "
|
|
55
|
-
"training": "
|
|
56
|
-
"school": "
|
|
57
|
-
"work": "
|
|
58
|
-
"fun": "
|
|
59
|
-
"adventure": "
|
|
60
|
-
"party": "
|
|
61
|
-
"invalid": "
|
|
62
|
-
"done": "
|
|
51
|
+
"deva": "Deva Zone",
|
|
52
|
+
"config": "Configuration Zone",
|
|
53
|
+
"features": "Feature Zone",
|
|
54
|
+
"idle": "Idle Zone",
|
|
55
|
+
"training": "Training Zone",
|
|
56
|
+
"school": "School Zone",
|
|
57
|
+
"work": "Work Zone",
|
|
58
|
+
"fun": "Fun Zone",
|
|
59
|
+
"adventure": "Adventure Zone",
|
|
60
|
+
"party": "Party Zone",
|
|
61
|
+
"invalid": "Invalid Zone",
|
|
62
|
+
"done": "Done Zone",
|
|
63
63
|
"help": "Help Zone"
|
|
64
64
|
},
|
|
65
65
|
"action": false,
|
|
@@ -212,16 +212,16 @@
|
|
|
212
212
|
"contexts": "listing the contexts"
|
|
213
213
|
},
|
|
214
214
|
"features": {
|
|
215
|
-
"security": "
|
|
216
|
-
"support": "
|
|
217
|
-
"services": "
|
|
218
|
-
"solutions": "
|
|
219
|
-
"systems": "
|
|
220
|
-
"research": "
|
|
221
|
-
"development": "
|
|
222
|
-
"business": "
|
|
223
|
-
"legal": "
|
|
224
|
-
"assistant": "
|
|
215
|
+
"security": "Security",
|
|
216
|
+
"support": "Support",
|
|
217
|
+
"services": "Services",
|
|
218
|
+
"solutions": "Solutions",
|
|
219
|
+
"systems": "Systems",
|
|
220
|
+
"research": "Research",
|
|
221
|
+
"development": "Development",
|
|
222
|
+
"business": "Business",
|
|
223
|
+
"legal": "Legal",
|
|
224
|
+
"assistant": "Assistant"
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
}
|
package/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// Copyright (c)2023 Quinn Michaels; All Rights Reserved; Legal Signature Required.
|
|
2
|
-
// Distributed under the
|
|
3
|
-
// file LICENSE.md or http://www.opensource.org/licenses/mit-license.php.
|
|
2
|
+
// Distributed under the PRIVATE software license, see the accompanying file LICENSE.md
|
|
4
3
|
const {EventEmitter} = require('events');
|
|
5
4
|
const fs = require('fs');
|
|
6
5
|
const path = require('path');
|
|
@@ -777,9 +776,9 @@ class Deva {
|
|
|
777
776
|
packet.a = packet_answer;
|
|
778
777
|
this.action('answer_talk');
|
|
779
778
|
this.talk(config.events.answer, this.copy(packet)); // global talk event
|
|
780
|
-
return this.finish(packet, resolve)
|
|
781
|
-
}).catch(err => {
|
|
782
|
-
return this.error(err, packet, reject);
|
|
779
|
+
return this.finish(packet, resolve); // resolve the packet to the caller.
|
|
780
|
+
}).catch(err => { // catch any errors in the method
|
|
781
|
+
return this.error(err, packet, reject); // return this.error with err, packet, reject
|
|
783
782
|
});
|
|
784
783
|
}
|
|
785
784
|
|
|
@@ -843,6 +842,7 @@ class Deva {
|
|
|
843
842
|
packet_answer.meta.hash = this.hash(packet_answer);
|
|
844
843
|
this.action('ask_answer');
|
|
845
844
|
packet.a = packet_answer;
|
|
845
|
+
this.talk(config.events.answer, this.copy(packet)); // global talk event
|
|
846
846
|
this.talk(`${agent.key}:ask:${packet.id}`, packet);
|
|
847
847
|
}).catch(err => {
|
|
848
848
|
this.talk(`${agent.key}:ask:${packet.id}`, {error:err});
|