@indra.ai/deva 1.1.29 → 1.1.31

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.
@@ -5,8 +5,6 @@
5
5
  "DATA": {
6
6
  "id": 5380514963421,
7
7
  "key": "deva",
8
- "name": "@Deva",
9
- "describe": "The Deva interface into deva.world.",
10
8
  "prompt": {
11
9
  "emoji": "🍏",
12
10
  "text": "deva",
@@ -28,11 +26,71 @@
28
26
  "speed": 1
29
27
  },
30
28
  "profile": {
29
+ "name": "Deva",
30
+ "describe": "The Deva interface into deva.world.",
31
31
  "emoji": "/public/devas/deva/emoji.png",
32
32
  "avatar": "/public/devas/deva/avatar.png",
33
33
  "background": "/public/devas/deva/background.png",
34
- "describe": "The Deva Project",
35
34
  "gender": "M"
35
+ },
36
+ "features": {
37
+ "assistant": {
38
+ "label": "🤖ASSISTANT",
39
+ "name": "@ASSISTANT",
40
+ "tag": "#ASSISTANT",
41
+ "loc": "$ASSISTANT"
42
+ },
43
+ "business": {
44
+ "label": "💼BUSINESS",
45
+ "name": "@BUSINESS",
46
+ "tag": "#BUSINESS",
47
+ "loc": "$BUSINESS"
48
+ },
49
+ "legal": {
50
+ "label": "👨‍⚖️LEGAL",
51
+ "name": "@LEGAL",
52
+ "tag": "#LEGAL",
53
+ "loc": "$LEGAL"
54
+ },
55
+ "development": {
56
+ "label": "👨‍💻DEVELOPMENT",
57
+ "name": "@DEVELOPMENT",
58
+ "tag": "#DEVELOPMENT",
59
+ "loc": "$DEVELOPMENT"
60
+ },
61
+ "security": {
62
+ "label": "🚨SECURITY",
63
+ "name": "@SECURITY",
64
+ "tag": "#SECURITY",
65
+ "loc": "$SECURITY"
66
+ },
67
+ "support": {
68
+ "label": "🆘SUPPORT",
69
+ "name": "@SUPPORT",
70
+ "tag": "#SUPPORT",
71
+ "loc": "$SUPPORT"
72
+ },
73
+ "services": {
74
+ "label": "📞SERVICES",
75
+ "name": "@SERVICES",
76
+ "tag": "#SERVICES",
77
+ "loc": "$SERVICES"
78
+ },
79
+ "solutions": {
80
+ "label": "💡SOLUTIONS",
81
+ "name": "@SOLUTIONS",
82
+ "tag": "#SOLUTIONS",
83
+ "loc": "$SOLUTIONS"
84
+ },
85
+ "systems": {
86
+ "label": "🔧SYSTEMS",
87
+ "name": "@SOLUTIONS",
88
+ "tag": "#SOLUTIONS",
89
+ "loc": "$SOLUTIONS"
90
+ }
91
+ },
92
+ "vars": {
93
+ "hello": "Hellow World"
36
94
  }
37
95
  }
38
96
  }
@@ -33,59 +33,80 @@
33
33
  "locale": "en-US",
34
34
  "currency": "USD"
35
35
  },
