@indra.ai/deva 1.62.75 โ 1.62.77
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/_data/actions.json +0 -1
- package/_data/msgs.json +4 -1
- package/_data/states.json +3 -2
- package/index.js +28 -23
- package/package.json +1 -1
package/_data/actions.json
CHANGED
package/_data/msgs.json
CHANGED
|
@@ -19,13 +19,16 @@
|
|
|
19
19
|
"nokey": "โ๏ธ NO KEY PROVIDED",
|
|
20
20
|
"invalidkey": "โ๏ธ INVALID KEY PROVIDED",
|
|
21
21
|
"matchkey": "โ๏ธ INVALID KEY MATCH",
|
|
22
|
-
"invalidfeature": "โ๏ธ INVALID
|
|
22
|
+
"invalidfeature": "โ๏ธ INVALID FEATURE",
|
|
23
23
|
"asktimeout": "โ๏ธ ASK TIMEOUT",
|
|
24
24
|
"noask": "โ๏ธ ASK TARGET NOT FOUND",
|
|
25
25
|
"method_not_found": "โ๏ธ METHOD NOT FOUND",
|
|
26
26
|
"help_not_found": "โ๏ธ HELP NOT FOUND",
|
|
27
27
|
"invalid_agent": "โ๏ธ Agent Hash Invalid",
|
|
28
28
|
"invalid_client": "โ๏ธ Client Hash Invalid",
|
|
29
|
+
"personalVLA": "โ Bad Personal VLA",
|
|
30
|
+
"packageVLA": "โ Bad Package VLA",
|
|
31
|
+
"checkVLA": "โ Invalid VLA Check",
|
|
29
32
|
"load": "๐ฆ Load",
|
|
30
33
|
"unload": "๐ฅก Unload",
|
|
31
34
|
"warning": "{{prompt.emoji}} {{profile.name}} 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.",
|
package/_data/states.json
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"help": "๐ Help",
|
|
67
67
|
"authorized": "๐ Authorized",
|
|
68
68
|
"unauthorized": "๐ด Unauthorized",
|
|
69
|
-
"Done": "โ๏ธ
|
|
69
|
+
"Done": "โ๏ธ Done",
|
|
70
70
|
"official": "๐ซก Official",
|
|
71
71
|
"unofficial": "๐คฅ Unofficial",
|
|
72
72
|
"approved": "๐๏ธ Approved",
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"incorrect": "๐ฅ Incorrect",
|
|
96
96
|
"clean": "๐งผ Clean",
|
|
97
97
|
"dirty": "๐งน Dirty",
|
|
98
|
-
"consent": "โ๏ธ Consent"
|
|
98
|
+
"consent": "โ๏ธ Consent",
|
|
99
|
+
"check": "โ๏ธ Check"
|
|
99
100
|
}
|
|
100
101
|
}
|
package/index.js
CHANGED
|
@@ -352,7 +352,7 @@ class Deva {
|
|
|
352
352
|
|
|
353
353
|
const data_stamped = this._stamp(this._unstamp(data), key, data.id.uid);
|
|
354
354
|
|
|
355
|
-
// setup the complete talk
|
|
355
|
+
// setup the complete talk veent
|
|
356
356
|
this.action('talk', `${this._events[key]}:${data.id.uid}`); // action talk for the event.
|
|
357
357
|
this.talk(this._events[key], this.lib.copy(data)); // talk the complete event
|
|
358
358
|
|
|
@@ -367,11 +367,9 @@ class Deva {
|
|
|
367
367
|
// determine if there is an onComplete function for the entity.
|
|
368
368
|
const hasOnFunc = this[onfunc] && typeof this[onfunc] === 'function';
|
|
369
369
|
if (hasOnFunc) {
|
|
370
|
-
this.action('
|
|
371
|
-
this.state('
|
|
372
|
-
this.
|
|
373
|
-
this.state('valid', `${onfunc}:${data.id.uid}`); // state valid
|
|
374
|
-
this.intent('good', `${onfunc}:${data.id.uid}`); // intent good
|
|
370
|
+
this.action('return', `onfunc:${onfunc}:${data.id.uid}`); // action return
|
|
371
|
+
this.state('valid', `onfunc:${onfunc}:${data.id.uid}`); // state valid
|
|
372
|
+
this.intent('good', `onfunc:${onfunc}:${data.id.uid}`); // intent good
|
|
375
373
|
return this[onfunc](data, resolve);
|
|
376
374
|
}
|
|
377
375
|
|
|
@@ -2230,34 +2228,41 @@ class Deva {
|
|
|
2230
2228
|
license_check(personalVLA=false, packageVLA=false) {
|
|
2231
2229
|
const id = this.uid();
|
|
2232
2230
|
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2231
|
+
// check the personal VLA is passed
|
|
2232
|
+
if (!personalVLA?.id) {
|
|
2233
|
+
const personalVLA_str = `license_check:personalVLA:${id.uid}`;
|
|
2234
|
+
this.action('return', personalVLA_str); // set the action to return
|
|
2235
|
+
this.state('invalid', personalVLA_str); // set the state to invalid
|
|
2236
|
+
this.intent('bad', personalVLA_str); // set the intent to bad
|
|
2237
|
+
return this._messages.personalVLA; // return the invalid personal VLA message
|
|
2236
2238
|
};
|
|
2237
|
-
this.state('license', `check:personalVLA:${personalVLA.uid}`);
|
|
2238
2239
|
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2240
|
+
// check the package VLA is passed.
|
|
2241
|
+
if (!packageVLA?.id) {
|
|
2242
|
+
const packageVLA_str = `license_check:packageVLA:${id.uid}`;
|
|
2243
|
+
this.action('return', packageVLA_str); // set the action to return
|
|
2244
|
+
this.state('invalid', packageVLA_str); // set the state to invalid
|
|
2245
|
+
this.intent('bad', packageVLA_str); // set the intent to bad
|
|
2246
|
+
return this._messages.packageVLA; // return the invalid package VLA message
|
|
2242
2247
|
}
|
|
2243
|
-
|
|
2244
|
-
|
|
2248
|
+
|
|
2245
2249
|
// this is to ensure no additional information is being transmitted.
|
|
2246
|
-
this.state('
|
|
2247
|
-
const personalVLA_hash = this.hash(personalVLA, 'sha256');
|
|
2248
|
-
const packageVLA_hash = this.hash(packageVLA, 'sha256');
|
|
2249
|
-
|
|
2250
|
-
if (personalVLA_hash !== packageVLA_hash) return false;
|
|
2250
|
+
this.state('check', `license_check:compare:${packageVLA.uid}`);
|
|
2251
|
+
const personalVLA_hash = this.hash(personalVLA, 'sha256'); // hash the entire personal VLA locally
|
|
2252
|
+
const packageVLA_hash = this.hash(packageVLA, 'sha256'); // hash the entire package VLA locally
|
|
2253
|
+
if (personalVLA_hash !== packageVLA_hash) return this._messages.checkVLA; // if invalid return the invalid message
|
|
2251
2254
|
|
|
2255
|
+
this.state('approved', `license_check:${packageVLA.uid}`);
|
|
2252
2256
|
const approved = {
|
|
2253
|
-
id
|
|
2257
|
+
id,
|
|
2254
2258
|
time: Date.now(),
|
|
2255
2259
|
personal: personalVLA_hash,
|
|
2256
2260
|
package: packageVLA_hash,
|
|
2257
2261
|
};
|
|
2258
2262
|
|
|
2259
|
-
this.
|
|
2260
|
-
this.
|
|
2263
|
+
this.action('return', `license_check:${packageVLA.uid}`); // set action to return
|
|
2264
|
+
this.state('valid', `license_check:${packageVLA.uid}`); // set the state to valid
|
|
2265
|
+
this.intent('good', `license_check:${packageVLA.uid}`); // set the intent to good
|
|
2261
2266
|
return this._stamp(approved, 'license_check', packageVLA.uid);
|
|
2262
2267
|
}
|
|
2263
2268
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "23221940810208468106",
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.62.
|
|
4
|
+
"version": "1.62.77",
|
|
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",
|