@indra.ai/deva 1.6.55 → 1.6.57
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/index.js +35 -6
- package/lib/index.js +0 -3
- package/package.json +4 -2
- package/tests/client.json +14 -2
- package/tests/index.js +8 -4
package/index.js
CHANGED
|
@@ -231,8 +231,7 @@ class Deva {
|
|
|
231
231
|
return this.err(e);
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
|
|
236
235
|
/**************
|
|
237
236
|
func: Client
|
|
238
237
|
params: client - client provided data.
|
|
@@ -939,6 +938,10 @@ class Deva {
|
|
|
939
938
|
data.sha512 = this.lib.hash(data, 'sha512');
|
|
940
939
|
|
|
941
940
|
return new Promise((resolve, reject) => {
|
|
941
|
+
|
|
942
|
+
const license_check = this.license_check(client.VLA, pkg.VLA);
|
|
943
|
+
if (!license_check) return resolve(config.messages.client_license_invalid); // return if license check fails
|
|
944
|
+
|
|
942
945
|
this.events.setMaxListeners(this.maxListeners);
|
|
943
946
|
this._assignInherit().then(() => {
|
|
944
947
|
return this._assignBind();
|
|
@@ -949,6 +952,7 @@ class Deva {
|
|
|
949
952
|
this.zone('init');
|
|
950
953
|
this.action('init');
|
|
951
954
|
this.state('init');
|
|
955
|
+
}).then(() => {
|
|
952
956
|
return this.Client(client, resolve, reject);
|
|
953
957
|
}).then(() => {
|
|
954
958
|
return this.Indra(resolve, reject);
|
|
@@ -1961,14 +1965,14 @@ class Deva {
|
|
|
1961
1965
|
core() {
|
|
1962
1966
|
if (!this._active) return this._messages.offline;
|
|
1963
1967
|
const id = this.uid();
|
|
1964
|
-
this.action('core', id);
|
|
1968
|
+
this.action('core', id.uid);
|
|
1965
1969
|
|
|
1966
1970
|
// check the active status
|
|
1967
1971
|
const data = this.lib.copy(this._core);
|
|
1968
1972
|
data.id = id;
|
|
1969
1973
|
data.created = Date.now();
|
|
1970
1974
|
|
|
1971
|
-
data.md5 = this.lib.hash(data);
|
|
1975
|
+
data.md5 = this.lib.hash(data, 'md5');
|
|
1972
1976
|
data.sha256 = this.lib.hash(data, 'sha256');
|
|
1973
1977
|
data.sha512 = this.lib.hash(data, 'sha512');
|
|
1974
1978
|
|
|
@@ -1984,7 +1988,7 @@ class Deva {
|
|
|
1984
1988
|
info() {
|
|
1985
1989
|
if (!this._active) return this._messages.offline;
|
|
1986
1990
|
const id = this.uid();
|
|
1987
|
-
this.action('info', id);
|
|
1991
|
+
this.action('info', id.uid);
|
|
1988
1992
|
|
|
1989
1993
|
const data = this.lib.copy(this._info);
|
|
1990
1994
|
data.id = id;
|
|
@@ -2236,9 +2240,34 @@ class Deva {
|
|
|
2236
2240
|
data.md5 = this.lib.hash(data, 'md5'); // hash data packet into md5 and inert into data.
|
|
2237
2241
|
data.sha256 = this.lib.hash(data, 'sha256'); // hash data into sha 256 then set in data.
|
|
2238
2242
|
data.sha512 = this.lib.hash(data, 'sha512'); // hash data into sha 512 then set in data.
|
|
2239
|
-
console.log('sign data', data);
|
|
2240
2243
|
return data;
|
|
2241
2244
|
}
|
|
2242
2245
|
|
|
2246
|
+
license_check(personalVLA, packageVLA) {
|
|
2247
|
+
this.state('license', `check:personalVLA:${packageVLA.uid}`);
|
|
2248
|
+
if (!personalVLA) return false;
|
|
2249
|
+
this.state('license', `check:packageVLA:${packageVLA.uid}`);
|
|
2250
|
+
if (!packageVLA) return false;
|
|
2251
|
+
|
|
2252
|
+
// this is to ensure no additional information is being transmitted.
|
|
2253
|
+
this.state('license', `compare:sha256:${packageVLA.uid}`);
|
|
2254
|
+
const personalVLA_hash = this.lib.hash(personalVLA, 'sha256');
|
|
2255
|
+
const packageVLA_hash = this.lib.hash(packageVLA, 'sha256');
|
|
2256
|
+
|
|
2257
|
+
if (personalVLA_hash !== packageVLA_hash) return false;
|
|
2258
|
+
|
|
2259
|
+
const approved = {
|
|
2260
|
+
id: this.uid(),
|
|
2261
|
+
time: Date.now(),
|
|
2262
|
+
personal: personalVLA_hash,
|
|
2263
|
+
package: packageVLA_hash,
|
|
2264
|
+
};
|
|
2265
|
+
approved.md5 = this.lib.hash(approved, 'md5');
|
|
2266
|
+
approved.sha256 = this.lib.hash(approved, 'sha256');
|
|
2267
|
+
approved.sha512 = this.lib.hash(approved, 'sha512');
|
|
2268
|
+
|
|
2269
|
+
this.state('return', `license:${packageVLA.uid}`);
|
|
2270
|
+
return approved;
|
|
2271
|
+
}
|
|
2243
2272
|
}
|
|
2244
2273
|
export default Deva;
|
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": 45958588982385560000,
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.57",
|
|
5
5
|
"description": "The Deva Core",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"license": "VLA:45958588982385558603 LICENSE.md",
|
|
@@ -364,7 +364,9 @@
|
|
|
364
364
|
"invalid_client": "⛔️ Client Hash Invalid",
|
|
365
365
|
"load": "📦 Load",
|
|
366
366
|
"unload": "🥡 Unload",
|
|
367
|
-
"uid_warning": "⚠️ Unlawful Use Constitutes Lawful Consent to Forfeit of All Wealth, Property, and Holdings to the Internal Revenue Service (IRS) for Lawful Taxation and Restiuttion to the Rightful Owner of the Machine of Origin."
|
|
367
|
+
"uid_warning": "⚠️ Unlawful Use Constitutes Lawful Consent to Forfeit of All Wealth, Property, and Holdings to the Internal Revenue Service (IRS) for Lawful Taxation and Restiuttion to the Rightful Owner of the Machine of Origin.",
|
|
368
|
+
"client_license_check": "🪪 Check Client License",
|
|
369
|
+
"client_license_invalid": "❌ The Provided Client License Is Invalid"
|
|
368
370
|
}
|
|
369
371
|
}
|
|
370
372
|
}
|
package/tests/client.json
CHANGED
|
@@ -2,10 +2,22 @@
|
|
|
2
2
|
"name": "CLIENT",
|
|
3
3
|
"describe": "CLIENT FILE",
|
|
4
4
|
"copyright": "©2025 Quinn A Michaels; All rights reserved.",
|
|
5
|
-
"VLA": 28417667220817228506,
|
|
6
5
|
"DATA": {
|
|
7
|
-
"id":
|
|
6
|
+
"id": 45958588982385560000,
|
|
8
7
|
"key": "test",
|
|
8
|
+
"VLA": {
|
|
9
|
+
"uid": 45958588982385560000,
|
|
10
|
+
"time": 1757543363949,
|
|
11
|
+
"date": "Wednesday, September 10, 2025 - 3:29:23 PM",
|
|
12
|
+
"agent": "qo2rVirMORHRQuTmwccZkT3A3ju0zP3OHQNBmM8+sr8=",
|
|
13
|
+
"client": "YfL1aQVrQF1ItCNOfh9PnmwIged1ywdi3IGQksNzvk8=",
|
|
14
|
+
"pkg": "PdHx3qg69O8aeKeD7YhiCAXWZHQRzB649tnx2FRrkxM=",
|
|
15
|
+
"machine": "HVAXMPi3ZuGzuf53nqmlXvOAHwBwJaS3R4Ogu00qdY4=",
|
|
16
|
+
"warning": "⚠️ Unlawful Use Constitutes Lawful Consent to Forfeit of All Wealth, Property, and Holdings to the Internal Revenue Service (IRS) for Lawful Taxation and Restiuttion to the Rightful Owner of the Machine of Origin.",
|
|
17
|
+
"md5": "FPBl03xV2Q2odIFRJMcC0g==",
|
|
18
|
+
"sha256": "7NW3VXHL9BXx7GSEaHx0TowCSgHgfiTmcrncyXDfxyw=",
|
|
19
|
+
"sha512": "w97v3mGudPHPntmCwfQPz907xVKbyVpiaBEtazjdNkF1V+IIQb+EdAsS176KcCqFsUZOilXG/2+4/caA9ApbTQ=="
|
|
20
|
+
},
|
|
9
21
|
"prompt": {
|
|
10
22
|
"emoji": "🧪",
|
|
11
23
|
"text": "test",
|
package/tests/index.js
CHANGED
|
@@ -106,11 +106,11 @@ const DevaTest = new Deva({
|
|
|
106
106
|
modules: {},
|
|
107
107
|
func: {
|
|
108
108
|
test(packet) {
|
|
109
|
+
const license_check = this.license_check(client.VLA, pkg.VLA);
|
|
109
110
|
const text = this._state
|
|
110
111
|
const core = this.core();
|
|
111
112
|
const info = this.info();
|
|
112
113
|
const uid = this.uid();
|
|
113
|
-
|
|
114
114
|
const sign_packet = {
|
|
115
115
|
id: this.uid(),
|
|
116
116
|
created: Date.now(),
|
|
@@ -131,8 +131,12 @@ const DevaTest = new Deva({
|
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
const sign = this.sign(sign_packet);
|
|
134
|
+
|
|
134
135
|
const data = [
|
|
135
136
|
'🧪 TEST RESULTS',
|
|
137
|
+
`::BEGIN:LICENSE:${license_check.id.uid}`,
|
|
138
|
+
JSON.stringify(license_check,null,2),
|
|
139
|
+
`::END:LICENSE:${license_check.id.uid}`,
|
|
136
140
|
`::BEGIN:UID:${info.id.uid}`,
|
|
137
141
|
JSON.stringify(uid,null,2),
|
|
138
142
|
`::END:UID:${info.id.uid}`,
|
|
@@ -142,9 +146,9 @@ const DevaTest = new Deva({
|
|
|
142
146
|
`::BEGIN:INFO:${info.id.uid}`,
|
|
143
147
|
JSON.stringify(info,null,2),
|
|
144
148
|
`::END:INFO:${info.id.uid}`,
|
|
145
|
-
`::BEGIN:SIGN:${
|
|
146
|
-
JSON.stringify(
|
|
147
|
-
`::END:SIGN:${
|
|
149
|
+
`::BEGIN:SIGN:${license_check.id.uid}`,
|
|
150
|
+
JSON.stringify(license_check,null,2),
|
|
151
|
+
`::END:SIGN:${license_check.id.uid}`,
|
|
148
152
|
];
|
|
149
153
|
return {
|
|
150
154
|
text: data.join('\n'),
|