@indra.ai/deva 1.6.55 → 1.6.56
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 +30 -4
- package/lib/index.js +0 -3
- package/package.json +1 -1
- package/tests/client.json +14 -2
- package/tests/index.js +8 -4
package/index.js
CHANGED
|
@@ -1961,14 +1961,14 @@ class Deva {
|
|
|
1961
1961
|
core() {
|
|
1962
1962
|
if (!this._active) return this._messages.offline;
|
|
1963
1963
|
const id = this.uid();
|
|
1964
|
-
this.action('core', id);
|
|
1964
|
+
this.action('core', id.uid);
|
|
1965
1965
|
|
|
1966
1966
|
// check the active status
|
|
1967
1967
|
const data = this.lib.copy(this._core);
|
|
1968
1968
|
data.id = id;
|
|
1969
1969
|
data.created = Date.now();
|
|
1970
1970
|
|
|
1971
|
-
data.md5 = this.lib.hash(data);
|
|
1971
|
+
data.md5 = this.lib.hash(data, 'md5');
|
|
1972
1972
|
data.sha256 = this.lib.hash(data, 'sha256');
|
|
1973
1973
|
data.sha512 = this.lib.hash(data, 'sha512');
|
|
1974
1974
|
|
|
@@ -1984,7 +1984,7 @@ class Deva {
|
|
|
1984
1984
|
info() {
|
|
1985
1985
|
if (!this._active) return this._messages.offline;
|
|
1986
1986
|
const id = this.uid();
|
|
1987
|
-
this.action('info', id);
|
|
1987
|
+
this.action('info', id.uid);
|
|
1988
1988
|
|
|
1989
1989
|
const data = this.lib.copy(this._info);
|
|
1990
1990
|
data.id = id;
|
|
@@ -2236,9 +2236,35 @@ class Deva {
|
|
|
2236
2236
|
data.md5 = this.lib.hash(data, 'md5'); // hash data packet into md5 and inert into data.
|
|
2237
2237
|
data.sha256 = this.lib.hash(data, 'sha256'); // hash data into sha 256 then set in data.
|
|
2238
2238
|
data.sha512 = this.lib.hash(data, 'sha512'); // hash data into sha 512 then set in data.
|
|
2239
|
-
console.log('sign data', data);
|
|
2240
2239
|
return data;
|
|
2241
2240
|
}
|
|
2242
2241
|
|
|
2242
|
+
license_check(personalVLA, packageVLA) {
|
|
2243
|
+
this.state('license', `check:personalVLA:${packageVLA.uid}`);
|
|
2244
|
+
if (!personalVLA) return false;
|
|
2245
|
+
this.state('license', `check:packageVLA:${packageVLA.uid}`);
|
|
2246
|
+
if (!packageVLA) return false;
|
|
2247
|
+
|
|
2248
|
+
// this is to ensure no additional information is being transmitted.
|
|
2249
|
+
this.state('license', `compare:sha256:${packageVLA.uid}`);
|
|
2250
|
+
const personalVLA_hash = this.lib.hash(personalVLA, 'sha256');
|
|
2251
|
+
const packageVLA_hash = this.lib.hash(packageVLA, 'sha256');
|
|
2252
|
+
|
|
2253
|
+
console.log('HASHES', packageVLA_hash, personalVLA_hash);
|
|
2254
|
+
if (personalVLA_hash !== packageVLA_hash) return false;
|
|
2255
|
+
|
|
2256
|
+
const approved = {
|
|
2257
|
+
id: this.uid(),
|
|
2258
|
+
time: Date.now(),
|
|
2259
|
+
personal: personalVLA_hash,
|
|
2260
|
+
package: packageVLA_hash,
|
|
2261
|
+
};
|
|
2262
|
+
approved.md5 = this.lib.hash(approved, 'md5');
|
|
2263
|
+
approved.sha256 = this.lib.hash(approved, 'sha256');
|
|
2264
|
+
approved.sha512 = this.lib.hash(approved, 'sha512');
|
|
2265
|
+
|
|
2266
|
+
this.state('return', `license:${packageVLA.uid}`);
|
|
2267
|
+
return approved;
|
|
2268
|
+
}
|
|
2243
2269
|
}
|
|
2244
2270
|
export default Deva;
|
package/lib/index.js
CHANGED
package/package.json
CHANGED
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'),
|