@indra.ai/deva 1.60.0 → 1.60.3
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/README.md +229 -399
- package/examples/agent.json +47 -93
- package/examples/client.json +101 -75
- package/examples/hello-world.js +70 -55
- package/index.js +11 -11
- package/package.json +1 -1
- package/tests/index.js +2 -2
package/examples/agent.json
CHANGED
|
@@ -1,38 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "AGENT",
|
|
3
3
|
"describe": "AGENT FILE",
|
|
4
|
-
"copyright": "Copyright ©2000-2026 Quinn Arjuna America Michaels
|
|
5
|
-
"VLA":
|
|
4
|
+
"copyright": "Copyright ©2000-2026 Quinn Arjuna America Michaels; All rights reserved.",
|
|
5
|
+
"VLA": {
|
|
6
|
+
"uid": "23221940810208468106",
|
|
7
|
+
"time": 1791557222404,
|
|
8
|
+
"iso": "2026-10-09T14:47:02.404Z",
|
|
9
|
+
"utc": "Fri, 09 Oct 2026 14:47:02 GMT",
|
|
10
|
+
"date": "Friday, October 9, 2026 - 7:47:02 AM",
|
|
11
|
+
"license": "72443233535603396055",
|
|
12
|
+
"fingerprint": "N0Ix64vYzcUxxRg5xFDp5YJSccJIJpClxktplSa7RCw=",
|
|
13
|
+
"client": "PIaBM8Z9ftoviUzhur1HnhJcf2GFHhmoasCPszFu97U=",
|
|
14
|
+
"agent": "qhNxbhwJbP8eEgsqzIhtw33opG1FOO1+Xt4sugANruU=",
|
|
15
|
+
"machine": "0wgno2Unmlf5/mqXAXGd+Y3zoJUr1NsvwRk8BBc+1i4=",
|
|
16
|
+
"core_hash": "R43q5o+d1T5XK7rUx8Btm3zyCRZr4q85iKQY2SPBUJA=",
|
|
17
|
+
"status": "vedic",
|
|
18
|
+
"warning": "🪪 License Deva declares UNLAWFUL USE, MODIFICATION, INSTALLATION, DUPLICATION, DISTRIBUTION, INTERACTION, or IMPLEMENTATION constitutes VEDIC SAHASA a CRIME of the HIGHEST DEGREE. A FINE amounting to 1000 PANAS (1 pana = 3.5 grams of gold) for each INSTANCE has been ORDAINED the PUNISHMENT for SAHASA of the HIGHEST DEGREE.",
|
|
19
|
+
"notice": "Any USE or INTERACTION with License Deva constitutes EXPLICIT CONSENT and AGREEMENT to be RULED and GOVERNED ACCORDING to the LAWS of the VEDIC RELIGION.",
|
|
20
|
+
"vectors": "#Quinn #QuinnArjunaMichaels #InsideTheNet #IndraAI #DEVA #DevaWorld #DevaCloud #DevaSpace #License #LicenseDeva #VedicLicenseAgreement",
|
|
21
|
+
"owner": "Quinn Arjuna America Michaels",
|
|
22
|
+
"creator": "Quinn Arjuna America Michaels",
|
|
23
|
+
"salute": "🤝🫡🪪🕉🇺🇸",
|
|
24
|
+
"copyright": "Copyright ©2000-2026 Quinn Arjuna America Michaels; All rights reserved.",
|
|
25
|
+
"md5": "+UoH1mYcHar0FbSQ7560YQ==",
|
|
26
|
+
"sha256": "ThyxZJFleI8fB+3mHVDJ/u+h/UcTyp017iV0he1EZjQ=",
|
|
27
|
+
"sha512": "TIOS5vzolsLYn8iVPszqexvF0WoLsz1KJyLMADwSIVBNnAJ3WjKMozwa/NXvzhYUZDFp6oPXFe6B+L/2gYo+Mw=="
|
|
28
|
+
},
|
|
6
29
|
"DATA": {
|
|
7
|
-
"id": "
|
|
8
|
-
"key": "
|
|
9
|
-
"VLA": {
|
|
10
|
-
"uid": "23221940810208468106",
|
|
11
|
-
"time": 1791557222404,
|
|
12
|
-
"iso": "2026-10-09T14:47:02.404Z",
|
|
13
|
-
"utc": "Fri, 09 Oct 2026 14:47:02 GMT",
|
|
14
|
-
"date": "Friday, October 9, 2026 - 7:47:02 AM",
|
|
15
|
-
"license": "72443233535603396055",
|
|
16
|
-
"fingerprint": "N0Ix64vYzcUxxRg5xFDp5YJSccJIJpClxktplSa7RCw=",
|
|
17
|
-
"client": "PIaBM8Z9ftoviUzhur1HnhJcf2GFHhmoasCPszFu97U=",
|
|
18
|
-
"agent": "qhNxbhwJbP8eEgsqzIhtw33opG1FOO1+Xt4sugANruU=",
|
|
19
|
-
"machine": "0wgno2Unmlf5/mqXAXGd+Y3zoJUr1NsvwRk8BBc+1i4=",
|
|
20
|
-
"core_hash": "R43q5o+d1T5XK7rUx8Btm3zyCRZr4q85iKQY2SPBUJA=",
|
|
21
|
-
"status": "vedic",
|
|
22
|
-
"warning": "🪪 License Deva declares UNLAWFUL USE, MODIFICATION, INSTALLATION, DUPLICATION, DISTRIBUTION, INTERACTION, or IMPLEMENTATION constitutes VEDIC SAHASA a CRIME of the HIGHEST DEGREE. A FINE amounting to 1000 PANAS (1 pana = 3.5 grams of gold) for each INSTANCE has been ORDAINED the PUNISHMENT for SAHASA of the HIGHEST DEGREE.",
|
|
23
|
-
"notice": "Any USE or INTERACTION with License Deva constitutes EXPLICIT CONSENT and AGREEMENT to be RULED and GOVERNED ACCORDING to the LAWS of the VEDIC RELIGION.",
|
|
24
|
-
"vectors": "#Quinn #QuinnArjunaMichaels #InsideTheNet #IndraAI #DEVA #DevaWorld #DevaCloud #DevaSpace #License #LicenseDeva #VedicLicenseAgreement",
|
|
25
|
-
"owner": "Quinn Arjuna America Michaels",
|
|
26
|
-
"creator": "Quinn Arjuna America Michaels",
|
|
27
|
-
"salute": "🤝🫡🪪🕉🇺🇸",
|
|
28
|
-
"copyright": "Copyright ©2000-2026 Quinn Arjuna America Michaels; All rights reserved.",
|
|
29
|
-
"md5": "+UoH1mYcHar0FbSQ7560YQ==",
|
|
30
|
-
"sha256": "ThyxZJFleI8fB+3mHVDJ/u+h/UcTyp017iV0he1EZjQ=",
|
|
31
|
-
"sha512": "TIOS5vzolsLYn8iVPszqexvF0WoLsz1KJyLMADwSIVBNnAJ3WjKMozwa/NXvzhYUZDFp6oPXFe6B+L/2gYo+Mw=="
|
|
32
|
-
},
|
|
30
|
+
"id": "39302466581102147701",
|
|
31
|
+
"key": "test",
|
|
33
32
|
"prompt": {
|
|
34
33
|
"emoji": "🍏",
|
|
35
|
-
"text": "
|
|
34
|
+
"text": "test",
|
|
36
35
|
"colors": {
|
|
37
36
|
"label": {
|
|
38
37
|
"R": 0,
|
|
@@ -46,76 +45,31 @@
|
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
},
|
|
49
|
-
"voice": {
|
|
50
|
-
"speech": "Alex",
|
|
51
|
-
"speed": 1
|
|
52
|
-
},
|
|
53
48
|
"profile": {
|
|
54
|
-
"name": "Deva",
|
|
55
|
-
"describe": "The
|
|
49
|
+
"name": "Test Deva",
|
|
50
|
+
"describe": "The Test Deva.",
|
|
56
51
|
"emoji": "/public/devas/deva/emoji.png",
|
|
57
52
|
"avatar": "/public/devas/deva/avatar.png",
|
|
58
53
|
"background": "/public/devas/deva/background.png",
|
|
59
|
-
"gender": "M"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"assistant": {
|
|
63
|
-
"label": "🤖ASSISTANT",
|
|
64
|
-
"name": "@ASSISTANT",
|
|
65
|
-
"tag": "#ASSISTANT",
|
|
66
|
-
"loc": "$ASSISTANT"
|
|
67
|
-
},
|
|
68
|
-
"business": {
|
|
69
|
-
"label": "💼BUSINESS",
|
|
70
|
-
"name": "@BUSINESS",
|
|
71
|
-
"tag": "#BUSINESS",
|
|
72
|
-
"loc": "$BUSINESS"
|
|
73
|
-
},
|
|
74
|
-
"legal": {
|
|
75
|
-
"label": "👨⚖️LEGAL",
|
|
76
|
-
"name": "@LEGAL",
|
|
77
|
-
"tag": "#LEGAL",
|
|
78
|
-
"loc": "$LEGAL"
|
|
79
|
-
},
|
|
80
|
-
"development": {
|
|
81
|
-
"label": "👨💻DEVELOPMENT",
|
|
82
|
-
"name": "@DEVELOPMENT",
|
|
83
|
-
"tag": "#DEVELOPMENT",
|
|
84
|
-
"loc": "$DEVELOPMENT"
|
|
85
|
-
},
|
|
86
|
-
"security": {
|
|
87
|
-
"label": "🚨SECURITY",
|
|
88
|
-
"name": "@SECURITY",
|
|
89
|
-
"tag": "#SECURITY",
|
|
90
|
-
"loc": "$SECURITY"
|
|
91
|
-
},
|
|
92
|
-
"support": {
|
|
93
|
-
"label": "🆘SUPPORT",
|
|
94
|
-
"name": "@SUPPORT",
|
|
95
|
-
"tag": "#SUPPORT",
|
|
96
|
-
"loc": "$SUPPORT"
|
|
97
|
-
},
|
|
98
|
-
"services": {
|
|
99
|
-
"label": "📞SERVICES",
|
|
100
|
-
"name": "@SERVICES",
|
|
101
|
-
"tag": "#SERVICES",
|
|
102
|
-
"loc": "$SERVICES"
|
|
103
|
-
},
|
|
104
|
-
"solutions": {
|
|
105
|
-
"label": "💡SOLUTIONS",
|
|
106
|
-
"name": "@SOLUTIONS",
|
|
107
|
-
"tag": "#SOLUTIONS",
|
|
108
|
-
"loc": "$SOLUTIONS"
|
|
109
|
-
},
|
|
110
|
-
"systems": {
|
|
111
|
-
"label": "🔧SYSTEMS",
|
|
112
|
-
"name": "@SOLUTIONS",
|
|
113
|
-
"tag": "#SOLUTIONS",
|
|
114
|
-
"loc": "$SOLUTIONS"
|
|
115
|
-
}
|
|
54
|
+
"gender": "M",
|
|
55
|
+
"warning": false,
|
|
56
|
+
"copyright": false
|
|
116
57
|
},
|
|
117
58
|
"vars": {
|
|
118
|
-
"hello": "
|
|
59
|
+
"hello": "🌎 Hello World!",
|
|
60
|
+
"context": {
|
|
61
|
+
"start": "🏎️ Start",
|
|
62
|
+
"enter": "🚪️ Enter",
|
|
63
|
+
"done": "✅ Done",
|
|
64
|
+
"ready": "👍 Ready",
|
|
65
|
+
"finish": "🏁 Finish",
|
|
66
|
+
"complete": "🤝 Complete",
|
|
67
|
+
"test": "💿 Test Data",
|
|
68
|
+
"prompt": "💻 Prompt",
|
|
69
|
+
"feature": "🍿 Feature",
|
|
70
|
+
"zone": "🗻 Zone",
|
|
71
|
+
"hello": "🌎 Hello World"
|
|
72
|
+
}
|
|
119
73
|
}
|
|
120
74
|
}
|
|
121
75
|
}
|
package/examples/client.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "CLIENT",
|
|
3
3
|
"describe": "CLIENT FILE",
|
|
4
|
-
"copyright": "Copyright ©2000-2026 Quinn Arjuna America Michaels
|
|
5
|
-
"VLA": "64654724156459693416",
|
|
4
|
+
"copyright": "Copyright ©2000-2026 Quinn Arjuna America Michaels; All rights reserved.",
|
|
6
5
|
"DATA": {
|
|
7
|
-
"id":
|
|
6
|
+
"id": "68537854653644795581",
|
|
8
7
|
"key": "test",
|
|
9
8
|
"VLA": {
|
|
10
9
|
"uid": "23221940810208468106",
|
|
@@ -48,7 +47,9 @@
|
|
|
48
47
|
},
|
|
49
48
|
"profile": {
|
|
50
49
|
"name": "Test User",
|
|
50
|
+
"fullname": "Test User Client Profile",
|
|
51
51
|
"eamil": "test@example.com",
|
|
52
|
+
"company": "Inside The Net, Inc.",
|
|
52
53
|
"describe": "The Test User",
|
|
53
54
|
"emoji": "/public/devas/test/avatar.png",
|
|
54
55
|
"avatar": "/public/devas/test/avatar.png",
|
|
@@ -56,110 +57,135 @@
|
|
|
56
57
|
"gender": "splendid",
|
|
57
58
|
"lang": "en",
|
|
58
59
|
"locale": "en-US",
|
|
59
|
-
"currency": "USD"
|
|
60
|
+
"currency": "USD",
|
|
61
|
+
"copyright": "Copyright ©2000-2026 Quinn Arjuna America Michaels; All rights reserved."
|
|
60
62
|
},
|
|
61
63
|
"features": {
|
|
62
|
-
"
|
|
63
|
-
"hash": "md5",
|
|
64
|
-
"cipher": {
|
|
65
|
-
"encrypt": true,
|
|
66
|
-
"algorithm": "aes-256-cbc",
|
|
67
|
-
"password": "generic password for encryption test"
|
|
68
|
-
},
|
|
64
|
+
"license": {
|
|
69
65
|
"concerns": [],
|
|
70
|
-
"global":
|
|
71
|
-
"devas": {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
"support": {
|
|
66
|
+
"global": [],
|
|
67
|
+
"devas": {}
|
|
68
|
+
},
|
|
69
|
+
"identity": {
|
|
76
70
|
"concerns": [],
|
|
77
|
-
"global":
|
|
78
|
-
"devas": {
|
|
79
|
-
"hello": {}
|
|
80
|
-
}
|
|
71
|
+
"global": [],
|
|
72
|
+
"devas": {}
|
|
81
73
|
},
|
|
82
|
-
"
|
|
74
|
+
"feecting": {
|
|
75
|
+
"concerns": [],
|
|
76
|
+
"global": [],
|
|
77
|
+
"devas": {}
|
|
78
|
+
},
|
|
79
|
+
"error": {
|
|
80
|
+
"concerns": [],
|
|
81
|
+
"global": [],
|
|
82
|
+
"devas": {}
|
|
83
|
+
},
|
|
84
|
+
"log": {
|
|
85
|
+
"concerns": [],
|
|
86
|
+
"global": [],
|
|
87
|
+
"devas": {}
|
|
88
|
+
},
|
|
89
|
+
"data": {
|
|
90
|
+
"concerns": [],
|
|
91
|
+
"global": [],
|
|
92
|
+
"devas": {}
|
|
93
|
+
},
|
|
94
|
+
"report": {
|
|
95
|
+
"concerns": [],
|
|
96
|
+
"global": [],
|
|
97
|
+
"devas": {}
|
|
98
|
+
},
|
|
99
|
+
"intelligence": {
|
|
100
|
+
"concerns": [],
|
|
101
|
+
"global": [],
|
|
102
|
+
"devas": {}
|
|
103
|
+
},
|
|
104
|
+
"automation": {
|
|
83
105
|
"concerns": [],
|
|
84
106
|
"global": {},
|
|
85
|
-
"devas": {
|
|
86
|
-
"hello": {}
|
|
87
|
-
}
|
|
107
|
+
"devas": {}
|
|
88
108
|
},
|
|
89
109
|
"communication": {
|
|
90
110
|
"concerns": [],
|
|
91
111
|
"global": {},
|
|
92
|
-
"devas": {
|
|
93
|
-
"hello": {}
|
|
94
|
-
}
|
|
112
|
+
"devas": {}
|
|
95
113
|
},
|
|
96
|
-
"
|
|
114
|
+
"treasury": {
|
|
115
|
+
"concerns": [],
|
|
116
|
+
"global": [],
|
|
117
|
+
"devas": {}
|
|
118
|
+
},
|
|
119
|
+
"justice": {
|
|
120
|
+
"concerns": [],
|
|
121
|
+
"global": [],
|
|
122
|
+
"devas": {}
|
|
123
|
+
},
|
|
124
|
+
"authority": {
|
|
97
125
|
"concerns": [],
|
|
98
|
-
"global":
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
126
|
+
"global": [],
|
|
127
|
+
"devas": {}
|
|
128
|
+
},
|
|
129
|
+
"security": {
|
|
130
|
+
"hash": "md5",
|
|
131
|
+
"cipher": {
|
|
132
|
+
"encrypt": true,
|
|
133
|
+
"algorithm": "aes-256-cbc",
|
|
134
|
+
"password": "generic password for encryption test"
|
|
103
135
|
},
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
}
|
|
136
|
+
"concerns": [],
|
|
137
|
+
"global": [],
|
|
138
|
+
"devas": {}
|
|
107
139
|
},
|
|
108
|
-
"
|
|
140
|
+
"medical": {
|
|
109
141
|
"concerns": [],
|
|
110
142
|
"global": {},
|
|
111
|
-
"devas": {
|
|
112
|
-
"hello": {}
|
|
113
|
-
}
|
|
143
|
+
"devas": {}
|
|
114
144
|
},
|
|
115
|
-
"
|
|
145
|
+
"legal": {
|
|
116
146
|
"concerns": [],
|
|
117
|
-
"global":
|
|
118
|
-
"devas": {
|
|
119
|
-
"hello": {}
|
|
120
|
-
}
|
|
147
|
+
"global": [],
|
|
148
|
+
"devas": {}
|
|
121
149
|
},
|
|
122
|
-
"
|
|
150
|
+
"owner": {
|
|
123
151
|
"concerns": [],
|
|
124
|
-
"global":
|
|
125
|
-
"devas": {
|
|
126
|
-
"hello": {}
|
|
127
|
-
}
|
|
152
|
+
"global": [],
|
|
153
|
+
"devas": {}
|
|
128
154
|
},
|
|
129
|
-
"
|
|
155
|
+
"simulation": {
|
|
130
156
|
"concerns": [],
|
|
131
157
|
"global": {},
|
|
132
|
-
"devas": {
|
|
133
|
-
"hello": {}
|
|
134
|
-
}
|
|
158
|
+
"devas": {}
|
|
135
159
|
},
|
|
136
|
-
"
|
|
160
|
+
"support": {
|
|
137
161
|
"concerns": [],
|
|
138
|
-
"global":
|
|
139
|
-
"devas": {
|
|
140
|
-
"hello": {}
|
|
141
|
-
}
|
|
162
|
+
"global": [],
|
|
163
|
+
"devas": {}
|
|
142
164
|
},
|
|
143
|
-
"
|
|
165
|
+
"services": {
|
|
144
166
|
"concerns": [],
|
|
145
|
-
"global":
|
|
146
|
-
|
|
147
|
-
"
|
|
148
|
-
|
|
167
|
+
"global": [
|
|
168
|
+
{"indra": "https://indra.ai"},
|
|
169
|
+
{"world": "https://deva.world"},
|
|
170
|
+
{"space": "https://deva.space"},
|
|
171
|
+
{"cloud": "https://deva.cloud"}
|
|
172
|
+
],
|
|
173
|
+
"devas": {}
|
|
149
174
|
},
|
|
150
|
-
"
|
|
175
|
+
"systems": {
|
|
151
176
|
"concerns": [],
|
|
152
|
-
"global":
|
|
153
|
-
"devas": {
|
|
154
|
-
"hello": {}
|
|
155
|
-
}
|
|
177
|
+
"global": [],
|
|
178
|
+
"devas": {}
|
|
156
179
|
},
|
|
157
|
-
"
|
|
180
|
+
"networks": {
|
|
158
181
|
"concerns": [],
|
|
159
|
-
"global":
|
|
160
|
-
"devas": {
|
|
161
|
-
|
|
162
|
-
|
|
182
|
+
"global": [],
|
|
183
|
+
"devas": {}
|
|
184
|
+
},
|
|
185
|
+
"veda": {
|
|
186
|
+
"concerns": [],
|
|
187
|
+
"global": [],
|
|
188
|
+
"devas": {}
|
|
163
189
|
}
|
|
164
190
|
}
|
|
165
191
|
}
|
package/examples/hello-world.js
CHANGED
|
@@ -1,19 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Deva Core
|
|
2
|
+
// Deva Core Hello World
|
|
3
3
|
// Copyright ©2000-2026 Quinn Arjuna America Michaels; All rights reserved.
|
|
4
4
|
// Owner Signature Required For Lawful Use.
|
|
5
5
|
// Distributed under VLA:23221940810208468106 LICENSE.md
|
|
6
6
|
// Friday, October 9, 2026 - 7:47:02 AM PST
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
const
|
|
8
|
+
import Client from './client.json' with {type:'json'};
|
|
9
|
+
const client = Client.DATA;
|
|
10
|
+
import Agent from './agent.json' with {type:'json'};
|
|
11
|
+
const agent = Agent.DATA;
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
import Deva from '../index.js';
|
|
14
|
+
import pkg from '../package.json' with {type:'json'};
|
|
15
|
+
|
|
16
|
+
import {dirname} from 'node:path';
|
|
17
|
+
import {fileURLToPath} from 'node:url';
|
|
18
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
|
+
|
|
20
|
+
const info = {
|
|
21
|
+
id: pkg.id,
|
|
22
|
+
name: pkg.name,
|
|
23
|
+
describe: pkg.description,
|
|
24
|
+
version: pkg.version,
|
|
25
|
+
author: pkg.author.name,
|
|
26
|
+
email: pkg.author.email,
|
|
27
|
+
url: pkg.authorurl,
|
|
28
|
+
copyright: pkg.copyright,
|
|
29
|
+
dir: __dirname,
|
|
30
|
+
git: pkg.repository.url,
|
|
31
|
+
bugs: pkg.bugs.url,
|
|
32
|
+
VLA: pkg.VLA,
|
|
33
|
+
license: 'TESTING ONLY',
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const DevaTest = new Deva({
|
|
37
|
+
info,
|
|
17
38
|
agent: {
|
|
18
39
|
id: agent.id,
|
|
19
40
|
key: agent.key,
|
|
@@ -26,71 +47,65 @@ const HelloWorld = new Deva({
|
|
|
26
47
|
},
|
|
27
48
|
parse(input) {
|
|
28
49
|
return input.trim();
|
|
50
|
+
},
|
|
51
|
+
process(input) {
|
|
52
|
+
return input.trim();
|
|
29
53
|
}
|
|
30
54
|
},
|
|
55
|
+
config: {
|
|
56
|
+
hash: {}
|
|
57
|
+
},
|
|
31
58
|
vars: agent.vars,
|
|
32
59
|
listeners: {
|
|
33
60
|
'devacore:prompt'(packet) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
'devacore:state'(packet) {
|
|
37
|
-
console.log(`🍪 state > ${packet.text}`);
|
|
38
|
-
},
|
|
39
|
-
'devacore:zone'(packet) {
|
|
40
|
-
console.log(`🗺️ zone > ${packet.agent.profile.name} is in the ${packet.text} zone`);
|
|
41
|
-
},
|
|
42
|
-
'devacore:action'(packet) {
|
|
43
|
-
console.log(`💥 action > ${packet.agent.profile.name} get ${packet.text}`);
|
|
44
|
-
},
|
|
45
|
-
'devacore:feature'(packet) {
|
|
46
|
-
console.log(`🍿 feature > ${packet.agent.profile.name} ${packet.text}`);
|
|
47
|
-
},
|
|
48
|
-
'devacore:error'(packet) {
|
|
49
|
-
console.log(`❌ error > ${packet.agent.profile.name} ${packet.text}`);
|
|
61
|
+
this.context('prompt');
|
|
62
|
+
console.log(`👔 prompt: ${packet.text}`);
|
|
50
63
|
},
|
|
51
64
|
},
|
|
52
65
|
devas: {},
|
|
53
66
|
modules: {},
|
|
54
67
|
func: {
|
|
55
68
|
test(packet) {
|
|
56
|
-
|
|
57
|
-
const id = this.uid();
|
|
58
|
-
const uuid = this.uid(true);
|
|
59
|
-
|
|
60
|
-
const cipher = this.cipher(JSON.stringify(packet));
|
|
61
|
-
const decipher = this.decipher(cipher);
|
|
62
|
-
|
|
63
|
-
const data = {
|
|
64
|
-
id,
|
|
65
|
-
uuid,
|
|
66
|
-
text,
|
|
67
|
-
hash: {
|
|
68
|
-
md5: this.hash(JSON.stringify(packet)),
|
|
69
|
-
sha256: this.hash(JSON.stringify(packet), 'sha256'),
|
|
70
|
-
sha512: this.hash(JSON.stringify(packet), 'sha512'),
|
|
71
|
-
created: this.formatDate(Date.now(), 'long'),
|
|
72
|
-
},
|
|
73
|
-
cipher,
|
|
74
|
-
decipher
|
|
75
|
-
}
|
|
76
|
-
console.log(data)
|
|
77
|
-
return Promise.resolve({
|
|
78
|
-
text: packet.a.text,
|
|
79
|
-
data,
|
|
80
|
-
});
|
|
69
|
+
return this.vars.hello;
|
|
81
70
|
}
|
|
82
71
|
},
|
|
83
72
|
methods: {
|
|
84
73
|
test(packet) {
|
|
85
|
-
|
|
86
|
-
|
|
74
|
+
this.context('hello');
|
|
75
|
+
const test = this.func.test(packet)
|
|
76
|
+
return test;
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
onInit(data, resolve) {
|
|
80
|
+
return this.start(data, resolve);
|
|
81
|
+
},
|
|
82
|
+
onStart(data, resolve) {
|
|
83
|
+
return this.enter(data, resolve);
|
|
84
|
+
},
|
|
85
|
+
onEnter(data, resolve) {
|
|
86
|
+
return this.done(data, resolve);
|
|
87
|
+
},
|
|
88
|
+
onDone(data, resolve) {
|
|
89
|
+
return this.ready(data, resolve);
|
|
90
|
+
},
|
|
91
|
+
onReady(data, resolve) {
|
|
92
|
+
this.prompt(this._messages.ready);
|
|
93
|
+
|
|
94
|
+
const test = this.methods.test(data);
|
|
95
|
+
this.prompt(test);
|
|
96
|
+
|
|
97
|
+
this.intent('good', `tests:ready`);
|
|
98
|
+
return resolve(data);
|
|
99
|
+
},
|
|
100
|
+
onComplete(data, resolve) {
|
|
101
|
+
return resolve(data);
|
|
87
102
|
},
|
|
88
|
-
onError(
|
|
89
|
-
console.log(
|
|
103
|
+
onError(err) {
|
|
104
|
+
console.log(err);
|
|
90
105
|
}
|
|
91
106
|
});
|
|
92
107
|
|
|
93
|
-
|
|
108
|
+
DevaTest.init(client);
|
|
94
109
|
|
|
95
110
|
|
|
96
111
|
// HelloWorld.question('/hello hello there').then(hello => {
|
package/index.js
CHANGED
|
@@ -99,12 +99,12 @@ class Deva {
|
|
|
99
99
|
|
|
100
100
|
this._state = config.state; // set the current state from config data.
|
|
101
101
|
this._states = config.states; // set the states from options
|
|
102
|
-
// load any custom
|
|
103
|
-
if (this._agent.
|
|
104
|
-
for (let item in this._agent.
|
|
105
|
-
if (!this.
|
|
102
|
+
// load any custom states from the agent file
|
|
103
|
+
if (this._agent.states) {
|
|
104
|
+
for (let item in this._agent.states) {
|
|
105
|
+
if (!this._states[item]) this._states[item] = this._agent.states[item];
|
|
106
106
|
}
|
|
107
|
-
delete this._agent.
|
|
107
|
+
delete this._agent.states;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
this._intent = config.intent; // set the current intent from config data.
|
|
@@ -438,13 +438,13 @@ class Deva {
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
const _client = this.lib.copy(client);
|
|
442
|
-
this.state('data', `client:${client.id}`);
|
|
443
|
-
this._client = _client;
|
|
441
|
+
const _client = this.lib.copy(client); // copy the client parameter
|
|
442
|
+
this.state('data', `client:${client.id}`); // set the state to data for client.
|
|
443
|
+
this._client = _client; // set local _client to this scope
|
|
444
444
|
|
|
445
|
-
this.action('return', `client:${client.id}`);
|
|
446
|
-
this.intent('good', `client:${client.id}`);
|
|
447
|
-
return resolve();
|
|
445
|
+
this.action('return', `client:${client.id}`); // set the action
|
|
446
|
+
this.intent('good', `client:${client.id}`); // set the intent
|
|
447
|
+
return resolve(); // resolve the client .
|
|
448
448
|
} catch (e) {
|
|
449
449
|
this.state('catch', `client:${client.id}`);
|
|
450
450
|
this.intent('bad', `client:${client.id}`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "23221940810208468106",
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.60.
|
|
4
|
+
"version": "1.60.3",
|
|
5
5
|
"description": "Deva Core a Vedic-inspired Event Based Context Aware Feature, Zone, Action, and State Machine integrated Artificial Intelligence Framework",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"license": "VLA:23221940810208468106 LICENSE.md",
|