36
- "states": {},
37
- "messages": {},
38
- "security": {
39
- "hash": "md5",
40
- "cipher": {
41
- "encrypt": true,
42
- "algorithm": "aes-256-cbc",
43
- "password": "generic password for encryption test"
36
+ "features": {
37
+ "security": {
38
+ "hash": "md5",
39
+ "cipher": {
40
+ "encrypt": true,
41
+ "algorithm": "aes-256-cbc",
42
+ "password": "generic password for encryption test"
43
+ },
44
+ "concerns": [],
45
+ "global": {},
46
+ "devas": {
47
+ "hello": {}
48
+ }
44
49
  },
45
- "concerns": [],
46
- "global": {},
47
- "devas": {
48
- "hello": {}
49
- }
50
- },
51
- "support": {
52
- "concerns": [],
53
- "global": {},
54
- "devas": {
55
- "hello": {}
56
- }
57
- },
58
- "services": {
59
- "concerns": [],
60
- "global": {
61
- "indra": "https://indra.ai",
62
- "world": "https://deva.world",
63
- "space": "https://deva.space",
64
- "cloud": "https://deva.cloud"
50
+ "support": {
51
+ "concerns": [],
52
+ "global": {},
53
+ "devas": {
54
+ "hello": {}
55
+ }
65
56
  },
66
- "devas": {
67
- "hello": {}
68
- }
69
- },
70
- "systems": {
71
- "concerns": [],
72
- "global": {},
73
- "devas": {
74
- "hello": {}
75
- }
76
- },
77
- "solutions": {
78
- "concerns": [],
79
- "global": {},
80
- "devas": {
81
- "hello": {}
82
- }
83
- },
84
- "development": {
85
- "concerns": [],
86
- "global": {},
87
- "devas": {
88
- "hello": {}
57
+ "services": {
58
+ "concerns": [],
59
+ "global": {
60
+ "indra": "https://indra.ai",
61
+ "world": "https://deva.world",
62
+ "space": "https://deva.space",
63
+ "cloud": "https://deva.cloud"
64
+ },
65
+ "devas": {
66
+ "hello": {}
67
+ }
68
+ },
69
+ "systems": {
70
+ "concerns": [],
71
+ "global": {},
72
+ "devas": {
73
+ "hello": {}
74
+ }
75
+ },
76
+ "solutions": {
77
+ "concerns": [],
78
+ "global": {},
79
+ "devas": {
80
+ "hello": {}
81
+ }
82
+ },
83
+ "development": {
84
+ "concerns": [],
85
+ "global": {},
86
+ "devas": {
87
+ "hello": {}
88
+ }
89
+ },
90
+ "assistant": {
91
+ "concerns": [],
92
+ "global": {},
93
+ "devas": {
94
+ "hello": {}
95
+ }
96
+ },
97
+ "business": {
98
+ "concerns": [],
99
+ "global": {},
100
+ "devas": {
101
+ "hello": {}
102
+ }
103
+ },
104
+ "legal": {
105
+ "concerns": [],
106
+ "global": {},
107
+ "devas": {
108
+ "hello": {}
109
+ }
89
110
  }
90
111
  }
91
112
  }
@@ -1,7 +1,8 @@
1
1
  // Copyright (c)2023 Quinn Michaels
2
2
  // Distributed under the MIT software license, see the accompanying
3
3
  // file LICENSE.md or http://www.opensource.org/licenses/mit-license.php.
4
- const client = require('./client.json');
4
+ const client = require('./client.json').DATA;
5
+ const agent = require('./agent.json').DATA;
5
6
 
6
7
  const Deva = require('../index');
7
8
  const HelloWorld = new Deva({
@@ -10,25 +11,12 @@ const HelloWorld = new Deva({
10
11
  key: 'hello',
11
12
  },
12
13
  agent: {
13
- id: 101,
14
- key: 'hello',
15
- prompt: {
16
- emoji: '🐶',
17
- text: 'hello',
18
- color: 'white',
19
- },
20
- voice: {
21
- speech: 'Alex',
22
- speed: 1
23
- },
24
- profile: {
25
- name: 'Hello World',
26
- description: 'The most over complex Hello World in the Universe',
27
- avatar: '',
28
- background: '',
29
- describe: 'Hello World Deva',
30
- gender: 'N',
31
- },
14
+ id: agent.id,
15
+ key: agent.key,
16
+ prompt: agent.prompt,
17
+ voice: agent.voice,
18
+ profile: agent.profile,
19
+ features: agent.features,
32
20
  translate(input) {
33
21
  return input.trim();
34
22
  },
@@ -36,9 +24,7 @@ const HelloWorld = new Deva({
36
24
  return input.trim();
37
25
  }
38
26
  },
39
- vars: {
40
- hello: 'Hello World'
41
- },
27
+ vars: agent.vars,
42
28
  listeners: {
43
29
  'hello:state'(packet) {
44
30
  // console.log(packet.state);
@@ -47,60 +33,47 @@ const HelloWorld = new Deva({
47
33
  console.log(packet.text);
48
34
  }
49
35
  },
50
- deva: {},
36
+ devas: {},
51
37
  modules: {},
52
38
  func: {
53
- getclient(packet) {
54
- return Promise.resolve(this._client);
55
- },
56
- state(packet) {
39
+ test(packet) {
57
40
  const text = this._state
58
41
  const id = this.uid();
59
42
  const uuid = this.uid(true);
60
43
 
61
- const created = this.formatDate(Date.now(), 'long', true)
62
- const md5 = this.hash(JSON.stringify(packet));
63
- const sha256 = this.hash(JSON.stringify(packet), 'sha256');
64
- const sha512 = this.hash(JSON.stringify(packet), 'sha512');
65
44
  const cipher = this.cipher(JSON.stringify(packet));
66
45
  const decipher = this.decipher(cipher);
67
46
 
68
47
  const data = {
69
48
  id,
70
49
  uuid,
50
+ text,
71
51
  hash: {
72
- md5,
73
- sha256,
74
- sha512,
75
- created,
52
+ md5: this.hash(JSON.stringify(packet)),
53
+ sha256: this.hash(JSON.stringify(packet), 'sha256'),
54
+ sha512: this.hash(JSON.stringify(packet), 'sha512'),
55
+ created: this.formatDate(Date.now(), 'long'),
76
56
  },
77
57
  cipher,
78
58
  decipher
79
59
  }
80
60
  return Promise.resolve({
81
- text: 'state return see data',
61
+ text: packet.a.text,
82
62
  data,
83
63
  });
84
64
  }
85
65
  },
86
66
  methods: {
87
- getclient(packet) {
88
- return this._client;
89
- },
90
- state(packet) {
91
- return this.func.state(packet);
67
+ test(packet) {
68
+ return this.func.test(packet);
92
69
  }
93
70
  },
94
- onError(e, packet) {
95
- console.log('ERROR\n\n', e);
96
- }
97
71
  });
98
72
 
99
- HelloWorld.init(client.DATA).then(done => {
73
+ HelloWorld.init(client).then(done => {
100
74
  // console.log(done);
101
- return HelloWorld.question('/state')
75
+ return HelloWorld.question('/test')
102
76
  }).then(answer => {
103
- console.log(answer.a.text);
104
77
  console.log(answer.a.data);
105
78
  });
106
79