@indra.ai/deva 1.1.121 → 1.1.123

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 +16 -16
  2. package/index.js +6 -2
  3. package/package.json +1 -1
package/config.json CHANGED
@@ -28,22 +28,22 @@
28
28
  },
29
29
  "state": "offline",
30
30
  "states": {
31
- "ask": "asking another",
32
- "question": "asked a question",
33
- "answer": "gave an answer",
34
- "offline": "offline",
35
- "ready": "ready for tasking",
36
- "init": "initializing",
37
- "start": "starting",
38
- "enter": "entering deva.world",
39
- "stop": "stopping",
40
- "exit": "exiting deva.world",
41
- "load": "loading",
42
- "unload": "unloading",
43
- "done": "done state",
44
- "invalid": "invalid state",
45
- "error": "error state",
46
- "help": "help state"
31
+ "ask": "asking another",
32
+ "question": "asked a question",
33
+ "answer": "gave an answer",
34
+ "offline": "offline",
35
+ "ready": "ready for tasking",
36
+ "init": "initializing",
37
+ "start": "starting",
38
+ "enter": "entering deva.world",
39
+ "stop": "stopping",
40
+ "exit": "exiting deva.world",
41
+ "load": "loading",
42
+ "unload": "unloading",
43
+ "done": "done state",
44
+ "invalid": "invalid state",
45
+ "error": "error state",
46
+ "help": "help state"
47
47
  },
48
48
  "zone": false,
49
49
  "zones": {
package/index.js CHANGED
@@ -687,6 +687,8 @@ class Deva {
687
687
  this.talk(`${key}:ask`, packet);
688
688
  this.once(`${key}:ask:${packet.id}`, answer => {
689
689
  this.action('question_ask_answer');
690
+
691
+ this.talk(config.events.answer, this.copy(answer));
690
692
  return this.finish(answer, resolve); // if:isAsk resolve the answer from the call
691
693
  });
692
694
  }
@@ -750,8 +752,9 @@ class Deva {
750
752
  // create a hash for the answer and insert into answer meta.
751
753
  packet_answer.meta.hash = this.hash(packet_answer);
752
754
 
753
- this.action('answer_talk');
754
755
  packet.a = packet_answer;
756
+ this.prompt('TALK TALK TALK ANSWER')
757
+ this.action('answer_talk');
755
758
  this.talk(config.events.answer, this.copy(packet)); // global talk event
756
759
  return this.finish(packet, resolve) // resolve the packet to the caller.
757
760
  }).catch(err => { // catch any errors in the method
@@ -1210,8 +1213,9 @@ class Deva {
1210
1213
  - st: The context flag to set for the Deva that matches to this._contexts
1211
1214
  describe
1212
1215
  ***************/
1213
- context(value) {
1216
+ context(value=false) {
1214
1217
  try {
1218
+ if (!value) return this._context;
1215
1219
  this._context = value;
1216
1220
  const data = {
1217
1221
  id: this.uid(true),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.1.121",
3
+ "version": "1.1.123",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "scripts": {