@indra.ai/deva 1.4.21 β 1.4.23
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 +24 -0
- package/package.json +10 -21
- package/tests/agent.json +6 -0
- package/tests/client.json +5 -0
package/index.js
CHANGED
|
@@ -282,6 +282,17 @@ class Deva {
|
|
|
282
282
|
return this.Feature('security', resolve, reject);
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
+
/**************
|
|
286
|
+
func: Guard
|
|
287
|
+
params: client: false
|
|
288
|
+
describe:
|
|
289
|
+
The Guard feature sets the correct variables and necessary rules for the
|
|
290
|
+
client presented data.
|
|
291
|
+
***************/
|
|
292
|
+
Guard(resolve, reject) {
|
|
293
|
+
return this.Feature('guard', resolve, reject);
|
|
294
|
+
}
|
|
295
|
+
|
|
285
296
|
/**************
|
|
286
297
|
func: Defense
|
|
287
298
|
params: client: false
|
|
@@ -519,6 +530,7 @@ class Deva {
|
|
|
519
530
|
|
|
520
531
|
if (isAsk) { // isAsk check if the question isAsk and talk
|
|
521
532
|
// if: isAsk wait for the once event which is key'd to the packet ID for specified responses
|
|
533
|
+
this.zone('ask', key);
|
|
522
534
|
this.action('talk', `${key}:ask`);
|
|
523
535
|
this.talk(`${key}:ask`, packet);
|
|
524
536
|
this.once(`${key}:ask:${packet.id}`, answer => {
|
|
@@ -724,6 +736,8 @@ class Deva {
|
|
|
724
736
|
return this.Client(client, resolve, reject);
|
|
725
737
|
}).then(() => {
|
|
726
738
|
return this.Security(resolve, reject);
|
|
739
|
+
}).then(() => {
|
|
740
|
+
return this.Guard(resolve, reject);
|
|
727
741
|
}).then(() => {
|
|
728
742
|
return this.Defense(resolve, reject);
|
|
729
743
|
}).then(() => {
|
|
@@ -1247,6 +1261,16 @@ class Deva {
|
|
|
1247
1261
|
return this._getFeature('security', this._security);
|
|
1248
1262
|
}
|
|
1249
1263
|
|
|
1264
|
+
/**************
|
|
1265
|
+
func: guard
|
|
1266
|
+
params: none
|
|
1267
|
+
describe: basic guard features available in a Deva.
|
|
1268
|
+
usage: this.guard()
|
|
1269
|
+
***************/
|
|
1270
|
+
guard() {
|
|
1271
|
+
return this._getFeature('guard', this._guard);
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1250
1274
|
/**************
|
|
1251
1275
|
func: defense
|
|
1252
1276
|
params: none
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indra.ai/deva",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.23",
|
|
4
4
|
"description": "The Deva Core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"copyright": "(c)2025 Quinn Michaels; All rights reserved.",
|
|
@@ -82,7 +82,8 @@
|
|
|
82
82
|
"zone": "deva",
|
|
83
83
|
"zones": {
|
|
84
84
|
"question": "πββοΈ Question",
|
|
85
|
-
"answer": "π¨βπ«
|
|
85
|
+
"answer": "π¨βπ« Answer",
|
|
86
|
+
"ask": "π£ Ask",
|
|
86
87
|
"load": "π Load",
|
|
87
88
|
"unload": "π» Unload",
|
|
88
89
|
"init": "π Init",
|
|
@@ -103,6 +104,7 @@
|
|
|
103
104
|
"authority": "π Authority",
|
|
104
105
|
"justice": "βοΈ Justice",
|
|
105
106
|
"defense": "πͺ Defense",
|
|
107
|
+
"guard": "π Guard",
|
|
106
108
|
"help": "π Help",
|
|
107
109
|
"error": "β Error!"
|
|
108
110
|
},
|
|
@@ -260,28 +262,15 @@
|
|
|
260
262
|
"client": "π¨ Client",
|
|
261
263
|
"init": "π Init",
|
|
262
264
|
"security": "π Security",
|
|
263
|
-
"
|
|
264
|
-
"
|
|
265
|
-
"systems": "π₯οΈοΈ Systems",
|
|
266
|
-
"networks": "ποΈοΈ Networks",
|
|
265
|
+
"defense": "πͺοΈοΈ Defense",
|
|
266
|
+
"guard": "π Guard",
|
|
267
267
|
"legal": "ποΈοΈοΈ Legal",
|
|
268
268
|
"justice": "ποΈοΈ Justice",
|
|
269
269
|
"authority": "ποΈοΈ Authority",
|
|
270
|
-
"
|
|
271
|
-
"
|
|
272
|
-
"
|
|
273
|
-
"
|
|
274
|
-
"getToday": "π Get Today",
|
|
275
|
-
"formatDate": "π
Format Date",
|
|
276
|
-
"formatTime": "π°οΈ Format Time",
|
|
277
|
-
"formatCurrency": "π° Format Currency",
|
|
278
|
-
"formatPercent": "% Format Percent",
|
|
279
|
-
"formatNumbert": "# Format Number",
|
|
280
|
-
"trimWords": "π Trim Words",
|
|
281
|
-
"dupes": "π Duplicates",
|
|
282
|
-
"info": "πββοΈ Info",
|
|
283
|
-
"status": "β€οΈ Status",
|
|
284
|
-
"help": "π Help"
|
|
270
|
+
"support": "πΌ Support",
|
|
271
|
+
"services": "π οΈ Services",
|
|
272
|
+
"systems": "π₯οΈοΈ Systems",
|
|
273
|
+
"networks": "ποΈοΈ Networks"
|
|
285
274
|
},
|
|
286
275
|
"message": "offline",
|
|
287
276
|
"messages": {
|
package/tests/agent.json
CHANGED