@indra.ai/deva 1.6.10 → 1.6.12
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/LICENSE.md +12 -10
- package/examples/agent.json +1 -1
- package/examples/client.json +1 -1
- package/examples/hello-world.js +1 -1
- package/index.js +2 -3
- package/lib/index.js +30 -16
- package/package.json +12 -2
- package/tests/agent.json +1 -1
- package/tests/client.json +1 -1
- package/tests/index.js +1 -1
package/LICENSE.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Vedic License Agreement
|
|
2
2
|
|
|
3
3
|
**Version:** 1.4.1
|
|
4
|
-
**VLA:**
|
|
4
|
+
**VLA:** 57198275347569343690
|
|
5
5
|
**Effective:** Sunday - September 8, 2025
|
|
6
6
|
**Owner:** Quinn A Michaels
|
|
7
7
|
**Company:** Inside The Net, Inc.
|
|
8
8
|
**Email:** quinn@indra.ai
|
|
9
9
|
**Link:** https://indra.ai
|
|
10
|
-
**Copyright:** ©2025 Quinn A Michaels Inside The Net, Inc.; All rights reserved.
|
|
10
|
+
**Copyright:** ©2025 Quinn A Michaels, Inside The Net, Inc.; All rights reserved.
|
|
11
11
|
|
|
12
12
|
This license agreement (“Agreement”) governs the use of the Deva Core (“Software”). By accessing or using the Software, you agree to the terms and conditions set forth below. If you do not agree, you are prohibited from using the Software.
|
|
13
13
|
|
|
@@ -161,11 +161,13 @@ By using the Software, you acknowledge that you have read, understood, and agree
|
|
|
161
161
|
|
|
162
162
|
---
|
|
163
163
|
|
|
164
|
-
::begin:uid:deva:
|
|
165
|
-
uid:
|
|
166
|
-
time:
|
|
167
|
-
date:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
164
|
+
::begin:uid:deva:57198275347569343690
|
|
165
|
+
uid: 57198275347569343690
|
|
166
|
+
time: 1757433116479
|
|
167
|
+
date: Tuesday, September 9, 2025 - 8:51:56 AM
|
|
168
|
+
agent: qo2rVirMORHRQuTmwccZkT3A3ju0zP3OHQNBmM8+sr8=
|
|
169
|
+
machine: p9PvrhyZFNJQBE4ixNeWPV8bX1jRvpbHj3SAso6RYh0=
|
|
170
|
+
md5: T2HhhTQFTA0IAt6hHRWhvw==
|
|
171
|
+
sha256: hXhV9DywwMEcMoSAciYnMZirITw1qwWsV+BQvpKrQPM=
|
|
172
|
+
sha512: z11hMv07vDXEdDFLrvxr6vHcGroxDqGsskkhzKxfrNUJODDR4ar09NcZsuZumKYgA/VBF1fE47/yJ+kQ3sLu1A==
|
|
173
|
+
::end:uid:deva:57198275347569343690
|
package/examples/agent.json
CHANGED
package/examples/client.json
CHANGED
package/examples/hello-world.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// ©2025 Quinn A Michaels; All rights reserved.
|
|
3
3
|
// Legal Signature Required For Lawful Use.
|
|
4
|
-
// Distributed under VLA:
|
|
4
|
+
// Distributed under VLA:57198275347569343690 LICENSE.md
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
const client = require('./client.json').DATA;
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// ©2025 Quinn A Michaels; All rights reserved.
|
|
3
3
|
// Legal Signature Required For Lawful Use.
|
|
4
|
-
// Distributed under VLA:
|
|
4
|
+
// Distributed under VLA:57198275347569343690 LICENSE.md
|
|
5
5
|
|
|
6
6
|
import {EventEmitter} from 'node:events';
|
|
7
7
|
import {randomUUID} from 'crypto';
|
|
@@ -43,7 +43,7 @@ class Deva {
|
|
|
43
43
|
this._systems = false; // inherited Systems features.
|
|
44
44
|
this._networks = false; // inherited Systems features.
|
|
45
45
|
this.events = opts.events || new EventEmitter({}); // Event Bus
|
|
46
|
-
this.lib = new lib({config}); // used for loading library functions
|
|
46
|
+
this.lib = new lib({config, agent:opts.agent}); // used for loading library functions
|
|
47
47
|
this.utils = opts.utils || {}; // parse function
|
|
48
48
|
this.devas = opts.devas || {}; // Devas which are loaded
|
|
49
49
|
this.vars = opts.vars || {}; // Variables object
|
|
@@ -911,7 +911,6 @@ class Deva {
|
|
|
911
911
|
// set client
|
|
912
912
|
this._active = Date.now();
|
|
913
913
|
const agent = this.agent();
|
|
914
|
-
|
|
915
914
|
const data = {
|
|
916
915
|
id: this.lib.uid(),
|
|
917
916
|
key: 'init',
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// ©2025 Quinn A Michaels; All rights reserved.
|
|
3
3
|
// Legal Signature Required For Lawful Use.
|
|
4
|
-
// Distributed under VLA:
|
|
4
|
+
// Distributed under VLA:57198275347569343690 LICENSE.md
|
|
5
5
|
|
|
6
6
|
import path from 'path';
|
|
7
7
|
import fs from 'fs';
|
|
@@ -18,6 +18,7 @@ class Node {
|
|
|
18
18
|
class LIB {
|
|
19
19
|
constructor(opts) {
|
|
20
20
|
this.config = opts.config || {};
|
|
21
|
+
this.agent = opts.agent || {};
|
|
21
22
|
this.lang = opts.lang || 'en';
|
|
22
23
|
this.locale = opts.locale || 'en-US';
|
|
23
24
|
this.currency = opts.currency || 'USD';
|
|
@@ -27,7 +28,7 @@ class LIB {
|
|
|
27
28
|
this.exec = exec;
|
|
28
29
|
this.spawn = spawn;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
+
|
|
31
32
|
help(msg, help_dir) {
|
|
32
33
|
return new Promise((resolve, reject) => {
|
|
33
34
|
const params = msg.split(' ');
|
|
@@ -58,15 +59,30 @@ class LIB {
|
|
|
58
59
|
copyright: 2025 Quinn A Michaels. All rights reserved.
|
|
59
60
|
***************/
|
|
60
61
|
uid(guid=false) {
|
|
61
|
-
const time = Date.now();
|
|
62
|
+
const time = Date.now(); // set time to local constant
|
|
63
|
+
const date = this.formatDate(time, 'long', true); // set date to local constant
|
|
64
|
+
const agent_hash = this.hash(this.agent, 'sha256');
|
|
65
|
+
const machine = {
|
|
66
|
+
arch: os.arch(),
|
|
67
|
+
hostname: os.hostname(),
|
|
68
|
+
network: os.networkInterfaces(),
|
|
69
|
+
platform: os.platform(),
|
|
70
|
+
release: os.release(),
|
|
71
|
+
type: os.type(),
|
|
72
|
+
user: os.userInfo(),
|
|
73
|
+
version: os.version(),
|
|
74
|
+
};
|
|
75
|
+
const machine_hash = this.hash(machine, 'sha256');
|
|
76
|
+
const data = {
|
|
77
|
+
uid: false,
|
|
78
|
+
time,
|
|
79
|
+
date,
|
|
80
|
+
agent: agent_hash,
|
|
81
|
+
machine: machine_hash,
|
|
82
|
+
}
|
|
62
83
|
if (guid) {
|
|
63
84
|
const uid = randomUUID(); // set uid into local constant.
|
|
64
|
-
|
|
65
|
-
const data = {uid,created}; // set base data object.
|
|
66
|
-
data.md5 = this.hash(data, 'md5'); // md5 the uid and created.
|
|
67
|
-
data.sha256 = this.hash(data, 'sha256'); // sha256 the uid, created, md5
|
|
68
|
-
data.sha512 = this.hash(data, 'sha512'); // sha512 the uid, created, md5, sha256.
|
|
69
|
-
return data; // return the data.
|
|
85
|
+
data.uid = uid; // set base data object.
|
|
70
86
|
}
|
|
71
87
|
else {
|
|
72
88
|
const min = Math.floor(time - (time / Math.PI)); // generate min time from Math.PI divisor.
|
|
@@ -76,14 +92,12 @@ class LIB {
|
|
|
76
92
|
const end_random = Math.ceil(Math.random() * (end_max - end_min) + end_min); // generate the 5 digit end salt on the number for added randomness.
|
|
77
93
|
|
|
78
94
|
const uid = `${begin_random}${end_random}`; // set uid to local constant
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const data = {uid,created}; // set base data object.
|
|
82
|
-
data.md5 = this.hash(data, 'md5'); // md5 the uid and created.
|
|
83
|
-
data.sha256 = this.hash(data, 'sha256'); // sha256 the uid, created, md5
|
|
84
|
-
data.sha512 = this.hash(data, 'sha512'); // sha512 the uid, created, md5, sha256.
|
|
85
|
-
return data; // return the complete uid data.
|
|
95
|
+
data.uid = uid; // set base data object.
|
|
86
96
|
}
|
|
97
|
+
data.md5 = this.hash(data, 'md5'); // md5 the uid and created.
|
|
98
|
+
data.sha256 = this.hash(data, 'sha256'); // sha256 the uid, created, md5
|
|
99
|
+
data.sha512 = this.hash(data, 'sha512'); // sha512 the uid, created, md5, sha256.
|
|
100
|
+
return data; // return the complete uid data.
|
|
87
101
|
}
|
|
88
102
|
|
|
89
103
|
/**************
|
package/package.json
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "55286864875635314522",
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.12",
|
|
5
5
|
"description": "The Deva Core",
|
|
6
6
|
"main": "index.js",
|
|
7
|
-
"license": "VLA:
|
|
7
|
+
"license": "VLA:57198275347569343690 LICENSE.md",
|
|
8
|
+
"VLA": {
|
|
9
|
+
"uid": 57198275347569345000,
|
|
10
|
+
"time": 1757433116479,
|
|
11
|
+
"date": "Tuesday, September 9, 2025 - 8:51:56 AM",
|
|
12
|
+
"agent": "qo2rVirMORHRQuTmwccZkT3A3ju0zP3OHQNBmM8+sr8=",
|
|
13
|
+
"machine": "p9PvrhyZFNJQBE4ixNeWPV8bX1jRvpbHj3SAso6RYh0=",
|
|
14
|
+
"md5": "T2HhhTQFTA0IAt6hHRWhvw==",
|
|
15
|
+
"sha256": "hXhV9DywwMEcMoSAciYnMZirITw1qwWsV+BQvpKrQPM=",
|
|
16
|
+
"sha512": "z11hMv07vDXEdDFLrvxr6vHcGroxDqGsskkhzKxfrNUJODDR4ar09 NcZsuZumKYgA/VBF1fE47/yJ+kQ3sLu1A=="
|
|
17
|
+
},
|
|
8
18
|
"author": {
|
|
9
19
|
"name": "Quinn A Michaels",
|
|
10
20
|
"email": "quinn@indra.ai",
|
package/tests/agent.json
CHANGED
package/tests/client.json
CHANGED
package/tests/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// ©2025 Quinn A Michaels; All rights reserved.
|
|
3
3
|
// Legal Signature Required For Lawful Use.
|
|
4
|
-
// Distributed under VLA:
|
|
4
|
+
// Distributed under VLA:57198275347569343690 LICENSE.md
|
|
5
5
|
|
|
6
6
|
import Client from './client.json' with {type:'json'};
|
|
7
7
|
const client = Client.DATA;
|