@indra.ai/deva 1.62.75 → 1.62.76

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/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 feature",
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": "☑️ 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
@@ -2230,34 +2230,41 @@ class Deva {
2230
2230
  license_check(personalVLA=false, packageVLA=false) {
2231
2231
  const id = this.uid();
2232
2232
 
2233
+ // check the personal VLA is passed
2233
2234
  if (!personalVLA) {
2234
- this.intent('bad', `personalVLA:${id.uid}`);
2235
- return false
2235
+ const personalVLA_str = `license_check:personalVLA:${id.uid}`;
2236
+ this.action('return', personalVLA_str); // set the action to return
2237
+ this.state('invalid', personalVLA_str); // set the state to invalid
2238
+ this.intent('bad', personalVLA_str); // set the intent to bad
2239
+ return this._messages.personalVLA; // return the invalid personal VLA message
2236
2240
  };
2237
- this.state('license', `check:personalVLA:${personalVLA.uid}`);
2238
2241
 
2242
+ // check the package VLA is passed.
2239
2243
  if (!packageVLA) {
2240
- this.intent('bad', `packageVLA:${id.uid}`);
2241
- return false;
2244
+ const packageVLA_str = `license_check:packageVLA:${id.uid}`;
2245
+ this.action('return', packageVLA_str); // set the action to return
2246
+ this.state('invalid', packageVLA_str); // set the state to invalid
2247
+ this.intent('bad', packageVLA_str); // set the intent to bad
2248
+ return this._messages.packageVLA; // return the invalid package VLA message
2242
2249
  }
2243
- this.state('license', `check:packageVLA:${packageVLA.uid}`);
2244
-
2250
+
2245
2251
  // this is to ensure no additional information is being transmitted.
2246
- this.state('license', `compare:sha256:${packageVLA.uid}`);
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;
2252
+ this.state('check', `license_check:compare:${packageVLA.uid}`);
2253
+ const personalVLA_hash = this.hash(personalVLA, 'sha256'); // hash the entire personal VLA locally
2254
+ const packageVLA_hash = this.hash(packageVLA, 'sha256'); // hash the entire package VLA locally
2255
+ if (personalVLA_hash !== packageVLA_hash) return this._messages.checkVLA; // if invalid return the invalid message
2251
2256
 
2257
+ this.state('approved', `license_check:${packageVLA.uid}`);
2252
2258
  const approved = {
2253
- id: this.uid(),
2259
+ id,
2254
2260
  time: Date.now(),
2255
2261
  personal: personalVLA_hash,
2256
2262
  package: packageVLA_hash,
2257
2263
  };
2258
2264
 
2259
- this.state('return', `license:${packageVLA.uid}`);
2260
- this.intent('good', `license:${packageVLA.uid}`);
2265
+ this.action('return', `license_check:${packageVLA.uid}`); // set action to return
2266
+ this.state('valid', `license_check:${packageVLA.uid}`); // set the state to valid
2267
+ this.intent('good', `license_check:${packageVLA.uid}`); // set the intent to good
2261
2268
  return this._stamp(approved, 'license_check', packageVLA.uid);
2262
2269
  }
2263
2270
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "23221940810208468106",
3
3
  "name": "@indra.ai/deva",
4
- "version": "1.62.75",
4
+ "version": "1.62.76",
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",