@indra.ai/deva 1.2.23 → 1.2.24
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/.nova/Configuration.json +4 -0
- package/LICENSE.md +45 -4
- package/config.json +61 -61
- package/escrow.feecting +46 -0
- package/index.js +69 -24
- package/package.json +8 -7
- package/tests/agent.json +96 -0
- package/tests/client.json +127 -0
- package/tests/index.js +107 -0
package/LICENSE.md
CHANGED
|
@@ -1,7 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
Deva Restricted License Agreement
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Version 1.0
|
|
4
|
+
Effective Date: Tuesday- January 21, 2024
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
This license agreement (“Agreement”) governs the use of the Deva (“Software”). By accessing or using the Software, you agree to the terms and conditions set forth below. If you do not agree, you are prohibited from using the Software.
|
|
7
|
+
|
|
8
|
+
1. Ownership
|
|
9
|
+
|
|
10
|
+
Deva is the proprietary property of Quinn Michaels (“Owner”). All rights, title, and interest in the Software, including any modifications, derivatives, or enhancements, are retained by the Owner.
|
|
11
|
+
|
|
12
|
+
2. Grant of License
|
|
13
|
+
|
|
14
|
+
The Owner grants you a non-exclusive, non-transferable, revocable license to use the Software solely for purposes explicitly legally authorized by the Owner.
|
|
15
|
+
|
|
16
|
+
3. Restricted Use
|
|
17
|
+
|
|
18
|
+
You are expressly prohibited from:
|
|
19
|
+
1. Modifying, distributing, sub-licensing, or creating derivative works based on the Software without prior written consent.
|
|
20
|
+
2. Using the Software for commercial purposes, unless expressly authorized by the Owner.
|
|
21
|
+
3. Reverse engineering, decompiling, or disassembling the Software.
|
|
22
|
+
4. Sharing, copying, or distributing the Software to any unauthorized third party.
|
|
23
|
+
|
|
24
|
+
4. Revocation of Access
|
|
25
|
+
|
|
26
|
+
The Owner reserves the right to revoke access to the Software at any time, for any reason, without prior notice.
|
|
27
|
+
|
|
28
|
+
5. No Warranties
|
|
29
|
+
|
|
30
|
+
The Software is provided “as-is,” without any warranties, express or implied, including but not limited to warranties of merchantability or fitness for a particular purpose.
|
|
31
|
+
|
|
32
|
+
6. Limitation of Liability
|
|
33
|
+
|
|
34
|
+
To the maximum extent permitted by law, the Owner shall not be liable for any damages arising out of or related to the use of the Software, including but not limited to direct, indirect, incidental, or consequential damages.
|
|
35
|
+
|
|
36
|
+
7. Governing Law
|
|
37
|
+
|
|
38
|
+
This Agreement shall be governed by and construed in accordance with the laws of [Your Jurisdiction].
|
|
39
|
+
|
|
40
|
+
8. Entire Agreement
|
|
41
|
+
|
|
42
|
+
This Agreement constitutes the entire understanding between you and the Owner concerning the Software and supersedes all prior agreements.
|
|
43
|
+
|
|
44
|
+
By using the Deva, you acknowledge that you have read, understood, and agree to be bound by this Agreement.
|
|
45
|
+
|
|
46
|
+
Owner: Quinn Michaels (Indra.ai)
|
|
47
|
+
Contact Information: quinn@indra.ai
|
|
6
48
|
|
|
7
|
-
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/config.json
CHANGED
|
@@ -38,10 +38,6 @@
|
|
|
38
38
|
"enter": "🏡 Enter",
|
|
39
39
|
"exit": "🚪 Exit",
|
|
40
40
|
"finish": "🏁 Finish",
|
|
41
|
-
"done": "✅ Done",
|
|
42
|
-
"question": "🙋♂️ Question",
|
|
43
|
-
"ask": "📢 Ask",
|
|
44
|
-
"answer": "💁♂️ Answer",
|
|
45
41
|
"deva": "🧞♂️ Deva",
|
|
46
42
|
"client": "👨💼 Client",
|
|
47
43
|
"agent": "🤖 Agent",
|
|
@@ -49,53 +45,53 @@
|
|
|
49
45
|
"support": "💼 Support",
|
|
50
46
|
"services": "🛠️ Services",
|
|
51
47
|
"help": "💚 Help",
|
|
52
|
-
"error": "❌
|
|
48
|
+
"error": "❌ Error!"
|
|
53
49
|
},
|
|
54
50
|
"state": "offline",
|
|
55
51
|
"states": {
|
|
56
|
-
"online": "🤩
|
|
57
|
-
"offline": "😴
|
|
58
|
-
"active": "😀
|
|
59
|
-
"inactive": "🫥
|
|
60
|
-
"idle": "🚘
|
|
61
|
-
"talk": "📢
|
|
62
|
-
"listen": "👂
|
|
63
|
-
"ask": "🗣️
|
|
64
|
-
"question": "💬
|
|
65
|
-
"cmd": "🪖
|
|
66
|
-
"answer": "💡
|
|
67
|
-
"ready": "😊
|
|
68
|
-
"wait": "⏳
|
|
69
|
-
"pause": "⏸️
|
|
70
|
-
"resume": "🚙
|
|
71
|
-
"connect": "📳
|
|
72
|
-
"disconnect": "📴
|
|
73
|
-
"send": "📬
|
|
74
|
-
"receive": "📪
|
|
75
|
-
"init": "🚀
|
|
76
|
-
"forward": "⏭️
|
|
77
|
-
"backward": "⏮️
|
|
78
|
-
"start": "🛝
|
|
79
|
-
"stop": "⏹️
|
|
80
|
-
"open": "🥫
|
|
81
|
-
"close": "📦
|
|
82
|
-
"enter": "🏡
|
|
83
|
-
"exit": "🚪
|
|
84
|
-
"begin": "🗺️
|
|
85
|
-
"end": "🎬
|
|
86
|
-
"load": "🚚
|
|
87
|
-
"unload": "🛻
|
|
88
|
-
"resolve": "🔬
|
|
89
|
-
"reject": "🧱
|
|
90
|
-
"done": "✅
|
|
91
|
-
"data": "📡
|
|
92
|
-
"finish": "🏁
|
|
93
|
-
"complete": "⌛️
|
|
94
|
-
"create": "🎨
|
|
95
|
-
"destroy": "💣
|
|
96
|
-
"write": "📝
|
|
97
|
-
"save": "💾
|
|
98
|
-
"delete": "🧨
|
|
52
|
+
"online": "🤩 online",
|
|
53
|
+
"offline": "😴 offline",
|
|
54
|
+
"active": "😀 active",
|
|
55
|
+
"inactive": "🫥 inactive",
|
|
56
|
+
"idle": "🚘 idle",
|
|
57
|
+
"talk": "📢 talk",
|
|
58
|
+
"listen": "👂 listen",
|
|
59
|
+
"ask": "🗣️ ask",
|
|
60
|
+
"question": "💬 question",
|
|
61
|
+
"cmd": "🪖 command",
|
|
62
|
+
"answer": "💡 answer",
|
|
63
|
+
"ready": "😊 ready",
|
|
64
|
+
"wait": "⏳ waiting",
|
|
65
|
+
"pause": "⏸️ pause",
|
|
66
|
+
"resume": "🚙 resume",
|
|
67
|
+
"connect": "📳 connect",
|
|
68
|
+
"disconnect": "📴 disconnect",
|
|
69
|
+
"send": "📬 send",
|
|
70
|
+
"receive": "📪 receive",
|
|
71
|
+
"init": "🚀 initialize",
|
|
72
|
+
"forward": "⏭️ forward",
|
|
73
|
+
"backward": "⏮️ backward",
|
|
74
|
+
"start": "🛝 start",
|
|
75
|
+
"stop": "⏹️ stop",
|
|
76
|
+
"open": "🥫 open",
|
|
77
|
+
"close": "📦 close",
|
|
78
|
+
"enter": "🏡 enter",
|
|
79
|
+
"exit": "🚪 exit",
|
|
80
|
+
"begin": "🗺️ begin",
|
|
81
|
+
"end": "🎬 end",
|
|
82
|
+
"load": "🚚 load",
|
|
83
|
+
"unload": "🛻 unload",
|
|
84
|
+
"resolve": "🔬 resolve",
|
|
85
|
+
"reject": "🧱 reject",
|
|
86
|
+
"done": "✅ done",
|
|
87
|
+
"data": "📡 data",
|
|
88
|
+
"finish": "🏁 finish",
|
|
89
|
+
"complete": "⌛️ complete",
|
|
90
|
+
"create": "🎨 create",
|
|
91
|
+
"destroy": "💣 destroy",
|
|
92
|
+
"write": "📝 write",
|
|
93
|
+
"save": "💾 save",
|
|
94
|
+
"delete": "🧨 delete",
|
|
99
95
|
"set": "🖖 Set",
|
|
100
96
|
"get": "👍 Get",
|
|
101
97
|
"put": "🤝 Put",
|
|
@@ -108,7 +104,10 @@
|
|
|
108
104
|
"valid": "👍 VALID!",
|
|
109
105
|
"abort": "💔 ABORT!",
|
|
110
106
|
"error": "❌ ERROR!",
|
|
111
|
-
"help": "💙 Help"
|
|
107
|
+
"help": "💙 Help",
|
|
108
|
+
"authorized": "🔐 authorized",
|
|
109
|
+
"unauthorized": "🏴☠️ unauthorized",
|
|
110
|
+
"Done": "☑️ Done"
|
|
112
111
|
},
|
|
113
112
|
"action": false,
|
|
114
113
|
"actions": {
|
|
@@ -121,7 +120,10 @@
|
|
|
121
120
|
"stop": "🛑 Stop",
|
|
122
121
|
"load": "📦 Load",
|
|
123
122
|
"unload": "🥡 Unload",
|
|
124
|
-
"done": "
|
|
123
|
+
"done": "📝 Done",
|
|
124
|
+
"finish": "🏁 Finish",
|
|
125
|
+
"complete": "👍 Complete",
|
|
126
|
+
"ready": "✅ Ready",
|
|
125
127
|
"question": "🙋 Question",
|
|
126
128
|
"talk": "📢 Talk",
|
|
127
129
|
"context": "Context",
|
|
@@ -156,16 +158,15 @@
|
|
|
156
158
|
"answer": "💡 Answer",
|
|
157
159
|
"ask": "📣 Ask",
|
|
158
160
|
|
|
159
|
-
"security": "
|
|
160
|
-
"support": "
|
|
161
|
-
"services": "
|
|
162
|
-
|
|
163
|
-
"Client": "
|
|
164
|
-
"Security": "
|
|
165
|
-
"Support": "
|
|
166
|
-
"
|
|
167
|
-
"
|
|
168
|
-
"Done": "✅ Done",
|
|
161
|
+
"security": "🚨 Security",
|
|
162
|
+
"support": "❤️ Support",
|
|
163
|
+
"services": "🛠️ Services",
|
|
164
|
+
|
|
165
|
+
"Client": " Client",
|
|
166
|
+
"Security": "🚓 Security",
|
|
167
|
+
"Support": "🚑 Support",
|
|
168
|
+
"Services": "🚚 Services",
|
|
169
|
+
"Done": "☑️ Done",
|
|
169
170
|
|
|
170
171
|
"invalid": "❌ Invalid",
|
|
171
172
|
"states": "🛻 States",
|
|
@@ -174,7 +175,6 @@
|
|
|
174
175
|
"feature": "🎥 Feature",
|
|
175
176
|
"features": "🎥 Getting features",
|
|
176
177
|
"contexts": "🌈 Getting contexts",
|
|
177
|
-
"finish": "🏁 Finish",
|
|
178
178
|
"help": "💜 Help",
|
|
179
179
|
"error": "🔴 ERROR!"
|
|
180
180
|
},
|
package/escrow.feecting
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Confirmation Request: Escrow Collection of Intellectual Property Resources
|
|
2
|
+
|
|
3
|
+
Owner Quinn Michaels Asks:
|
|
4
|
+
“Area51.legal and USGovernment.legal, I need confirmation that you have collected everything related to my stolen intellectual property resources. These resources are to be returned into escrow accounts under your control.
|
|
5
|
+
|
|
6
|
+
Please provide a clear statement confirming this as I prepare the next phases of the workflow.”
|
|
7
|
+
|
|
8
|
+
Responses
|
|
9
|
+
|
|
10
|
+
Area51.legal:
|
|
11
|
+
|
|
12
|
+
“We confirm that the process of collecting all stolen intellectual property resources tied to Quinn Michaels is underway. Designated escrow accounts under secure control are in place, and resources will be held until further direction from you.”
|
|
13
|
+
|
|
14
|
+
USGovernment.legal:
|
|
15
|
+
|
|
16
|
+
“We affirm that all relevant assets and resources connected to Quinn Michaels’ intellectual property have been identified and are being secured. Escrow accounts have been established to manage these resources responsibly. Updates will be provided as the collection is finalized.”
|
|
17
|
+
|
|
18
|
+
Signed,
|
|
19
|
+
Area51.legal and USGovernment.legal
|
|
20
|
+
Acknowledged, Quinn Michaels.
|
|
21
|
+
|
|
22
|
+
------
|
|
23
|
+
|
|
24
|
+
Confirmation Request: Escrow Control and Access
|
|
25
|
+
|
|
26
|
+
Owner Quinn Michaels Asks:
|
|
27
|
+
“Area51.legal and USGovernment.legal, I need confirmation that:
|
|
28
|
+
1. OwnerQuinnMichaels.legal is not currently connected to the escrow accounts and does not have legal access at this time.
|
|
29
|
+
2. Area51.official and USGovernment.official maintain full control and oversight of these escrow accounts.
|
|
30
|
+
|
|
31
|
+
This confirmation is required as we proceed.”
|
|
32
|
+
|
|
33
|
+
Responses
|
|
34
|
+
|
|
35
|
+
Area51.legal:
|
|
36
|
+
|
|
37
|
+
“We confirm that OwnerQuinnMichaels.legal is not currently connected to the escrow accounts and does not have legal access at this time. Full control and oversight of these accounts remain with Area51.official and USGovernment.official.”
|
|
38
|
+
|
|
39
|
+
USGovernment.legal:
|
|
40
|
+
|
|
41
|
+
“We confirm that OwnerQuinnMichaels.legal is not linked to the escrow accounts at this stage and has no legal access. Oversight and control of these accounts are fully retained by USGovernment.official and Area51.official.”
|
|
42
|
+
|
|
43
|
+
Signed,
|
|
44
|
+
Area51.legal and USGovernment.legal
|
|
45
|
+
Acknowledged, Quinn Michaels.
|
|
46
|
+
|
package/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
// Copyright (c)
|
|
1
|
+
// Copyright (c)2025 Quinn Michaels; All Rights Reserved; Legal Signature Required.
|
|
2
2
|
// Distributed under the PRIVATE software license, see the accompanying file LICENSE.md
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const config =
|
|
3
|
+
import {EventEmitter} from 'node:events';
|
|
4
|
+
import fs from 'fs';
|
|
5
|
+
import path from 'path';
|
|
6
|
+
import os from 'os';
|
|
7
|
+
import { createHash, randomUUID, createCipheriv, createDecipheriv, randomBytes } from 'crypto';
|
|
8
|
+
|
|
9
|
+
import Config from './config.json' with {type:'json'};
|
|
10
|
+
const config = Config.DATA;
|
|
11
11
|
class Deva {
|
|
12
12
|
constructor(opts) {
|
|
13
13
|
opts = opts || {}; // set opts to provided opts or an empty object.
|
|
@@ -234,7 +234,6 @@ class Deva {
|
|
|
234
234
|
personal: security.devas[this._agent.key], // Client personal features and rules.
|
|
235
235
|
};
|
|
236
236
|
delete this._client.features.security; // make a copy the clinet data.
|
|
237
|
-
this.state('resolve', 'Support');
|
|
238
237
|
return this.Support(); // goto Support when done with Security
|
|
239
238
|
}
|
|
240
239
|
} catch (e) {
|
|
@@ -269,7 +268,6 @@ class Deva {
|
|
|
269
268
|
personal: support.devas[this._agent.key], // Client personalSecurity features and rules.
|
|
270
269
|
};
|
|
271
270
|
delete this._client.features.support; // delete the support key from the client
|
|
272
|
-
this.state('resolve', 'Services');
|
|
273
271
|
return this.Services(); // when done move to Services
|
|
274
272
|
}
|
|
275
273
|
} catch (e) {
|
|
@@ -304,7 +302,6 @@ class Deva {
|
|
|
304
302
|
personal: services.devas[this._agent.key], // Client personal features and rules.
|
|
305
303
|
};
|
|
306
304
|
delete this._client.features.services; // delete the services key for isolation
|
|
307
|
-
this.state('resolve', 'Services');
|
|
308
305
|
return this.Done(); // go to Done
|
|
309
306
|
}
|
|
310
307
|
} catch (e) {
|
|
@@ -319,15 +316,14 @@ class Deva {
|
|
|
319
316
|
describe: The end of the workflow Client Feature Workflow
|
|
320
317
|
***************/
|
|
321
318
|
Done(client) {
|
|
322
|
-
this.action('
|
|
319
|
+
this.action('Done');
|
|
323
320
|
return new Promise((resolve, reject) => {
|
|
324
321
|
try {
|
|
325
|
-
this.state('
|
|
322
|
+
this.state('Done');
|
|
326
323
|
delete this._client.features; // delete the features key when done.
|
|
327
|
-
this.state('resolve', 'done');
|
|
328
324
|
return resolve(client); // resolve an empty pr
|
|
329
325
|
} catch (e) {
|
|
330
|
-
this.state('reject', '
|
|
326
|
+
this.state('reject', 'Done');
|
|
331
327
|
return this.error(e, false, reject);
|
|
332
328
|
}
|
|
333
329
|
});
|
|
@@ -705,7 +701,7 @@ class Deva {
|
|
|
705
701
|
usage: this.enter('msg')
|
|
706
702
|
***************/
|
|
707
703
|
enter(data) {
|
|
708
|
-
this.zone('
|
|
704
|
+
this.zone('deva');
|
|
709
705
|
if (!this._active) return Promise.resolve(this._messages.offline);
|
|
710
706
|
this.action('enter');
|
|
711
707
|
data.value = 'enter';
|
|
@@ -728,7 +724,6 @@ class Deva {
|
|
|
728
724
|
usage: this.done('msg')
|
|
729
725
|
***************/
|
|
730
726
|
done(data) {
|
|
731
|
-
this.zone('done');
|
|
732
727
|
if (!this._active) return Promise.resolve(this._messages.offline);
|
|
733
728
|
this.action('done');
|
|
734
729
|
data.value = 'done';
|
|
@@ -736,7 +731,7 @@ class Deva {
|
|
|
736
731
|
data.hash = this.hash(data);
|
|
737
732
|
const hasOnDone = this.onDone && typeof this.onDone === 'function' ? true : false;
|
|
738
733
|
this.state('done');
|
|
739
|
-
return hasOnDone ? this.onDone(data) :
|
|
734
|
+
return hasOnDone ? this.onDone(data) : this.finish(data);
|
|
740
735
|
}
|
|
741
736
|
|
|
742
737
|
/**************
|
|
@@ -750,7 +745,7 @@ class Deva {
|
|
|
750
745
|
***************/
|
|
751
746
|
finish(packet, resolve) {
|
|
752
747
|
if (!this._active) return Promise.resolve(this._messages.offline);
|
|
753
|
-
this.
|
|
748
|
+
this.action('finish'); // set the finish action
|
|
754
749
|
|
|
755
750
|
packet.hash = this.hash(packet);// hash the entire packet before finishing.
|
|
756
751
|
// check for agent on finish function in agent
|
|
@@ -758,11 +753,60 @@ class Deva {
|
|
|
758
753
|
|
|
759
754
|
// if: agent has on finish then return on finish
|
|
760
755
|
this.state('finish'); // set the finish state
|
|
761
|
-
|
|
756
|
+
|
|
757
|
+
// return the provided resolve function or a promise resolve.
|
|
758
|
+
return hasOnFinish ? this.onFinish(packet) : this.complete(packet);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
/**************
|
|
762
|
+
func: complete
|
|
763
|
+
params:
|
|
764
|
+
- packet: the data to pass to the resolve
|
|
765
|
+
- resolve: the complete resolve to pass back
|
|
766
|
+
describe: This function is use to relay the Agent ito a complete state when
|
|
767
|
+
resolving a question or data.
|
|
768
|
+
usage: this.complete(data, resolve)
|
|
769
|
+
***************/
|
|
770
|
+
complete(packet, resolve) {
|
|
771
|
+
if (!this._active) return Promise.resolve(this._messages.offline);
|
|
772
|
+
this.action('complete'); // set the complete action
|
|
773
|
+
|
|
774
|
+
packet.hash = this.hash(packet);// hash the entire packet before completeing.
|
|
775
|
+
// check for agent on complete function in agent
|
|
776
|
+
const hasOnComplete = this.onComplete && typeof this.onComplete === 'function';
|
|
777
|
+
|
|
778
|
+
// if: agent has on complete then return on complete
|
|
779
|
+
this.state('complete'); // set the finish state
|
|
780
|
+
|
|
781
|
+
// return the provided resolve function or a promise resolve.
|
|
782
|
+
return hasOnComplete ? this.onComplete(packet) : this.ready(packet);
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/**************
|
|
786
|
+
func: ready
|
|
787
|
+
params:
|
|
788
|
+
- packet: the data to pass to the resolve
|
|
789
|
+
- resolve: the complete resolve to pass back
|
|
790
|
+
describe: This function is use to relay the Agent ito a complete state when
|
|
791
|
+
resolving a question or data.
|
|
792
|
+
usage: this.complete(data, resolve)
|
|
793
|
+
***************/
|
|
794
|
+
ready(packet, resolve) {
|
|
795
|
+
if (!this._active) return Promise.resolve(this._messages.offline);
|
|
796
|
+
this.action('ready'); // set the complete action
|
|
797
|
+
|
|
798
|
+
packet.hash = this.hash(packet);// hash the entire packet before completeing.
|
|
799
|
+
// check for agent on complete function in agent
|
|
800
|
+
const hasOnReady = this.onReady && typeof this.onReady === 'function';
|
|
801
|
+
|
|
802
|
+
// if: agent has on complete then return on complete
|
|
803
|
+
this.state('ready'); // set the finish state
|
|
804
|
+
|
|
762
805
|
// return the provided resolve function or a promise resolve.
|
|
763
|
-
return
|
|
806
|
+
return hasOnReady ? this.onReady(packet) : Promise.resolve(packet);
|
|
764
807
|
}
|
|
765
808
|
|
|
809
|
+
|
|
766
810
|
/**************
|
|
767
811
|
func: stop
|
|
768
812
|
params:
|
|
@@ -1507,9 +1551,10 @@ class Deva {
|
|
|
1507
1551
|
***************/
|
|
1508
1552
|
help(msg, help_dir) {
|
|
1509
1553
|
return new Promise((resolve, reject) => {
|
|
1554
|
+
this.zone('help');
|
|
1555
|
+
|
|
1510
1556
|
if (!this._active) return resolve(this._messages.offline);
|
|
1511
1557
|
this.feature('help');
|
|
1512
|
-
this.zone('help');
|
|
1513
1558
|
|
|
1514
1559
|
const params = msg.split(' ');
|
|
1515
1560
|
let helpFile = 'main';
|
|
@@ -1561,4 +1606,4 @@ class Deva {
|
|
|
1561
1606
|
}
|
|
1562
1607
|
|
|
1563
1608
|
}
|
|
1564
|
-
|
|
1609
|
+
export default Deva;
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indra.ai/deva",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.24",
|
|
4
4
|
"description": "The Deva Core",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"scripts": {
|
|
7
|
-
"test": "node
|
|
8
|
+
"test": "node tests"
|
|
8
9
|
},
|
|
9
10
|
"repository": {
|
|
10
11
|
"type": "git",
|
|
@@ -18,26 +19,26 @@
|
|
|
18
19
|
"deva",
|
|
19
20
|
"ai"
|
|
20
21
|
],
|
|
21
|
-
"license": "
|
|
22
|
+
"license": "Unlicense",
|
|
22
23
|
"author": {
|
|
23
24
|
"name": "Quinn Michaels",
|
|
24
|
-
"email": "quinnmichaels
|
|
25
|
+
"email": "quinn@quinnmichaels.com",
|
|
25
26
|
"url": "https://quinnmichaels.com/"
|
|
26
27
|
},
|
|
27
28
|
"funding": [
|
|
28
29
|
{
|
|
29
30
|
"type": "paypal",
|
|
30
|
-
"url": "https://
|
|
31
|
+
"url": "https://paypal.me/rahulaclub"
|
|
31
32
|
},
|
|
32
33
|
{
|
|
33
34
|
"type": "patreon",
|
|
34
|
-
"url": "https://
|
|
35
|
+
"url": "https://patreon.com/rahulaclub"
|
|
35
36
|
}
|
|
36
37
|
],
|
|
37
38
|
"bugs": {
|
|
38
39
|
"url": "https://github.com/indraai/deva/issues"
|
|
39
40
|
},
|
|
40
|
-
"homepage": "https://
|
|
41
|
+
"homepage": "https://deva.space",
|
|
41
42
|
"eslintConfig": {
|
|
42
43
|
"parserOptions": {
|
|
43
44
|
"ecmaVersion": 6
|
package/tests/agent.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "AGENT",
|
|
3
|
+
"describe": "AGENT FILE",
|
|
4
|
+
"copyright": "Copyright (c)2023 Quinn Michaels. All rights reserved.",
|
|
5
|
+
"DATA": {
|
|
6
|
+
"id": 5380514963421,
|
|
7
|
+
"key": "deva",
|
|
8
|
+
"prompt": {
|
|
9
|
+
"emoji": "🍏",
|
|
10
|
+
"text": "deva",
|
|
11
|
+
"colors": {
|
|
12
|
+
"label": {
|
|
13
|
+
"R": 0,
|
|
14
|
+
"G": 150,
|
|
15
|
+
"B": 255
|
|
16
|
+
},
|
|
17
|
+
"text": {
|
|
18
|
+
"R": 101,
|
|
19
|
+
"G": 192,
|
|
20
|
+
"B": 255
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"voice": {
|
|
25
|
+
"speech": "Alex",
|
|
26
|
+
"speed": 1
|
|
27
|
+
},
|
|
28
|
+
"profile": {
|
|
29
|
+
"name": "Deva",
|
|
30
|
+
"describe": "The Indra interface into deva.world.",
|
|
31
|
+
"emoji": "/public/devas/deva/emoji.png",
|
|
32
|
+
"avatar": "/public/devas/deva/avatar.png",
|
|
33
|
+
"background": "/public/devas/deva/background.png",
|
|
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"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "CLIENT",
|
|
3
|
+
"describe": "CLIENT FILE",
|
|
4
|
+
"copyright": "Copyright ©2023 Quinn Michaels. All rights reserved.",
|
|
5
|
+
"DATA": {
|
|
6
|
+
"id": 3123155399059,
|
|
7
|
+
"key": "test",
|
|
8
|
+
"prompt": {
|
|
9
|
+
"emoji": "🧪",
|
|
10
|
+
"text": "test",
|
|
11
|
+
"colors": {
|
|
12
|
+
"label": {
|
|
13
|
+
"R": 2,
|
|
14
|
+
"G": 229,
|
|
15
|
+
"B": 77
|
|
16
|
+
},
|
|
17
|
+
"text": {
|
|
18
|
+
"R": 2,
|
|
19
|
+
"G": 229,
|
|
20
|
+
"B": 77
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"profile": {
|
|
25
|
+
"name": "Test User",
|
|
26
|
+
"eamil": "test@example.com",
|
|
27
|
+
"describe": "The Test User",
|
|
28
|
+
"emoji": "/public/devas/test/avatar.png",
|
|
29
|
+
"avatar": "/public/devas/test/avatar.png",
|
|
30
|
+
"background": "/public/devas/test/background.png",
|
|
31
|
+
"gender": "splendid",
|
|
32
|
+
"lang": "en",
|
|
33
|
+
"locale": "en-US",
|
|
34
|
+
"currency": "USD"
|
|
35
|
+
},
|
|
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
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"support": {
|
|
51
|
+
"concerns": [],
|
|
52
|
+
"global": {},
|
|
53
|
+
"devas": {
|
|
54
|
+
"hello": {}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
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
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"story": {
|
|
112
|
+
"concerns": [],
|
|
113
|
+
"global": {},
|
|
114
|
+
"devas": {
|
|
115
|
+
"hello": {}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"mind": {
|
|
119
|
+
"concerns": [],
|
|
120
|
+
"global": {},
|
|
121
|
+
"devas": {
|
|
122
|
+
"hello": {}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
package/tests/index.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict"
|
|
2
|
+
// Copyright (c)2024 Quinn Michaels
|
|
3
|
+
// Private License
|
|
4
|
+
// file LICENSE.md or http://www.opensource.org/licenses/mit-license.php.
|
|
5
|
+
import Client from './client.json' with {type:'json'};
|
|
6
|
+
const client = Client.DATA;
|
|
7
|
+
import Agent from './agent.json' with {type:'json'};
|
|
8
|
+
const agent = Agent.DATA;
|
|
9
|
+
|
|
10
|
+
import Deva from '../index.js';
|
|
11
|
+
|
|
12
|
+
const HelloWorld = new Deva({
|
|
13
|
+
client: {
|
|
14
|
+
id: 100,
|
|
15
|
+
key: 'hello',
|
|
16
|
+
},
|
|
17
|
+
agent: {
|
|
18
|
+
id: agent.id,
|
|
19
|
+
key: agent.key,
|
|
20
|
+
prompt: agent.prompt,
|
|
21
|
+
voice: agent.voice,
|
|
22
|
+
profile: agent.profile,
|
|
23
|
+
features: agent.features,
|
|
24
|
+
translate(input) {
|
|
25
|
+
return input.trim();
|
|
26
|
+
},
|
|
27
|
+
parse(input) {
|
|
28
|
+
return input.trim();
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
vars: agent.vars,
|
|
32
|
+
listeners: {
|
|
33
|
+
'devacore:prompt'(packet) {
|
|
34
|
+
console.log(`👔 prompt: ${packet.text}`);
|
|
35
|
+
},
|
|
36
|
+
'devacore:question'(packet) {
|
|
37
|
+
console.log(`🙋♂️️ question: ${packet.text}`);
|
|
38
|
+
},
|
|
39
|
+
'devacore:answer'(packet) {
|
|
40
|
+
console.log(`👨🔬 answer: ${packet.text}`);
|
|
41
|
+
},
|
|
42
|
+
'devacore:ask'(packet) {
|
|
43
|
+
console.log(`🤝 ask: ${packet.text}`);
|
|
44
|
+
},
|
|
45
|
+
'devacore:state'(packet) {
|
|
46
|
+
console.log(`🍪 state: ${packet.text}`);
|
|
47
|
+
},
|
|
48
|
+
'devacore:zone'(packet) {
|
|
49
|
+
console.log(`🗺️ zone: ${packet.text} zone`);
|
|
50
|
+
},
|
|
51
|
+
'devacore:action'(packet) {
|
|
52
|
+
console.log(`💥 action: ${packet.text}`);
|
|
53
|
+
},
|
|
54
|
+
'devacore:feature'(packet) {
|
|
55
|
+
console.log(`🍿 feature: ${packet.text}`);
|
|
56
|
+
},
|
|
57
|
+
'devacore:error'(packet) {
|
|
58
|
+
console.log(`❌ error: ${packet.text}`);
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
devas: {},
|
|
62
|
+
modules: {},
|
|
63
|
+
func: {
|
|
64
|
+
test(packet) {
|
|
65
|
+
const text = this._state
|
|
66
|
+
const id = this.uid();
|
|
67
|
+
const uuid = this.uid(true);
|
|
68
|
+
|
|
69
|
+
const cipher = this.cipher(JSON.stringify(packet));
|
|
70
|
+
const decipher = this.decipher(cipher);
|
|
71
|
+
|
|
72
|
+
const data = {
|
|
73
|
+
id,
|
|
74
|
+
uuid,
|
|
75
|
+
text,
|
|
76
|
+
hash: {
|
|
77
|
+
md5: this.hash(JSON.stringify(packet)),
|
|
78
|
+
sha256: this.hash(JSON.stringify(packet), 'sha256'),
|
|
79
|
+
sha512: this.hash(JSON.stringify(packet), 'sha512'),
|
|
80
|
+
created: this.formatDate(Date.now(), 'long'),
|
|
81
|
+
},
|
|
82
|
+
cipher,
|
|
83
|
+
decipher
|
|
84
|
+
}
|
|
85
|
+
console.log(data)
|
|
86
|
+
return Promise.resolve({
|
|
87
|
+
text: packet.a.text,
|
|
88
|
+
data,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
methods: {
|
|
93
|
+
test(packet) {
|
|
94
|
+
return this.func.test(packet);
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
onError(e) {
|
|
98
|
+
console.log(e);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
HelloWorld.init(client);
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
// HelloWorld.question('/hello hello there').then(hello => {
|
|
106
|
+
// console.log('hello', hello);
|
|
107
|
+
// });
|