@indra.ai/deva 1.62.74 → 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",
@@ -85,6 +85,7 @@
85
85
  "create": "🎨 Create",
86
86
  "destroy": "💣 Destroy",
87
87
  "save": "📀 Save",
88
+ "delete": "🗑️ Delete",
88
89
  "build": "👷️ Build",
89
90
  "true": "🟢 True",
90
91
  "false": "🔴 False",
@@ -94,6 +95,7 @@
94
95
  "incorrect": "🟥 Incorrect",
95
96
  "clean": "🧼 Clean",
96
97
  "dirty": "🧹 Dirty",
97
- "consent": "✍️ Consent"
98
+ "consent": "✍️ Consent",
99
+ "check": "☑️ Check"
98
100
  }
99
101
  }
package/index.js CHANGED
@@ -471,6 +471,7 @@ class Deva {
471
471
  else {
472
472
  const call_str = `Feature:${feature}:${_id.uid}` // call string for action state intent.
473
473
  this.action('feature', call_str); // set action to feature
474
+ this.state('data', call_str); // set state to data
474
475
  const {id, profile, features} = this.client(); // set the values from the client.
475
476
  const data = features[feature]; // make a copy of the feature data
476
477
 
@@ -2229,34 +2230,41 @@ class Deva {
2229
2230
  license_check(personalVLA=false, packageVLA=false) {
2230
2231
  const id = this.uid();
2231
2232
 
2233
+ // check the personal VLA is passed
2232
2234
  if (!personalVLA) {
2233
- this.intent('bad', `personalVLA:${id.uid}`);
2234
- 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
2235
2240
  };
2236
- this.state('license', `check:personalVLA:${personalVLA.uid}`);
2237
2241
 
2242
+ // check the package VLA is passed.
2238
2243
  if (!packageVLA) {
2239
- this.intent('bad', `packageVLA:${id.uid}`);
2240
- 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
2241
2249
  }
2242
- this.state('license', `check:packageVLA:${packageVLA.uid}`);
2243
-
2250
+
2244
2251
  // this is to ensure no additional information is being transmitted.
2245
- this.state('license', `compare:sha256:${packageVLA.uid}`);
2246
- const personalVLA_hash = this.hash(personalVLA, 'sha256');
2247
- const packageVLA_hash = this.hash(packageVLA, 'sha256');
2248
-
2249
- 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
2250
2256
 
2257
+ this.state('approved', `license_check:${packageVLA.uid}`);
2251
2258
  const approved = {
2252
- id: this.uid(),
2259
+ id,
2253
2260
  time: Date.now(),
2254
2261
  personal: personalVLA_hash,
2255
2262
  package: packageVLA_hash,
2256
2263
  };
2257
2264
 
2258
- this.state('return', `license:${packageVLA.uid}`);
2259
- 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
2260
2268
  return this._stamp(approved, 'license_check', packageVLA.uid);
2261
2269
  }
2262
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.74",
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",