@indra.ai/deva 1.52.2 → 1.53.0

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.
@@ -8,7 +8,6 @@
8
8
  "agent": "🦾 Agent",
9
9
  "client": "💪 Client",
10
10
  "license": "🪪 License",
11
- "identity": "⛄️ Identity",
12
11
  "error": "❌️ Error",
13
12
  "log": "🪵️ Log",
14
13
  "data": "💾️ Data",
package/config/msgs.json CHANGED
@@ -15,6 +15,8 @@
15
15
  "noid": "⛔️ NO ID PROVIDED",
16
16
  "notext": "⛔️ NO TEXT PROVIDED",
17
17
  "nopacket": "⛔️ NO PACKET PROVIDED",
18
+ "nodata": "⛔️ NO DATA PROVIDED",
19
+ "nokey": "⛔️ NO KEY PROVIDED",
18
20
  "method_not_found": "⛔️ METHOD NOT FOUND",
19
21
  "help_not_found": "⛔️ HELP NOT FOUND",
20
22
  "invalid_agent": "⛔️ Agent Hash Invalid",
package/index.js CHANGED
@@ -23,7 +23,6 @@ class Deva {
23
23
  this._client = {}; // this will be set on init.
24
24
  this._active = false; // the active/birth date.
25
25
  this._license = false; // inherited License features.
26
- this._identity = false; // inherited Identity features.
27
26
  this._error = false; // inherited Error features.
28
27
  this._log = false; // inherited Log features.
29
28
  this._data = false; // inherited Data features.
@@ -51,7 +50,7 @@ class Deva {
51
50
  this.modules = opts.modules || {}; // 3rd Party Modules
52
51
  this.func = opts.func || {}; // local Functions
53
52
  this.methods = opts.methods || {}; // local Methods
54
- this.maxListeners = opts.maxListenners || 0; // set the local maxListeners
53
+ this.maxListeners = opts.maxListeners || 0; // set the local maxListeners
55
54
  // prevent overwriting existing functions and variables with same name
56
55
  for (const opt in opts) {
57
56
  if (!this[opt] || !this[`_${opt}`]) this[opt] = opts[opt];
@@ -304,8 +303,11 @@ class Deva {
304
303
  usage: this.complete(data, resolve)
305
304
  ***************/
306
305
  _invoke(opts) {
307
- if (!this._active) return resolve(this._messages.offline);
308
306
  const {key, data, resolve} = opts;
307
+ if (!this._active) return resolve(this._messages.offline);
308
+ if (!key) return resolve (this._messages.nokey);
309
+ if (!data) return resolve (this._messages.nodata);
310
+
309
311
  const {prev_key, next_key, onfunc, clear, load} = config.invoke[key];
310
312
  this.action('invoke', `${key}:${data.id.uid}`);
311
313
  this.context(key, data.id.uid);
@@ -455,17 +457,6 @@ class Deva {
455
457
  return this.Feature('license', resolve, reject);
456
458
  }
457
459
 
458
- /**************
459
- func: Identity
460
- params: resolve, reject
461
- describe:
462
- The Identity feature sets the correct variables and necessary rules for the
463
- client presented data.
464
- ***************/
465
- Identity(resolve, reject) {
466
- return this.Feature('identity', resolve, reject);
467
- }
468
-
469
460
  /**************
470
461
  func: Error
471
462
  params: resolve, reject
@@ -1144,8 +1135,6 @@ class Deva {
1144
1135
  return this.Client(client, resolve, reject);
1145
1136
  }).then(() => {
1146
1137
  return this.License(resolve, reject);
1147
- }).then(() => {
1148
- return this.Identity(resolve, reject);
1149
1138
  }).then(() => {
1150
1139
  return this.Error(resolve, reject);
1151
1140
  }).then(() => {
@@ -1744,16 +1733,6 @@ class Deva {
1744
1733
  return this._getFeature('license', this._license);
1745
1734
  }
1746
1735
 
1747
- /**************
1748
- func: identity
1749
- params: none
1750
- describe: basic identity features available in a Deva.
1751
- usage: this.identity()
1752
- ***************/
1753
- identity() {
1754
- return this._getFeature('identity', this._identity);
1755
- }
1756
-
1757
1736
  /**************
1758
1737
  func: error
1759
1738
  params: none
@@ -2427,18 +2406,20 @@ class Deva {
2427
2406
  The license_check function can checks VLA license validity.
2428
2407
  copyright: Copyright ©2000-2026 Quinn Arjuna Michaels. All rights reserved.
2429
2408
  ***************/
2430
- license_check(personalVLA, packageVLA) {
2409
+ license_check(personalVLA=false, packageVLA=false) {
2431
2410
  const id = this.uid();
2432
- this.state('license', `check:personalVLA:${packageVLA.uid}`);
2411
+
2433
2412
  if (!personalVLA) {
2434
2413
  this.intent('bad', `personalVLA:${id.uid}`);
2435
2414
  return false
2436
2415
  };
2437
- this.state('license', `check:packageVLA:${packageVLA.uid}`);
2416
+ this.state('license', `check:personalVLA:${personalVLA.uid}`);
2417
+
2438
2418
  if (!packageVLA) {
2439
2419
  this.intent('bad', `packageVLA:${id.uid}`);
2440
2420
  return false;
2441
2421
  }
2422
+ this.state('license', `check:packageVLA:${packageVLA.uid}`);
2442
2423
 
2443
2424
  // this is to ensure no additional information is being transmitted.
2444
2425
  this.state('license', `compare:sha256:${packageVLA.uid}`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "23221940810208468106",
3
3
  "name": "@indra.ai/deva",
4
- "version": "1.52.2",
4
+ "version": "1.53.0",
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",