@indra.ai/deva 1.2.9 → 1.2.11

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 +12 -14
  2. package/index.js +1 -19
  3. package/package.json +1 -1
package/config.json CHANGED
@@ -33,24 +33,25 @@
33
33
  "deva": "#Deva",
34
34
  "client": "#Client",
35
35
  "agent": "#Agent",
36
- "question": "#Question",
37
- "answer": "#Answer",
38
- "ask": "#Ask",
39
36
  "security": "#Security",
40
37
  "support": "#Support",
41
38
  "services": "#Services",
42
39
  "systems": "#Systems",
43
- "done": "#Done",
44
- "config": "#Config",
45
- "school": "#School",
46
- "work": "#Work",
40
+ "legal": "#Legal",
41
+ "business": "#Business",
42
+ "art": "#Art",
43
+ "music": "#Music",
47
44
  "fun": "#Fun",
48
- "adventure": "#Adventure",
49
45
  "party": "#Party",
46
+ "adventure": "#Adventure",
47
+ "cartoon": "#Cartoon",
48
+ "mystery": "#Mystery",
49
+ "fantasy": "#Fantasy",
50
+ "romance": "#Romance",
51
+ "comedy": "#Comedy",
52
+ "drama": "#Drama",
53
+ "scifi": "#SciFi",
50
54
  "finish": "#Finish",
51
- "init": "#Init",
52
- "start": "#Start",
53
- "stop": "#Stop",
54
55
  "help": "#Help",
55
56
  "error": "#Error"
56
57
  },
@@ -165,12 +166,9 @@
165
166
  },
166
167
  "feature": false,
167
168
  "features": {
168
- "client": "Client",
169
- "agent": "Agent",
170
169
  "security": "Security",
171
170
  "support": "Support",
172
171
  "services": "Services",
173
- "solutions": "Solutions",
174
172
  "systems": "Systems"
175
173
  },
176
174
  "message": "offline",
