@indra.ai/deva 1.5.50 → 1.5.52
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 +27 -1
- package/package.json +7 -5
- package/tests/client.json +5 -0
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.
|
|
@@ -172,6 +173,7 @@ class Deva {
|
|
|
172
173
|
This will return a not found text string preventing any furhter processing.
|
|
173
174
|
***************/
|
|
174
175
|
_methodNotFound(packet) {
|
|
176
|
+
if (!this._active) return this._messages.offline; // check the active status
|
|
175
177
|
const id = this.lib.uid();
|
|
176
178
|
const agent = this.agent() || false;
|
|
177
179
|
const client = this.client() || false;
|
|
@@ -200,7 +202,7 @@ class Deva {
|
|
|
200
202
|
packet.sha256 = this.lib.hash(packet, 'sha256');
|
|
201
203
|
packet.sha512 = this.lib.hash(packet, 'sha512');
|
|
202
204
|
|
|
203
|
-
this.state('invalid', `${
|
|
205
|
+
this.state('invalid', `${meta.method}:${packet.id}`);
|
|
204
206
|
return packet;
|
|
205
207
|
}
|
|
206
208
|
|
|
@@ -304,6 +306,17 @@ class Deva {
|
|
|
304
306
|
return this.Feature('vector', resolve, reject);
|
|
305
307
|
}
|
|
306
308
|
|
|
309
|
+
/**************
|
|
310
|
+
func: Treasury
|
|
311
|
+
params: client: false
|
|
312
|
+
describe:
|
|
313
|
+
The Treasury feature sets the correct variables and necessary rules for the
|
|
314
|
+
client presented data.
|
|
315
|
+
***************/
|
|
316
|
+
Treasury(resolve, reject) {
|
|
317
|
+
return this.Feature('treasury', resolve, reject);
|
|
318
|
+
}
|
|
319
|
+
|
|
307
320
|
/**************
|
|
308
321
|
func: Security
|
|
309
322
|
params: client: false
|
|
@@ -813,6 +826,8 @@ class Deva {
|
|
|
813
826
|
return this.Client(client, resolve, reject);
|
|
814
827
|
}).then(() => {
|
|
815
828
|
return this.Vector(resolve, reject);
|
|
829
|
+
}).then(() => {
|
|
830
|
+
return this.Treasury(resolve, reject);
|
|
816
831
|
}).then(() => {
|
|
817
832
|
return this.Security(resolve, reject);
|
|
818
833
|
}).then(() => {
|
|
@@ -1114,6 +1129,7 @@ class Deva {
|
|
|
1114
1129
|
this._active = false;
|
|
1115
1130
|
this._client = false;
|
|
1116
1131
|
this._vector = false;
|
|
1132
|
+
this._treasury = false;
|
|
1117
1133
|
this._security = false;
|
|
1118
1134
|
this._guard = false;
|
|
1119
1135
|
this._defense = false;
|
|
@@ -1486,6 +1502,16 @@ class Deva {
|
|
|
1486
1502
|
return this._getFeature('vector', this._vector);
|
|
1487
1503
|
}
|
|
1488
1504
|
|
|
1505
|
+
/**************
|
|
1506
|
+
func: treasury
|
|
1507
|
+
params: none
|
|
1508
|
+
describe: basic treasury features available in a Deva.
|
|
1509
|
+
usage: this.treasury()
|
|
1510
|
+
***************/
|
|
1511
|
+
treasury() {
|
|
1512
|
+
return this._getFeature('treasury', this._treasury);
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1489
1515
|
/**************
|
|
1490
1516
|
func: security
|
|
1491
1517
|
params: none
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indra.ai/deva",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.52",
|
|
4
4
|
"description": "The Deva Core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"copyright": "(c)2025 Quinn Michaels; All rights reserved.",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"load": "🚛 Load",
|
|
88
88
|
"unload": "🛻 Unload",
|
|
89
89
|
"init": "🟠 Init",
|
|
90
|
-
"start": "🟢
|
|
90
|
+
"start": "🟢 Start",
|
|
91
91
|
"enter": "🚪 Enter",
|
|
92
92
|
"done": "🟣 Done",
|
|
93
93
|
"ready": "⭐️ Ready",
|
|
@@ -99,6 +99,7 @@
|
|
|
99
99
|
"agent": "🤖 Agent",
|
|
100
100
|
"client": "👨 Client",
|
|
101
101
|
"vector": "🛤️ Vector",
|
|
102
|
+
"treasury": "🏦️ Treasury",
|
|
102
103
|
"security": "🔐 Security",
|
|
103
104
|
"guard": "💂 Guard",
|
|
104
105
|
"wall": "🧱 Wall",
|
|
@@ -119,7 +120,7 @@
|
|
|
119
120
|
"online": "🤩 Online",
|
|
120
121
|
"offline": "😴 Offline",
|
|
121
122
|
"active": "😀 Active",
|
|
122
|
-
"inactive": "
|
|
123
|
+
"inactive": "🥱 Inactive",
|
|
123
124
|
"idle": "🚘 Idle",
|
|
124
125
|
"talk": "📢 Talk",
|
|
125
126
|
"listen": "👂 Listen",
|
|
@@ -135,7 +136,7 @@
|
|
|
135
136
|
"send": "📬 Send",
|
|
136
137
|
"receive": "📪 Receive",
|
|
137
138
|
"init": "🟠 Init",
|
|
138
|
-
"start": "🟢
|
|
139
|
+
"start": "🟢 Start",
|
|
139
140
|
"enter": "🚪 Enter",
|
|
140
141
|
"done": "🟣 Done",
|
|
141
142
|
"ready": "⭐️ Ready",
|
|
@@ -214,7 +215,7 @@
|
|
|
214
215
|
"answer": "💡 Answer",
|
|
215
216
|
"ask": "📣 Ask",
|
|
216
217
|
"init": "🟠 Init",
|
|
217
|
-
"start": "🟢
|
|
218
|
+
"start": "🟢 Start",
|
|
218
219
|
"enter": "🚪 Enter",
|
|
219
220
|
"finish": "🏁 Finish",
|
|
220
221
|
"stop": "🔴 Stop",
|
|
@@ -243,6 +244,7 @@
|
|
|
243
244
|
"agent": "🦾 Agent",
|
|
244
245
|
"client": "💪 Client",
|
|
245
246
|
"vector": "🛤️ Vector",
|
|
247
|
+
"treasury": "🪙️ Treasury",
|
|
246
248
|
"security": "🔐 Security",
|
|
247
249
|
"guard": "💂 Guard",
|
|
248
250
|
"defense": "🪖️️ Defense",
|