@indra.ai/deva 1.52.3 → 1.53.1

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/config/msgs.json CHANGED
@@ -15,6 +15,9 @@
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",
20
+ "invalidkey": "⛔️ INVALID KEY PROVIDED",
18
21
  "method_not_found": "⛔️ METHOD NOT FOUND",
19
22
  "help_not_found": "⛔️ HELP NOT FOUND",
20
23
  "invalid_agent": "⛔️ Agent Hash Invalid",
package/index.js CHANGED
@@ -50,7 +50,7 @@ class Deva {
50
50
  this.modules = opts.modules || {}; // 3rd Party Modules
51
51
  this.func = opts.func || {}; // local Functions
52
52
  this.methods = opts.methods || {}; // local Methods
53
- this.maxListeners = opts.maxListenners || 0; // set the local maxListeners
53
+ this.maxListeners = opts.maxListeners || 0; // set the local maxListeners
54
54
  // prevent overwriting existing functions and variables with same name
55
55
  for (const opt in opts) {
56
56
  if (!this[opt] || !this[`_${opt}`]) this[opt] = opts[opt];
@@ -303,8 +303,12 @@ class Deva {
303
303
  usage: this.complete(data, resolve)
304
304
  ***************/
305
305
  _invoke(opts) {
306
- if (!this._active) return resolve(this._messages.offline);
307
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 (!config.invoke[key]) return resolve (this._messages.invalidkey);
310
+ if (!data) return resolve (this._messages.nodata);
311
+
308
312
  const {prev_key, next_key, onfunc, clear, load} = config.invoke[key];
309
313
  this.action('invoke', `${key}:${data.id.uid}`);
310
314
  this.context(key, data.id.uid);
@@ -2403,18 +2407,20 @@ class Deva {
2403
2407
  The license_check function can checks VLA license validity.
2404
2408
  copyright: Copyright ©2000-2026 Quinn Arjuna Michaels. All rights reserved.
2405
2409
  ***************/
2406
- license_check(personalVLA, packageVLA) {
2410
+ license_check(personalVLA=false, packageVLA=false) {
2407
2411
  const id = this.uid();
2408
- this.state('license', `check:personalVLA:${packageVLA.uid}`);
2412
+
2409
2413
  if (!personalVLA) {
2410
2414
  this.intent('bad', `personalVLA:${id.uid}`);
2411
2415
  return false
2412
2416
  };
2413
- this.state('license', `check:packageVLA:${packageVLA.uid}`);
2417
+ this.state('license', `check:personalVLA:${personalVLA.uid}`);
2418
+
2414
2419
  if (!packageVLA) {
2415
2420
  this.intent('bad', `packageVLA:${id.uid}`);
2416
2421
  return false;
2417
2422
  }
2423
+ this.state('license', `check:packageVLA:${packageVLA.uid}`);
2418
2424
 
2419
2425
  // this is to ensure no additional information is being transmitted.
2420
2426
  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.3",
4
+ "version": "1.53.1",
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",