@indra.ai/deva 1.5.43 → 1.5.44
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 +152 -61
- package/package.json +9 -4
package/index.js
CHANGED
|
@@ -17,15 +17,19 @@ class Deva {
|
|
|
17
17
|
this._agent = opts.agent || false; // Agent profile object
|
|
18
18
|
this._client = {}; // this will be set on init.
|
|
19
19
|
this._active = false; // the active/birth date.
|
|
20
|
+
this._vector = false; // inherited Vector features.
|
|
20
21
|
this._security = false; // inherited Security features.
|
|
22
|
+
this._guard = false; // inherited Guard features.
|
|
21
23
|
this._defense = false; // inherited Security features.
|
|
24
|
+
this._wall = false; // inherited Wall features.
|
|
25
|
+
this._proxy = false; // inherited Proxy features.
|
|
26
|
+
this._legal = false; // inherited Legal features.
|
|
27
|
+
this._authority = false; // inherited Justice features.
|
|
28
|
+
this._justice = false; // inherited Justice features.
|
|
22
29
|
this._support = false; // inherited Support features.
|
|
23
30
|
this._services = false; // inherited Service features.
|
|
24
31
|
this._systems = false; // inherited Systems features.
|
|
25
32
|
this._networks = false; // inherited Systems features.
|
|
26
|
-
this._legal = false; // inherited Legal features.
|
|
27
|
-
this._justice = false; // inherited Justice features.
|
|
28
|
-
this._authority = false; // inherited Justice features.
|
|
29
33
|
this.events = opts.events || new EventEmitter({}); // Event Bus
|
|
30
34
|
this.lib = new lib({}); // used for loading library functions
|
|
31
35
|
this.utils = opts.utils || {}; // parse function
|
|
@@ -266,6 +270,7 @@ class Deva {
|
|
|
266
270
|
concerns: data.concerns, // any concerns for client
|
|
267
271
|
global: data.global, // the global policies for client
|
|
268
272
|
personal: data.devas[this._agent.key], // Client personal features and rules.
|
|
273
|
+
created: Date.now(),
|
|
269
274
|
};
|
|
270
275
|
delete this._client.features[feature]; // make a copy the clinet data.
|
|
271
276
|
this.state('resolve', `${feature}:${_id}`);
|
|
@@ -277,6 +282,17 @@ class Deva {
|
|
|
277
282
|
}
|
|
278
283
|
}
|
|
279
284
|
|
|
285
|
+
/**************
|
|
286
|
+
func: Vector
|
|
287
|
+
params: client: false
|
|
288
|
+
describe:
|
|
289
|
+
The Vector feature sets the correct variables and necessary rules for the
|
|
290
|
+
client presented data.
|
|
291
|
+
***************/
|
|
292
|
+
Vector(resolve, reject) {
|
|
293
|
+
return this.Feature('vector', resolve, reject);
|
|
294
|
+
}
|
|
295
|
+
|
|
280
296
|
/**************
|
|
281
297
|
func: Security
|
|
282
298
|
params: client: false
|
|
@@ -311,47 +327,36 @@ class Deva {
|
|
|
311
327
|
}
|
|
312
328
|
|
|
313
329
|
/**************
|
|
314
|
-
func:
|
|
330
|
+
func: Wall
|
|
315
331
|
params: client: false
|
|
316
332
|
describe:
|
|
317
|
-
The
|
|
333
|
+
The Defense feature sets the correct variables and necessary rules for the
|
|
318
334
|
client presented data.
|
|
319
335
|
***************/
|
|
320
|
-
|
|
321
|
-
return this.Feature('
|
|
336
|
+
Wall(resolve, reject) {
|
|
337
|
+
return this.Feature('wall', resolve, reject);
|
|
322
338
|
}
|
|
323
339
|
|
|
324
340
|
/**************
|
|
325
|
-
func:
|
|
341
|
+
func: Shield
|
|
326
342
|
params: client: false
|
|
327
343
|
describe:
|
|
328
|
-
The
|
|
344
|
+
The Shield feature sets the correct variables and necessary rules for the
|
|
329
345
|
client presented data.
|
|
330
346
|
***************/
|
|
331
|
-
|
|
332
|
-
return this.Feature('
|
|
347
|
+
Shield(resolve, reject) {
|
|
348
|
+
return this.Feature('shield', resolve, reject);
|
|
333
349
|
}
|
|
334
350
|
|
|
335
351
|
/**************
|
|
336
|
-
func:
|
|
352
|
+
func: Proxy
|
|
337
353
|
params: client: false
|
|
338
354
|
describe:
|
|
339
|
-
The
|
|
340
|
-
client presented data.
|
|
341
|
-
***************/
|
|
342
|
-
Systems(resolve, reject) {
|
|
343
|
-
return this.Feature('systems', resolve, reject);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
/**************
|
|
347
|
-
func: Networks
|
|
348
|
-
params: resolve, reject
|
|
349
|
-
describe:
|
|
350
|
-
The Networks feature sets the correct variables and necessary rules for the
|
|
355
|
+
The Defense feature sets the correct variables and necessary rules for the
|
|
351
356
|
client presented data.
|
|
352
357
|
***************/
|
|
353
|
-
|
|
354
|
-
return this.Feature('
|
|
358
|
+
Proxy(resolve, reject) {
|
|
359
|
+
return this.Feature('proxy', resolve, reject);
|
|
355
360
|
}
|
|
356
361
|
|
|
357
362
|
/**************
|
|
@@ -364,7 +369,7 @@ class Deva {
|
|
|
364
369
|
Legal(resolve, reject) {
|
|
365
370
|
return this.Feature('legal', resolve, reject);
|
|
366
371
|
}
|
|
367
|
-
|
|
372
|
+
|
|
368
373
|
/**************
|
|
369
374
|
func: Justice
|
|
370
375
|
params: client: false
|
|
@@ -375,7 +380,7 @@ class Deva {
|
|
|
375
380
|
Justice(resolve, reject) {
|
|
376
381
|
return this.Feature('justice', resolve, reject);
|
|
377
382
|
}
|
|
378
|
-
|
|
383
|
+
|
|
379
384
|
/**************
|
|
380
385
|
func: Authority
|
|
381
386
|
params: client: false
|
|
@@ -387,6 +392,50 @@ class Deva {
|
|
|
387
392
|
return this.Feature('authority', resolve, reject);
|
|
388
393
|
}
|
|
389
394
|
|
|
395
|
+
/**************
|
|
396
|
+
func: Support
|
|
397
|
+
params: client: false
|
|
398
|
+
describe:
|
|
399
|
+
The Support feature sets the correct variables and necessary rules for the
|
|
400
|
+
client presented data.
|
|
401
|
+
***************/
|
|
402
|
+
Support(resolve, reject) {
|
|
403
|
+
return this.Feature('support', resolve, reject);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**************
|
|
407
|
+
func: Services
|
|
408
|
+
params: client: false
|
|
409
|
+
describe:
|
|
410
|
+
The Services feature sets the correct variables and necessary rules for the
|
|
411
|
+
client presented data.
|
|
412
|
+
***************/
|
|
413
|
+
Services(resolve, reject) {
|
|
414
|
+
return this.Feature('services', resolve, reject);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**************
|
|
418
|
+
func: Systems
|
|
419
|
+
params: client: false
|
|
420
|
+
describe:
|
|
421
|
+
The Systems feature sets the correct variables and necessary rules for the
|
|
422
|
+
client presented data.
|
|
423
|
+
***************/
|
|
424
|
+
Systems(resolve, reject) {
|
|
425
|
+
return this.Feature('systems', resolve, reject);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/**************
|
|
429
|
+
func: Networks
|
|
430
|
+
params: resolve, reject
|
|
431
|
+
describe:
|
|
432
|
+
The Networks feature sets the correct variables and necessary rules for the
|
|
433
|
+
client presented data.
|
|
434
|
+
***************/
|
|
435
|
+
Networks(resolve, reject) {
|
|
436
|
+
return this.Feature('networks', resolve, reject);
|
|
437
|
+
}
|
|
438
|
+
|
|
390
439
|
/**************
|
|
391
440
|
func: Done
|
|
392
441
|
params: none
|
|
@@ -751,12 +800,18 @@ class Deva {
|
|
|
751
800
|
this.action('init');
|
|
752
801
|
this.state('init');
|
|
753
802
|
return this.Client(client, resolve, reject);
|
|
803
|
+
}).then(() => {
|
|
804
|
+
return this.Vector(resolve, reject);
|
|
754
805
|
}).then(() => {
|
|
755
806
|
return this.Security(resolve, reject);
|
|
756
807
|
}).then(() => {
|
|
757
808
|
return this.Guard(resolve, reject);
|
|
758
809
|
}).then(() => {
|
|
759
810
|
return this.Defense(resolve, reject);
|
|
811
|
+
}).then(() => {
|
|
812
|
+
return this.Wall(resolve, reject);
|
|
813
|
+
}).then(() => {
|
|
814
|
+
return this.Proxy(resolve, reject);
|
|
760
815
|
}).then(() => {
|
|
761
816
|
return this.Legal(resolve, reject);
|
|
762
817
|
}).then(() => {
|
|
@@ -1045,14 +1100,20 @@ class Deva {
|
|
|
1045
1100
|
// clear memory
|
|
1046
1101
|
this._active = false;
|
|
1047
1102
|
this._client = false;
|
|
1103
|
+
this._vector = false;
|
|
1048
1104
|
this._security = false;
|
|
1105
|
+
this._guard = false;
|
|
1106
|
+
this._defense = false;
|
|
1107
|
+
this._wall = false;
|
|
1108
|
+
this._shield = false;
|
|
1109
|
+
this._proxy = false;
|
|
1110
|
+
this._legal = false;
|
|
1111
|
+
this._authority = false;
|
|
1112
|
+
this._justice = false;
|
|
1049
1113
|
this._support = false;
|
|
1050
1114
|
this._services = false;
|
|
1051
1115
|
this._systems = false;
|
|
1052
1116
|
this._networks = false;
|
|
1053
|
-
this._legal = false;
|
|
1054
|
-
this._authority = false;
|
|
1055
|
-
this._justice = false;
|
|
1056
1117
|
return hasOnExit ? this.onExit(data) : Promise.resolve(data)
|
|
1057
1118
|
}
|
|
1058
1119
|
|
|
@@ -1402,6 +1463,16 @@ class Deva {
|
|
|
1402
1463
|
}
|
|
1403
1464
|
|
|
1404
1465
|
// FEATURE FUNCTIONS
|
|
1466
|
+
/**************
|
|
1467
|
+
func: vector
|
|
1468
|
+
params: none
|
|
1469
|
+
describe: basic vector features available in a Deva.
|
|
1470
|
+
usage: this.vector()
|
|
1471
|
+
***************/
|
|
1472
|
+
vector() {
|
|
1473
|
+
return this._getFeature('vector', this._vector);
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1405
1476
|
/**************
|
|
1406
1477
|
func: security
|
|
1407
1478
|
params: none
|
|
@@ -1432,6 +1503,56 @@ class Deva {
|
|
|
1432
1503
|
return this._getFeature('defense', this._defense);
|
|
1433
1504
|
}
|
|
1434
1505
|
|
|
1506
|
+
/**************
|
|
1507
|
+
func: wall
|
|
1508
|
+
params: none
|
|
1509
|
+
describe: basic wall features available in a Deva.
|
|
1510
|
+
usage: this.wall()
|
|
1511
|
+
***************/
|
|
1512
|
+
wall() {
|
|
1513
|
+
return this._getFeature('wall', this._wall);
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
/**************
|
|
1517
|
+
func: proxy
|
|
1518
|
+
params: none
|
|
1519
|
+
describe: basic proxy features available in a Deva.
|
|
1520
|
+
usage: this.proxy()
|
|
1521
|
+
***************/
|
|
1522
|
+
proxy() {
|
|
1523
|
+
return this._getFeature('proxy', this._proxy);
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
/**************
|
|
1527
|
+
func: legal
|
|
1528
|
+
params: none
|
|
1529
|
+
describe: basic legal features available in a Deva.
|
|
1530
|
+
usage: this.systems()
|
|
1531
|
+
***************/
|
|
1532
|
+
legal() {
|
|
1533
|
+
return this._getFeature('legal', this._legal);
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
/**************
|
|
1537
|
+
func: authority
|
|
1538
|
+
params: none
|
|
1539
|
+
describe: basic authority features available in a Deva.
|
|
1540
|
+
usage: this.systems()
|
|
1541
|
+
***************/
|
|
1542
|
+
authority() {
|
|
1543
|
+
return this._getFeature('authority', this._authority);
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
/**************
|
|
1547
|
+
func: justice
|
|
1548
|
+
params: none
|
|
1549
|
+
describe: basic justice features available in a Deva.
|
|
1550
|
+
usage: this.systems()
|
|
1551
|
+
***************/
|
|
1552
|
+
justice() {
|
|
1553
|
+
return this._getFeature('justice', this._justice);
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1435
1556
|
/**************
|
|
1436
1557
|
func: support
|
|
1437
1558
|
params: none
|
|
@@ -1472,36 +1593,6 @@ class Deva {
|
|
|
1472
1593
|
return this._getFeature('networks', this._networks);
|
|
1473
1594
|
}
|
|
1474
1595
|
|
|
1475
|
-
/**************
|
|
1476
|
-
func: legal
|
|
1477
|
-
params: none
|
|
1478
|
-
describe: basic legal features available in a Deva.
|
|
1479
|
-
usage: this.systems()
|
|
1480
|
-
***************/
|
|
1481
|
-
legal() {
|
|
1482
|
-
return this._getFeature('legal', this._legal);
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
/**************
|
|
1486
|
-
func: justice
|
|
1487
|
-
params: none
|
|
1488
|
-
describe: basic justice features available in a Deva.
|
|
1489
|
-
usage: this.systems()
|
|
1490
|
-
***************/
|
|
1491
|
-
justice() {
|
|
1492
|
-
return this._getFeature('justice', this._justice);
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
/**************
|
|
1496
|
-
func: authority
|
|
1497
|
-
params: none
|
|
1498
|
-
describe: basic authority features available in a Deva.
|
|
1499
|
-
usage: this.systems()
|
|
1500
|
-
***************/
|
|
1501
|
-
authority() {
|
|
1502
|
-
return this._getFeature('authority', this._authority);
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
1596
|
/**************
|
|
1506
1597
|
func: load
|
|
1507
1598
|
params:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indra.ai/deva",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.44",
|
|
4
4
|
"description": "The Deva Core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"copyright": "(c)2025 Quinn Michaels; All rights reserved.",
|
|
@@ -236,14 +236,19 @@
|
|
|
236
236
|
},
|
|
237
237
|
"feature": false,
|
|
238
238
|
"features": {
|
|
239
|
-
"
|
|
239
|
+
"agent": "🦾 Agent",
|
|
240
|
+
"client": "💪 Client",
|
|
240
241
|
"init": "🟠 Init",
|
|
242
|
+
"vector": "🛤️ Vector",
|
|
241
243
|
"security": "🔐 Security",
|
|
242
|
-
"defense": "🪖️️ Defense",
|
|
243
244
|
"guard": "💂 Guard",
|
|
245
|
+
"defense": "🪖️️ Defense",
|
|
246
|
+
"wall": "🧱 Wall",
|
|
247
|
+
"shield": "🛡️ Shield",
|
|
248
|
+
"proxy": "🤝 Proxy",
|
|
244
249
|
"legal": "🗂️️️ Legal",
|
|
245
|
-
"justice": "🏛️️ Justice",
|
|
246
250
|
"authority": "🚓️️ Authority",
|
|
251
|
+
"justice": "🏛️️ Justice",
|
|
247
252
|
"support": "💼 Support",
|
|
248
253
|
"services": "🛠️ Services",
|
|
249
254
|
"systems": "🖥️️ Systems",
|