@indra.ai/deva 1.26.0 → 1.27.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.
Files changed (3) hide show
  1. package/index.js +15 -11
  2. package/package.json +1 -1
  3. package/tests/index.js +1 -0
package/index.js CHANGED
@@ -2438,22 +2438,25 @@ class Deva {
2438
2438
  uid(guid=false) {
2439
2439
  const time = Date.now(); // set time to local constant
2440
2440
  const date = this.lib.formatDate(time, 'long', true); // set date to local constant
2441
- const { profile } = this.agent();
2441
+ const license = this._info.VLA ? this._info.VLA.uid : false;
2442
+ const client = this.client(); // get the client
2443
+ const agent = this.agent(); // get the agent
2444
+ const {profile} = agent;
2445
+ const machine = this.machine(); // get the machine hash
2446
+
2442
2447
  const core_hash = this.hash(this._core, 'sha256');
2443
- const machine_hash = this.machine().sha256; // get the machine hash
2444
2448
 
2445
- const client_hash = this.client().sha256; // get client hash
2446
- const agent_hash = this.agent().sha256; // get agent hash
2447
2449
  const warning = this.vars.warning || this._agent.profile.warning || this._messages.warning; // agent or default warning
2448
2450
  const copyright = this._agent.profile.copyright || this._core.copyright; // agent or default copyright
2449
2451
 
2450
2452
  const status = this._agent.profile.status || this._messages.status;
2451
2453
 
2452
2454
  const fingerprint_data = {
2453
- client_hash,
2454
- agent_hash,
2455
+ license,
2456
+ client: client.sha256,
2457
+ agent: agent.sha256,
2458
+ machine: machine.sha256,
2455
2459
  core_hash,
2456
- machine_hash,
2457
2460
  };
2458
2461
  const fingerprint = this.hash(fingerprint_data, 'sha256');
2459
2462
 
@@ -2461,11 +2464,12 @@ class Deva {
2461
2464
  uid: false,
2462
2465
  time,
2463
2466
  date,
2467
+ license,
2464
2468
  fingerprint,
2465
- client: client_hash,
2466
- agent: agent_hash,
2467
- core: core_hash,
2468
- machine: machine_hash,
2469
+ client: client.sha256,
2470
+ agent: agent.sha256,
2471
+ machine: machine.sha256,
2472
+ core_hash,
2469
2473
  status,
2470
2474
  warning,
2471
2475
  copyright,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "30785853158847668602",
3
3
  "name": "@indra.ai/deva",
4
- "version": "1.26.0",
4
+ "version": "1.27.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:30785853158847668602 LICENSE.md",
package/tests/index.js CHANGED
@@ -27,6 +27,7 @@ const info = {
27
27
  dir: __dirname,
28
28
  git: pkg.repository.url,
29
29
  bugs: pkg.bugs.url,
30
+ VLA: pkg.VLA,
30
31
  license: 'TESTING ONLY',
31
32
  };
32
33