@indra.ai/deva 1.16.1 → 1.17.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.
- package/index.js +32 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2365,20 +2365,29 @@ class Deva {
|
|
|
2365
2365
|
const machine_hash = this.machine().sha256; // get the machine hash
|
|
2366
2366
|
|
|
2367
2367
|
const client_hash = this.client().sha256 || false; // get client hash
|
|
2368
|
-
const
|
|
2369
|
-
const
|
|
2370
|
-
const
|
|
2368
|
+
const agent_hash = this.agent().sha256 || false; // get agent hash
|
|
2369
|
+
const warning = this._agent.profile.uid_warning || this._messages.uid_warning; // agent or default warning
|
|
2370
|
+
const copyright = this._agent.profile.copyright || this._core.copyright; // agent or default warning
|
|
2371
2371
|
|
|
2372
|
+
const fingerprint_data = {
|
|
2373
|
+
client_hash,
|
|
2374
|
+
agent_hash,
|
|
2375
|
+
core_hash,
|
|
2376
|
+
machine_hash,
|
|
2377
|
+
};
|
|
2378
|
+
const fingerprint = this.hash(fingerprint_data, 'sha256');
|
|
2379
|
+
|
|
2372
2380
|
const data = {
|
|
2373
2381
|
uid: false,
|
|
2374
2382
|
time,
|
|
2375
2383
|
date,
|
|
2384
|
+
fingerprint,
|
|
2376
2385
|
client: client_hash,
|
|
2377
2386
|
agent: agent_hash,
|
|
2378
2387
|
core: core_hash,
|
|
2379
2388
|
machine: machine_hash,
|
|
2380
2389
|
warning,
|
|
2381
|
-
copyright
|
|
2390
|
+
copyright,
|
|
2382
2391
|
}
|
|
2383
2392
|
if (guid) {
|
|
2384
2393
|
const uid = randomUUID(); // set uid into local constant.
|
|
@@ -2400,7 +2409,15 @@ class Deva {
|
|
|
2400
2409
|
// this.intent('good', `uid:${data.uid}`);
|
|
2401
2410
|
return data; // return the complete uid data.
|
|
2402
2411
|
}
|
|
2403
|
-
|
|
2412
|
+
|
|
2413
|
+
/**************
|
|
2414
|
+
func: sign
|
|
2415
|
+
params:
|
|
2416
|
+
- packet: The packet to sign data to.
|
|
2417
|
+
describe:
|
|
2418
|
+
The sign function can create a digital signature to a packet.
|
|
2419
|
+
copyright: Copyright ©2025 Quinn A Michaels. All rights reserved.
|
|
2420
|
+
***************/
|
|
2404
2421
|
sign(packet) {
|
|
2405
2422
|
const time = Date.now();
|
|
2406
2423
|
const client = this.client();
|
|
@@ -2460,7 +2477,16 @@ class Deva {
|
|
|
2460
2477
|
this.intent('good', `sign:${data.id.uid}`);
|
|
2461
2478
|
return data;
|
|
2462
2479
|
}
|
|
2463
|
-
|
|
2480
|
+
|
|
2481
|
+
/**************
|
|
2482
|
+
func: license_check
|
|
2483
|
+
params:
|
|
2484
|
+
- personalVLA: The Personal VLA to validate.
|
|
2485
|
+
- packageVLA: The Package VLA to validate against
|
|
2486
|
+
describe:
|
|
2487
|
+
The license_check function can checks VLA license validity.
|
|
2488
|
+
copyright: Copyright ©2025 Quinn A Michaels. All rights reserved.
|
|
2489
|
+
***************/
|
|
2464
2490
|
license_check(personalVLA, packageVLA) {
|
|
2465
2491
|
const id = this.uid();
|
|
2466
2492
|
this.state('license', `check:personalVLA:${packageVLA.uid}`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "44091450722329207445",
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.17.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:44091450722329207445 LICENSE.md",
|