@indra.ai/deva 1.6.6 β 1.6.7
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 +30 -25
- package/package.json +29 -8
- package/tests/client.json +5 -5
package/index.js
CHANGED
|
@@ -29,13 +29,13 @@ class Deva {
|
|
|
29
29
|
this._agent = opts.agent || false; // Agent profile object
|
|
30
30
|
this._client = {}; // this will be set on init.
|
|
31
31
|
this._active = false; // the active/birth date.
|
|
32
|
+
this._indra = false; // inherited Indra features.
|
|
32
33
|
this._veda = false; // inherited Veda features.
|
|
33
34
|
this._data = false; // inherited Data features.
|
|
34
35
|
this._error = false; // inherited Error features.
|
|
35
36
|
this._log = false; // inherited Log features.
|
|
36
37
|
this._report = false; // inherited Report features.
|
|
37
38
|
this._vector = false; // inherited Vector features.
|
|
38
|
-
this._god = false; // inherited God features.
|
|
39
39
|
this._king = false; // inherited King features.
|
|
40
40
|
this._treasury = false; // inherited Vector features.
|
|
41
41
|
this._security = false; // inherited Security features.
|
|
@@ -229,6 +229,8 @@ class Deva {
|
|
|
229
229
|
if (!this._active) return this._messages.offline; // check the active status
|
|
230
230
|
this.zone(key);
|
|
231
231
|
this.feature(key); // set the security state
|
|
232
|
+
this.action(key);
|
|
233
|
+
this.state(key);
|
|
232
234
|
try {
|
|
233
235
|
const data = this.lib.copy(value);
|
|
234
236
|
this.state('return', key); // set the security state
|
|
@@ -294,7 +296,7 @@ class Deva {
|
|
|
294
296
|
const _fe = `_${feature}`;
|
|
295
297
|
const {id, profile, features} = _cl; // make a copy the clinet data.
|
|
296
298
|
const data = features[feature]; // make a copy the clinet data.
|
|
297
|
-
this.state(
|
|
299
|
+
this.state(feature, _id.uid);
|
|
298
300
|
this[_fe] = { // set this feature with data
|
|
299
301
|
id: _id, // uid of the feature
|
|
300
302
|
client_id: id, // client id for reference
|
|
@@ -314,6 +316,18 @@ class Deva {
|
|
|
314
316
|
}
|
|
315
317
|
}
|
|
316
318
|
|
|
319
|
+
|
|
320
|
+
/**************
|
|
321
|
+
func: Indra
|
|
322
|
+
params: resolve, reject
|
|
323
|
+
describe:
|
|
324
|
+
The Indra feature sets the correct variables and necessary rules for the
|
|
325
|
+
client presented data.
|
|
326
|
+
***************/
|
|
327
|
+
Indra(resolve, reject) {
|
|
328
|
+
return this.Feature('indra', resolve, reject);
|
|
329
|
+
}
|
|
330
|
+
|
|
317
331
|
/**************
|
|
318
332
|
func: Veda
|
|
319
333
|
params: resolve, reject
|
|
@@ -380,17 +394,6 @@ class Deva {
|
|
|
380
394
|
return this.Feature('vector', resolve, reject);
|
|
381
395
|
}
|
|
382
396
|
|
|
383
|
-
/**************
|
|
384
|
-
func: God
|
|
385
|
-
params: resolve, reject
|
|
386
|
-
describe:
|
|
387
|
-
The God feature sets the correct variables and necessary rules for the
|
|
388
|
-
client presented data.
|
|
389
|
-
***************/
|
|
390
|
-
God(resolve, reject) {
|
|
391
|
-
return this.Feature('god', resolve, reject);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
397
|
/**************
|
|
395
398
|
func: King
|
|
396
399
|
params: resolve, reject
|
|
@@ -931,6 +934,8 @@ class Deva {
|
|
|
931
934
|
this.action('init');
|
|
932
935
|
this.state('init');
|
|
933
936
|
return this.Client(client, resolve, reject);
|
|
937
|
+
}).then(() => {
|
|
938
|
+
return this.Indra(resolve, reject);
|
|
934
939
|
}).then(() => {
|
|
935
940
|
return this.Veda(resolve, reject);
|
|
936
941
|
}).then(() => {
|
|
@@ -943,8 +948,6 @@ class Deva {
|
|
|
943
948
|
return this.Report(resolve, reject);
|
|
944
949
|
}).then(() => {
|
|
945
950
|
return this.Vector(resolve, reject);
|
|
946
|
-
}).then(() => {
|
|
947
|
-
return this.God(resolve, reject);
|
|
948
951
|
}).then(() => {
|
|
949
952
|
return this.King(resolve, reject);
|
|
950
953
|
}).then(() => {
|
|
@@ -1625,6 +1628,18 @@ class Deva {
|
|
|
1625
1628
|
}
|
|
1626
1629
|
|
|
1627
1630
|
// FEATURE FUNCTIONS
|
|
1631
|
+
|
|
1632
|
+
/**************
|
|
1633
|
+
func: indra
|
|
1634
|
+
params: none
|
|
1635
|
+
describe: basic indra features available in a Deva.
|
|
1636
|
+
usage: this.indra()
|
|
1637
|
+
***************/
|
|
1638
|
+
indra() {
|
|
1639
|
+
return this._getFeature('indra', this._indra);
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
|
|
1628
1643
|
/**************
|
|
1629
1644
|
func: veda
|
|
1630
1645
|
params: none
|
|
@@ -1687,16 +1702,6 @@ class Deva {
|
|
|
1687
1702
|
}
|
|
1688
1703
|
|
|
1689
1704
|
|
|
1690
|
-
/**************
|
|
1691
|
-
func: god
|
|
1692
|
-
params: none
|
|
1693
|
-
describe: basic god features available in a Deva.
|
|
1694
|
-
usage: this.god()
|
|
1695
|
-
***************/
|
|
1696
|
-
god() {
|
|
1697
|
-
return this._getFeature('god', this._god);
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
1705
|
/**************
|
|
1701
1706
|
func: king
|
|
1702
1707
|
params: none
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "55286864875635314522",
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.7",
|
|
5
5
|
"description": "The Deva Core",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"copyright": "(c)2025 Quinn A Michaels; All rights reserved.",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"log": "πͺ΅ Log",
|
|
119
119
|
"report": "ποΈ Report",
|
|
120
120
|
"vector": "π½οΈ Vector",
|
|
121
|
-
"
|
|
121
|
+
"indra": "π« Indra",
|
|
122
122
|
"king": "ποΈ King",
|
|
123
123
|
"owner": "π²οΈ Owner",
|
|
124
124
|
"treasury": "π¦οΈ Treasury",
|
|
@@ -174,11 +174,10 @@
|
|
|
174
174
|
"unload": "π» Unload",
|
|
175
175
|
"resolve": "π€ Resolve",
|
|
176
176
|
"reject": "π§± Reject",
|
|
177
|
-
"data": "π‘ Data",
|
|
178
177
|
"create": "π¨ Create",
|
|
179
178
|
"destroy": "π£ Destroy",
|
|
180
179
|
"write": "π Write",
|
|
181
|
-
"save": "
|
|
180
|
+
"save": "π Save",
|
|
182
181
|
"set": "π Set",
|
|
183
182
|
"get": "π«΄ Get",
|
|
184
183
|
"put": "π€ Put",
|
|
@@ -190,7 +189,6 @@
|
|
|
190
189
|
"invalid": "π INVALID!",
|
|
191
190
|
"valid": "π VALID!",
|
|
192
191
|
"abort": "π ABORT!",
|
|
193
|
-
"error": "β ERROR!",
|
|
194
192
|
"help": "π Help",
|
|
195
193
|
"authorized": "π Authorized",
|
|
196
194
|
"unauthorized": "π΄ββ οΈ Unauthorized",
|
|
@@ -213,19 +211,42 @@
|
|
|
213
211
|
"update": "π Update",
|
|
214
212
|
"delete": "ποΈ Delete",
|
|
215
213
|
"return": "π€Ώ Return",
|
|
216
|
-
"hash": "#οΈβ£ Hash"
|
|
214
|
+
"hash": "#οΈβ£ Hash",
|
|
215
|
+
"indra": "π« Indra",
|
|
216
|
+
"veda": "ποΈ Veda",
|
|
217
|
+
"data": "πΎ Data",
|
|
218
|
+
"error": "β Error",
|
|
219
|
+
"log": "πͺ΅ Log",
|
|
220
|
+
"report": "ποΈ Report",
|
|
221
|
+
"vector": "π½ Vector",
|
|
222
|
+
"king": "ποΈ King",
|
|
223
|
+
"owner": "π²οΈ Owner",
|
|
224
|
+
"treasury": "π¦ Treasury",
|
|
225
|
+
"security": "π¨ Security",
|
|
226
|
+
"guard": "π Guard",
|
|
227
|
+
"defense": "πͺ Defense",
|
|
228
|
+
"wall": "π§± Wall",
|
|
229
|
+
"shield": "π‘οΈ Shield",
|
|
230
|
+
"proxy": "πΎοΈ Proxy",
|
|
231
|
+
"legal": "ποΈ Legal",
|
|
232
|
+
"authority": "π Authority",
|
|
233
|
+
"justice": "βοΈ Justice",
|
|
234
|
+
"support": "πΌ Support",
|
|
235
|
+
"services": "π οΈ Services",
|
|
236
|
+
"systems": "π₯οΈ Systems",
|
|
237
|
+
"networks": "π‘ Networks"
|
|
217
238
|
},
|
|
218
239
|
"action": false,
|
|
219
240
|
"actions": {
|
|
220
241
|
"client": "π¨ Client",
|
|
221
242
|
"agent": "π΅οΈββοΈ Agent",
|
|
243
|
+
"indra": "π« Indra",
|
|
222
244
|
"veda": "ποΈ Veda",
|
|
223
245
|
"data": "πΎ Data",
|
|
224
246
|
"error": "β Error",
|
|
225
247
|
"log": "πͺ΅ Log",
|
|
226
248
|
"report": "ποΈ Report",
|
|
227
249
|
"vector": "π½ Vector",
|
|
228
|
-
"god": "π« God",
|
|
229
250
|
"king": "ποΈ King",
|
|
230
251
|
"owner": "π²οΈ Owner",
|
|
231
252
|
"treasury": "π¦ Treasury",
|
|
@@ -277,13 +298,13 @@
|
|
|
277
298
|
"init": "π Init",
|
|
278
299
|
"agent": "π¦Ύ Agent",
|
|
279
300
|
"client": "πͺ Client",
|
|
301
|
+
"indra": "π« Indra",
|
|
280
302
|
"veda": "ποΈ Veda",
|
|
281
303
|
"data": "πΎοΈ Data",
|
|
282
304
|
"error": "βοΈ Error",
|
|
283
305
|
"log": "πͺ΅οΈ Log",
|
|
284
306
|
"report": "ποΈ Report",
|
|
285
307
|
"vector": "π½οΈ Vector",
|
|
286
|
-
"god": "π« God",
|
|
287
308
|
"king": "ποΈ King",
|
|
288
309
|
"owner": "π²οΈ Owner",
|
|
289
310
|
"treasury": "π¦ Treasury",
|
package/tests/client.json
CHANGED
|
@@ -34,6 +34,11 @@
|
|
|
34
34
|
"currency": "USD"
|
|
35
35
|
},
|
|
36
36
|
"features": {
|
|
37
|
+
"indra": {
|
|
38
|
+
"concerns": [],
|
|
39
|
+
"global": [],
|
|
40
|
+
"devas": {}
|
|
41
|
+
},
|
|
37
42
|
"veda": {
|
|
38
43
|
"concerns": [],
|
|
39
44
|
"global": [],
|
|
@@ -64,11 +69,6 @@
|
|
|
64
69
|
"global": [],
|
|
65
70
|
"devas": {}
|
|
66
71
|
},
|
|
67
|
-
"god": {
|
|
68
|
-
"concerns": [],
|
|
69
|
-
"global": [],
|
|
70
|
-
"devas": {}
|
|
71
|
-
},
|
|
72
72
|
"king": {
|
|
73
73
|
"concerns": [],
|
|
74
74
|
"global": [],
|