@indra.ai/deva 1.5.51 → 1.5.53
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 +60 -12
- package/package.json +36 -24
- package/tests/client.json +10 -0
- package/tests/index.js +11 -9
package/index.js
CHANGED
|
@@ -18,6 +18,7 @@ class Deva {
|
|
|
18
18
|
this._client = {}; // this will be set on init.
|
|
19
19
|
this._active = false; // the active/birth date.
|
|
20
20
|
this._vector = false; // inherited Vector features.
|
|
21
|
+
this._treasury = false; // inherited Vector features.
|
|
21
22
|
this._security = false; // inherited Security features.
|
|
22
23
|
this._guard = false; // inherited Guard features.
|
|
23
24
|
this._defense = false; // inherited Security features.
|
|
@@ -296,7 +297,18 @@ class Deva {
|
|
|
296
297
|
|
|
297
298
|
/**************
|
|
298
299
|
func: Vector
|
|
299
|
-
params:
|
|
300
|
+
params: resolve, reject
|
|
301
|
+
describe:
|
|
302
|
+
The Veda feature sets the correct variables and necessary rules for the
|
|
303
|
+
client presented data.
|
|
304
|
+
***************/
|
|
305
|
+
Veda(resolve, reject) {
|
|
306
|
+
return this.Feature('veda', resolve, reject);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**************
|
|
310
|
+
func: Vector
|
|
311
|
+
params: resolve, reject
|
|
300
312
|
describe:
|
|
301
313
|
The Vector feature sets the correct variables and necessary rules for the
|
|
302
314
|
client presented data.
|
|
@@ -305,9 +317,20 @@ class Deva {
|
|
|
305
317
|
return this.Feature('vector', resolve, reject);
|
|
306
318
|
}
|
|
307
319
|
|
|
320
|
+
/**************
|
|
321
|
+
func: Treasury
|
|
322
|
+
params: resolve, reject
|
|
323
|
+
describe:
|
|
324
|
+
The Treasury feature sets the correct variables and necessary rules for the
|
|
325
|
+
client presented data.
|
|
326
|
+
***************/
|
|
327
|
+
Treasury(resolve, reject) {
|
|
328
|
+
return this.Feature('treasury', resolve, reject);
|
|
329
|
+
}
|
|
330
|
+
|
|
308
331
|
/**************
|
|
309
332
|
func: Security
|
|
310
|
-
params:
|
|
333
|
+
params: resolve, reject
|
|
311
334
|
describe:
|
|
312
335
|
The Security feature sets the correct variables and necessary rules for the
|
|
313
336
|
client presented data.
|
|
@@ -318,7 +341,7 @@ class Deva {
|
|
|
318
341
|
|
|
319
342
|
/**************
|
|
320
343
|
func: Guard
|
|
321
|
-
params:
|
|
344
|
+
params: resolve, reject
|
|
322
345
|
describe:
|
|
323
346
|
The Guard feature sets the correct variables and necessary rules for the
|
|
324
347
|
client presented data.
|
|
@@ -329,7 +352,7 @@ class Deva {
|
|
|
329
352
|
|
|
330
353
|
/**************
|
|
331
354
|
func: Defense
|
|
332
|
-
params:
|
|
355
|
+
params: resolve, reject
|
|
333
356
|
describe:
|
|
334
357
|
The Defense feature sets the correct variables and necessary rules for the
|
|
335
358
|
client presented data.
|
|
@@ -340,7 +363,7 @@ class Deva {
|
|
|
340
363
|
|
|
341
364
|
/**************
|
|
342
365
|
func: Wall
|
|
343
|
-
params:
|
|
366
|
+
params: resolve, reject
|
|
344
367
|
describe:
|
|
345
368
|
The Defense feature sets the correct variables and necessary rules for the
|
|
346
369
|
client presented data.
|
|
@@ -351,7 +374,7 @@ class Deva {
|
|
|
351
374
|
|
|
352
375
|
/**************
|
|
353
376
|
func: Shield
|
|
354
|
-
params:
|
|
377
|
+
params: resolve, reject
|
|
355
378
|
describe:
|
|
356
379
|
The Shield feature sets the correct variables and necessary rules for the
|
|
357
380
|
client presented data.
|
|
@@ -362,7 +385,7 @@ class Deva {
|
|
|
362
385
|
|
|
363
386
|
/**************
|
|
364
387
|
func: Proxy
|
|
365
|
-
params:
|
|
388
|
+
params: resolve, reject
|
|
366
389
|
describe:
|
|
367
390
|
The Defense feature sets the correct variables and necessary rules for the
|
|
368
391
|
client presented data.
|
|
@@ -373,7 +396,7 @@ class Deva {
|
|
|
373
396
|
|
|
374
397
|
/**************
|
|
375
398
|
func: Legal
|
|
376
|
-
params:
|
|
399
|
+
params: resolve, reject
|
|
377
400
|
describe:
|
|
378
401
|
The Legal feature sets the correct variables and necessary rules for the
|
|
379
402
|
client presented data.
|
|
@@ -384,7 +407,7 @@ class Deva {
|
|
|
384
407
|
|
|
385
408
|
/**************
|
|
386
409
|
func: Justice
|
|
387
|
-
params:
|
|
410
|
+
params: resolve, reject
|
|
388
411
|
describe:
|
|
389
412
|
The Justice feature sets the correct variables and necessary rules for the
|
|
390
413
|
client presented data.
|
|
@@ -395,7 +418,7 @@ class Deva {
|
|
|
395
418
|
|
|
396
419
|
/**************
|
|
397
420
|
func: Authority
|
|
398
|
-
params:
|
|
421
|
+
params: resolve, reject
|
|
399
422
|
describe:
|
|
400
423
|
The Authority feature sets the correct variables and necessary rules for the
|
|
401
424
|
client presented data.
|
|
@@ -406,7 +429,7 @@ class Deva {
|
|
|
406
429
|
|
|
407
430
|
/**************
|
|
408
431
|
func: Support
|
|
409
|
-
params:
|
|
432
|
+
params: resolve, reject
|
|
410
433
|
describe:
|
|
411
434
|
The Support feature sets the correct variables and necessary rules for the
|
|
412
435
|
client presented data.
|
|
@@ -417,7 +440,7 @@ class Deva {
|
|
|
417
440
|
|
|
418
441
|
/**************
|
|
419
442
|
func: Services
|
|
420
|
-
params:
|
|
443
|
+
params: resolve, reject
|
|
421
444
|
describe:
|
|
422
445
|
The Services feature sets the correct variables and necessary rules for the
|
|
423
446
|
client presented data.
|
|
@@ -812,8 +835,12 @@ class Deva {
|
|
|
812
835
|
this.action('init');
|
|
813
836
|
this.state('init');
|
|
814
837
|
return this.Client(client, resolve, reject);
|
|
838
|
+
}).then(() => {
|
|
839
|
+
return this.Veda(resolve, reject);
|
|
815
840
|
}).then(() => {
|
|
816
841
|
return this.Vector(resolve, reject);
|
|
842
|
+
}).then(() => {
|
|
843
|
+
return this.Treasury(resolve, reject);
|
|
817
844
|
}).then(() => {
|
|
818
845
|
return this.Security(resolve, reject);
|
|
819
846
|
}).then(() => {
|
|
@@ -1115,6 +1142,7 @@ class Deva {
|
|
|
1115
1142
|
this._active = false;
|
|
1116
1143
|
this._client = false;
|
|
1117
1144
|
this._vector = false;
|
|
1145
|
+
this._treasury = false;
|
|
1118
1146
|
this._security = false;
|
|
1119
1147
|
this._guard = false;
|
|
1120
1148
|
this._defense = false;
|
|
@@ -1477,6 +1505,16 @@ class Deva {
|
|
|
1477
1505
|
}
|
|
1478
1506
|
|
|
1479
1507
|
// FEATURE FUNCTIONS
|
|
1508
|
+
/**************
|
|
1509
|
+
func: veda
|
|
1510
|
+
params: none
|
|
1511
|
+
describe: basic veda features available in a Deva.
|
|
1512
|
+
usage: this.veda()
|
|
1513
|
+
***************/
|
|
1514
|
+
veda() {
|
|
1515
|
+
return this._getFeature('veda', this._vector);
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1480
1518
|
/**************
|
|
1481
1519
|
func: vector
|
|
1482
1520
|
params: none
|
|
@@ -1487,6 +1525,16 @@ class Deva {
|
|
|
1487
1525
|
return this._getFeature('vector', this._vector);
|
|
1488
1526
|
}
|
|
1489
1527
|
|
|
1528
|
+
/**************
|
|
1529
|
+
func: treasury
|
|
1530
|
+
params: none
|
|
1531
|
+
describe: basic treasury features available in a Deva.
|
|
1532
|
+
usage: this.treasury()
|
|
1533
|
+
***************/
|
|
1534
|
+
treasury() {
|
|
1535
|
+
return this._getFeature('treasury', this._treasury);
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1490
1538
|
/**************
|
|
1491
1539
|
func: security
|
|
1492
1540
|
params: none
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"id": "9f0bc743-d720-4320-832e-cf5edc3b7cf",
|
|
2
3
|
"name": "@indra.ai/deva",
|
|
3
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.53",
|
|
4
5
|
"description": "The Deva Core",
|
|
5
6
|
"main": "index.js",
|
|
6
7
|
"copyright": "(c)2025 Quinn Michaels; All rights reserved.",
|
|
@@ -23,8 +24,8 @@
|
|
|
23
24
|
"license": "Unlicense",
|
|
24
25
|
"author": {
|
|
25
26
|
"name": "Quinn Michaels",
|
|
26
|
-
"email": "quinn@
|
|
27
|
-
"url": "https://
|
|
27
|
+
"email": "quinn@indra.ai",
|
|
28
|
+
"url": "https://indra.ai/"
|
|
28
29
|
},
|
|
29
30
|
"funding": [
|
|
30
31
|
{
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
"bugs": {
|
|
40
41
|
"url": "https://github.com/indraai/deva/issues"
|
|
41
42
|
},
|
|
42
|
-
"homepage": "https://
|
|
43
|
+
"homepage": "https://indra.ai",
|
|
43
44
|
"eslintConfig": {
|
|
44
45
|
"parserOptions": {
|
|
45
46
|
"ecmaVersion": 6
|
|
@@ -87,7 +88,7 @@
|
|
|
87
88
|
"load": "🚛 Load",
|
|
88
89
|
"unload": "🛻 Unload",
|
|
89
90
|
"init": "🟠 Init",
|
|
90
|
-
"start": "🟢
|
|
91
|
+
"start": "🟢 Start",
|
|
91
92
|
"enter": "🚪 Enter",
|
|
92
93
|
"done": "🟣 Done",
|
|
93
94
|
"ready": "⭐️ Ready",
|
|
@@ -98,19 +99,22 @@
|
|
|
98
99
|
"deva": "⚡️ Deva",
|
|
99
100
|
"agent": "🤖 Agent",
|
|
100
101
|
"client": "👨 Client",
|
|
102
|
+
"veda": "🕉️ Veda",
|
|
101
103
|
"vector": "🛤️ Vector",
|
|
102
|
-
"
|
|
104
|
+
"treasury": "🏦️ Treasury",
|
|
105
|
+
"security": "🚨 Security",
|
|
103
106
|
"guard": "💂 Guard",
|
|
104
107
|
"wall": "🧱 Wall",
|
|
108
|
+
"shield": "🛡️ Shield",
|
|
105
109
|
"defense": "🪖 Defense",
|
|
106
|
-
"proxy": "
|
|
110
|
+
"proxy": "👾️ Proxy",
|
|
107
111
|
"legal": "🏛️ Legal",
|
|
108
112
|
"authority": "🚔 Authority",
|
|
109
113
|
"justice": "⚖️ Justice",
|
|
110
|
-
"support": "
|
|
111
|
-
"services": "
|
|
112
|
-
"systems": "
|
|
113
|
-
"networks": "
|
|
114
|
+
"support": "💼 Support",
|
|
115
|
+
"services": "🛠️ Services",
|
|
116
|
+
"systems": "🖥️️ Systems",
|
|
117
|
+
"networks": "📡 Networks",
|
|
114
118
|
"help": "💚 Help",
|
|
115
119
|
"error": "❌ Error!"
|
|
116
120
|
},
|
|
@@ -135,7 +139,7 @@
|
|
|
135
139
|
"send": "📬 Send",
|
|
136
140
|
"receive": "📪 Receive",
|
|
137
141
|
"init": "🟠 Init",
|
|
138
|
-
"start": "🟢
|
|
142
|
+
"start": "🟢 Start",
|
|
139
143
|
"enter": "🚪 Enter",
|
|
140
144
|
"done": "🟣 Done",
|
|
141
145
|
"ready": "⭐️ Ready",
|
|
@@ -196,16 +200,22 @@
|
|
|
196
200
|
"actions": {
|
|
197
201
|
"client": "👨 Client",
|
|
198
202
|
"agent": "🕵️♂️ Agent",
|
|
199
|
-
"
|
|
203
|
+
"veda": "🕉️ Veda",
|
|
204
|
+
"vector": "👽 Vector",
|
|
205
|
+
"security": "🚨 Security",
|
|
200
206
|
"guard": "💂 Guard",
|
|
207
|
+
"shield": "🛡️ Shield",
|
|
208
|
+
"wall": "🧱 Wall",
|
|
209
|
+
"proxy": "👾️ Proxy",
|
|
201
210
|
"defense": "🪖 Defense",
|
|
202
|
-
"support": "
|
|
211
|
+
"support": "💼 Support",
|
|
203
212
|
"services": "🛠️ Services",
|
|
204
213
|
"systems": "🖥️ Systems",
|
|
205
214
|
"networks": "📡 Networks",
|
|
206
|
-
"legal": "
|
|
207
|
-
"justice": "
|
|
208
|
-
"authority": "
|
|
215
|
+
"legal": "🏛️ Legal",
|
|
216
|
+
"justice": "⚖️ Justice",
|
|
217
|
+
"authority": "🚔 Authority",
|
|
218
|
+
"treasury": "🏦 Treasury",
|
|
209
219
|
"talk": "📢 Talk",
|
|
210
220
|
"listen": "👂 Listen",
|
|
211
221
|
"once": "👂 Once",
|
|
@@ -214,7 +224,7 @@
|
|
|
214
224
|
"answer": "💡 Answer",
|
|
215
225
|
"ask": "📣 Ask",
|
|
216
226
|
"init": "🟠 Init",
|
|
217
|
-
"start": "🟢
|
|
227
|
+
"start": "🟢 Start",
|
|
218
228
|
"enter": "🚪 Enter",
|
|
219
229
|
"finish": "🏁 Finish",
|
|
220
230
|
"stop": "🔴 Stop",
|
|
@@ -242,20 +252,22 @@
|
|
|
242
252
|
"init": "🟠 Init",
|
|
243
253
|
"agent": "🦾 Agent",
|
|
244
254
|
"client": "💪 Client",
|
|
255
|
+
"veda": "🕉️ Veda",
|
|
245
256
|
"vector": "🛤️ Vector",
|
|
246
|
-
"
|
|
257
|
+
"treasury": "🏦 Treasury",
|
|
258
|
+
"security": "🚨 Security",
|
|
247
259
|
"guard": "💂 Guard",
|
|
248
260
|
"defense": "🪖️️ Defense",
|
|
249
261
|
"wall": "🧱 Wall",
|
|
250
262
|
"shield": "🛡️ Shield",
|
|
251
|
-
"proxy": "
|
|
252
|
-
"legal": "
|
|
253
|
-
"authority": "
|
|
254
|
-
"justice": "
|
|
263
|
+
"proxy": "👾️ Proxy",
|
|
264
|
+
"legal": "🏛️ Legal",
|
|
265
|
+
"authority": "🚔 Authority",
|
|
266
|
+
"justice": "⚖️ Justice",
|
|
255
267
|
"support": "💼 Support",
|
|
256
268
|
"services": "🛠️ Services",
|
|
257
269
|
"systems": "🖥️️ Systems",
|
|
258
|
-
"networks": "
|
|
270
|
+
"networks": "📡 Networks"
|
|
259
271
|
},
|
|
260
272
|
"message": "offline",
|
|
261
273
|
"messages": {
|
package/tests/client.json
CHANGED
|
@@ -34,11 +34,21 @@
|
|
|
34
34
|
"currency": "USD"
|
|
35
35
|
},
|
|
36
36
|
"features": {
|
|
37
|
+
"veda": {
|
|
38
|
+
"concerns": [],
|
|
39
|
+
"global": [],
|
|
40
|
+
"devas": {}
|
|
41
|
+
},
|
|
37
42
|
"vector": {
|
|
38
43
|
"concerns": [],
|
|
39
44
|
"global": [],
|
|
40
45
|
"devas": {}
|
|
41
46
|
},
|
|
47
|
+
"treasury": {
|
|
48
|
+
"concerns": [],
|
|
49
|
+
"global": [],
|
|
50
|
+
"devas": {}
|
|
51
|
+
},
|
|
42
52
|
"security": {
|
|
43
53
|
"hash": "md5",
|
|
44
54
|
"cipher": {
|
package/tests/index.js
CHANGED
|
@@ -8,23 +8,25 @@ import Agent from './agent.json' with {type:'json'};
|
|
|
8
8
|
const agent = Agent.DATA;
|
|
9
9
|
|
|
10
10
|
import Deva from '../index.js';
|
|
11
|
+
import pkg from '../package.json' with {type:'json'};
|
|
11
12
|
|
|
12
13
|
import {dirname} from 'node:path';
|
|
13
14
|
import {fileURLToPath} from 'node:url';
|
|
14
15
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
15
16
|
|
|
16
17
|
const info = {
|
|
17
|
-
id:
|
|
18
|
-
name:
|
|
19
|
-
describe:
|
|
20
|
-
version:
|
|
18
|
+
id: pkg.id,
|
|
19
|
+
name: pkg.name,
|
|
20
|
+
describe: pkg.description,
|
|
21
|
+
version: pkg.version,
|
|
22
|
+
author: pkg.author.name,
|
|
23
|
+
email: pkg.author.email,
|
|
24
|
+
url: pkg.authorurl,
|
|
25
|
+
copyright: pkg.copyright,
|
|
21
26
|
dir: __dirname,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
bugs: 'git+https://github.com/indraai/deva.git#bugs',
|
|
25
|
-
author: 'Quinn Michaels',
|
|
27
|
+
git: pkg.repository.url,
|
|
28
|
+
bugs: pkg.bugs.url,
|
|
26
29
|
license: 'TESTING ONLY',
|
|
27
|
-
copyright: 2025,
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
const DevaTest = new Deva({
|