package/index.js CHANGED
@@ -336,7 +336,7 @@ class Deva {
336
336
  this.zone('systems');
337
337
  const _cl = this.client();
338
338
  try {
339
- if (!_cl.features.systems) return this.Done(); // move to Solutions if no systems feature
339
+ if (!_cl.features.systems) return this.Done(); // move to Done if no systems feature
340
340
  else {
341
341
  this.state('data');
342
342
  const {id, features, profile} = _cl; // set the local consts from client copy
@@ -365,13 +365,11 @@ class Deva {
365
365
  describe: The end of the workflow Client Feature Workflow
366
366
  ***************/
367
367
  Done(client) {
368
- this.zone('done'); // set state to assistant setting
369
368
  this.state('done');
370
369
  this.action('done');
371
370
  return new Promise((resolve, reject) => {
372
371
  try {
373
372
  delete this._client.features; // delete the features key when done.
374
- this.zone('deva'); // put the agent back in the deva zone.
375
373
  this.state('ready');
376
374
  this.action('wait');
377
375
  return resolve(client); // resolve an empty pr
@@ -443,7 +441,6 @@ class Deva {
443
441
  describe:
444
442
  ***************/
445
443
  question(TEXT=false, DATA=false) {
446
- this.zone('question');
447
444
  // check the active status
448
445
  if (!this._active) return Promise.resolve(this._messages.offline);
449
446
 
@@ -546,7 +543,6 @@ class Deva {
546
543
  from the agent from the pre-determined method.
547
544
  ***************/
548
545
  answer(packet, resolve, reject) {
549
- this.zone('answer');
550
546
  if (!this._active) return Promise.resolve(this._messages.offline);
551
547
  this.state('answer');
552
548
  // check if method exists and is of type function
@@ -610,7 +606,6 @@ class Deva {
610
606
  so the event is specific to the talk.
611
607
  ***************/
612
608
  ask(packet) {
613
- this.zone('ask');
614
609
  if (!this._active) return Promise.resolve(this._messages.offline);
615
610
 
616
611
  this.state('ask');
@@ -687,7 +682,6 @@ class Deva {
687
682
  usage: this.init(client_object)
688
683
  ***************/
689
684
  init(client) {
690
- this.zone('init');
691
685
  // set client
692
686
  this._active = Date.now();
693
687
  const agent = this.agent();
@@ -733,7 +727,6 @@ class Deva {
733
727
  usage: this.start('msg')
734
728
  ***************/
735
729
  start(data) {
736
- this.zone('start');
737
730
  if (!this._active) return Promise.resolve(this._messages.offline);
738
731
  this.state('start');
739
732
  data.value = 'start';
@@ -756,7 +749,6 @@ class Deva {
756
749
  usage: this.enter('msg')
757
750
  ***************/
758
751
  enter(data) {
759
- this.zone('enter');
760
752
  if (!this._active) return Promise.resolve(this._messages.offline);
761
753
  this.state('enter');
762
754
  data.value = 'enter';
@@ -779,7 +771,6 @@ class Deva {
779
771
  usage: this.done('msg')
780
772
  ***************/
781
773
  done(data) {
782
- this.zone('done');
783
774
  if (!this._active) return Promise.resolve(this._messages.offline);
784
775
  this.state('done');
785
776
  data.value = 'done';
@@ -802,7 +793,6 @@ class Deva {
802
793
  this.finish(data, resolve)
803
794
  ***************/
804
795
  finish(packet, resolve) {
805
- this.zone('finish');
806
796
  if (!this._active) return Promise.resolve(this._messages.offline);
807
797
  this.state('finish');
808
798
  packet.hash = this.hash(packet);// hash the entire packet before finishing.
@@ -827,7 +817,6 @@ class Deva {
827
817
  this.stop('msg')
828
818
  ***************/
829
819
  stop() {
830
- this.zone('stop');
831
820
  if (!this._active) return Promise.resolve(this._messages.offline);
832
821
 
833
822
  this.state('stop');
@@ -867,7 +856,6 @@ class Deva {
867
856
  usage: this.exit('msg')
868
857
  ***************/
869
858
  exit(data) {
870
- this.zone('exit');
871
859
  this._active = false;
872
860
  data.value = 'exit';
873
861
  delete data.hash;
@@ -1120,7 +1108,6 @@ class Deva {
1120
1108
  ***************/
1121
1109
  security() {
1122
1110
  this.feature('security'); // set the security state
1123
- this.zone('security');
1124
1111
  if (!this._active) return this._messages.offline; // check the active status
1125
1112
  this.state('data'); // set the security state
1126
1113
  try {
@@ -1137,7 +1124,6 @@ class Deva {
1137
1124
  ***************/
1138
1125
  support() {
1139
1126
  this.feature('support'); // set the support state
1140
- this.zone('support'); // set the support state
1141
1127
  if (!this._active) return this._messages.offline; // check the active status
1142
1128
  this.state('data');
1143
1129
  try {
@@ -1154,7 +1140,6 @@ class Deva {
1154
1140
  ***************/
1155
1141
  services(opts) {
1156
1142
  this.feature('services'); // set the support state
1157
- this.zone('services'); // set the support state
1158
1143
  if (!this._active) return this._messages.offline; // check the active status
1159
1144
  this.state('data'); // set the services state
1160
1145
  try {
@@ -1171,7 +1156,6 @@ class Deva {
1171
1156
  ***************/
1172
1157
  systems(opts) {
1173
1158
  this.feature('systems'); // set the systems state
1174
- this.zone('systems'); // set the systems state
1175
1159
  if (!this._active) return this._messages.offline; // check the active status
1176
1160
  this.state('data');
1177
1161
  try {
@@ -1461,7 +1445,6 @@ class Deva {
1461
1445
  describe: return info data.
1462
1446
  ***************/
1463
1447
  info() {
1464
- this.zone('support');
1465
1448
  // check the active status
1466
1449
  if (!this._active) return Promise.resolve(this._messages.offline);
1467
1450
  this.action('info');
@@ -1480,7 +1463,6 @@ class Deva {
1480
1463
  usage: this.status('msg')
1481
1464
  ***************/
1482
1465
  status(msg=false) {
1483
- this.zone('support');
1484
1466
  // check the active status
1485
1467
  if (!this._active) return Promise.resolve(this._messages.states.offline);
1486
1468
  // format the date since active for output.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.2.9",
3
+ "version": "1.2.11",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "scripts": {