@indra.ai/deva 1.5.44 โ 1.5.45
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/lib/index.js +7 -5
- package/package.json +2 -2
- package/tests/client.json +35 -15
- package/tests/index.js +3 -6
package/lib/index.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import fs from 'fs';
|
|
6
6
|
import os from 'os';
|
|
7
|
+
import {exec, spawn} from 'node:child_process';
|
|
7
8
|
|
|
8
9
|
import { createHash, randomUUID, createCipheriv, createDecipheriv, randomBytes } from 'crypto';
|
|
9
10
|
|
|
@@ -20,7 +21,8 @@ class LIB {
|
|
|
20
21
|
this.os = os;
|
|
21
22
|
this.fs = fs;
|
|
22
23
|
this.path = path;
|
|
23
|
-
|
|
24
|
+
this.exec = exec;
|
|
25
|
+
this.spawn = spawn;
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
help(msg, help_dir) {
|
|
@@ -232,9 +234,9 @@ class LIB {
|
|
|
232
234
|
func: trimWords
|
|
233
235
|
params:
|
|
234
236
|
- text: The text to trim.
|
|
235
|
-
-
|
|
237
|
+
- max words: The number of words to max.
|
|
236
238
|
describe:
|
|
237
|
-
A utility function to trimText
|
|
239
|
+
A utility function to trimText input to a specific word count.
|
|
238
240
|
***************/
|
|
239
241
|
trimWords(text, maxwords) {
|
|
240
242
|
const splitter = text.split(' ');
|
|
@@ -245,7 +247,7 @@ class LIB {
|
|
|
245
247
|
/**************
|
|
246
248
|
func: dupes
|
|
247
249
|
params: dupers
|
|
248
|
-
describe: remove
|
|
250
|
+
describe: remove duplicates from an array.
|
|
249
251
|
***************/
|
|
250
252
|
dupes(dupers) {
|
|
251
253
|
if (!Array.isArray(dupers)) return dupers;
|
|
@@ -256,6 +258,6 @@ class LIB {
|
|
|
256
258
|
return dupe;
|
|
257
259
|
}
|
|
258
260
|
});
|
|
259
|
-
}
|
|
261
|
+
}
|
|
260
262
|
};
|
|
261
263
|
export default LIB
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indra.ai/deva",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.45",
|
|
4
4
|
"description": "The Deva Core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"copyright": "(c)2025 Quinn Michaels; All rights reserved.",
|
|
@@ -236,9 +236,9 @@
|
|
|
236
236
|
},
|
|
237
237
|
"feature": false,
|
|
238
238
|
"features": {
|
|
239
|
+
"init": "๐ Init",
|
|
239
240
|
"agent": "๐ฆพ Agent",
|
|
240
241
|
"client": "๐ช Client",
|
|
241
|
-
"init": "๐ Init",
|
|
242
242
|
"vector": "๐ค๏ธ Vector",
|
|
243
243
|
"security": "๐ Security",
|
|
244
244
|
"guard": "๐ Guard",
|
package/tests/client.json
CHANGED
|
@@ -34,6 +34,11 @@
|
|
|
34
34
|
"currency": "USD"
|
|
35
35
|
},
|
|
36
36
|
"features": {
|
|
37
|
+
"vector": {
|
|
38
|
+
"concerns": [],
|
|
39
|
+
"global": [],
|
|
40
|
+
"devas": {}
|
|
41
|
+
},
|
|
37
42
|
"security": {
|
|
38
43
|
"hash": "md5",
|
|
39
44
|
"cipher": {
|
|
@@ -50,29 +55,22 @@
|
|
|
50
55
|
"global": [],
|
|
51
56
|
"devas": {}
|
|
52
57
|
},
|
|
53
|
-
"
|
|
58
|
+
"defense": {
|
|
54
59
|
"concerns": [],
|
|
55
60
|
"global": [],
|
|
56
61
|
"devas": {}
|
|
57
62
|
},
|
|
58
|
-
"
|
|
63
|
+
"wall": {
|
|
59
64
|
"concerns": [],
|
|
60
|
-
"global": [
|
|
61
|
-
|
|
62
|
-
{"world": "https://deva.world"},
|
|
63
|
-
{"space": "https://deva.space"},
|
|
64
|
-
{"cloud": "https://deva.cloud"}
|
|
65
|
-
],
|
|
66
|
-
"devas": {
|
|
67
|
-
"hello": {}
|
|
68
|
-
}
|
|
65
|
+
"global": [],
|
|
66
|
+
"devas": {}
|
|
69
67
|
},
|
|
70
|
-
"
|
|
68
|
+
"shield": {
|
|
71
69
|
"concerns": [],
|
|
72
70
|
"global": [],
|
|
73
71
|
"devas": {}
|
|
74
72
|
},
|
|
75
|
-
"
|
|
73
|
+
"proxy": {
|
|
76
74
|
"concerns": [],
|
|
77
75
|
"global": [],
|
|
78
76
|
"devas": {}
|
|
@@ -82,17 +80,39 @@
|
|
|
82
80
|
"global": [],
|
|
83
81
|
"devas": {}
|
|
84
82
|
},
|
|
83
|
+
"authority": {
|
|
84
|
+
"concerns": [],
|
|
85
|
+
"global": [],
|
|
86
|
+
"devas": {}
|
|
87
|
+
},
|
|
85
88
|
"justice": {
|
|
86
89
|
"concerns": [],
|
|
87
90
|
"global": [],
|
|
88
91
|
"devas": {}
|
|
89
92
|
},
|
|
90
|
-
"
|
|
93
|
+
"support": {
|
|
91
94
|
"concerns": [],
|
|
92
95
|
"global": [],
|
|
93
96
|
"devas": {}
|
|
94
97
|
},
|
|
95
|
-
"
|
|
98
|
+
"services": {
|
|
99
|
+
"concerns": [],
|
|
100
|
+
"global": [
|
|
101
|
+
{"indra": "https://indra.ai"},
|
|
102
|
+
{"world": "https://deva.world"},
|
|
103
|
+
{"space": "https://deva.space"},
|
|
104
|
+
{"cloud": "https://deva.cloud"}
|
|
105
|
+
],
|
|
106
|
+
"devas": {
|
|
107
|
+
"hello": {}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"systems": {
|
|
111
|
+
"concerns": [],
|
|
112
|
+
"global": [],
|
|
113
|
+
"devas": {}
|
|
114
|
+
},
|
|
115
|
+
"networks": {
|
|
96
116
|
"concerns": [],
|
|
97
117
|
"global": [],
|
|
98
118
|
"devas": {}
|
package/tests/index.js
CHANGED
|
@@ -93,18 +93,15 @@ const DevaTest = new Deva({
|
|
|
93
93
|
const info = this.info();
|
|
94
94
|
const date = Date.now();
|
|
95
95
|
const hashstr = `${id}${uid}${date}`;
|
|
96
|
-
const
|
|
96
|
+
const proxy = this.proxy(hashstr);
|
|
97
97
|
const data = [
|
|
98
98
|
'๐งช TEST RESULTS',
|
|
99
99
|
`::BEGIN:CORE:${core.id}`,
|
|
100
100
|
JSON.stringify(core,null,2),
|
|
101
|
-
`::END:CORE:${core.
|
|
101
|
+
`::END:CORE:${core.id}`,
|
|
102
102
|
`::BEGIN:INFO:${info.id}`,
|
|
103
103
|
JSON.stringify(info,null,2),
|
|
104
|
-
`::END:INFO:${info.
|
|
105
|
-
`::BEGIN:SIGNATURE:${signature.id}`,
|
|
106
|
-
JSON.stringify(signature, null, 2),
|
|
107
|
-
`::END:SIGNATURE:${signature.md5}`,
|
|
104
|
+
`::END:INFO:${info.id}`,
|
|
108
105
|
];
|
|
109
106
|
return {
|
|
110
107
|
text: data.join('\n'),
|