@indra.ai/deva 1.2.27 โ 1.2.28
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/config.json +12 -4
- package/index.js +53 -0
- package/package.json +1 -1
package/config.json
CHANGED
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"security": "๐ Security",
|
|
45
45
|
"support": "๐ผ Support",
|
|
46
46
|
"services": "๐ ๏ธ Services",
|
|
47
|
+
"systems": "๐ก Systems",
|
|
47
48
|
"legal": "๐จโโ๏ธ๏ธ Legal",
|
|
48
49
|
"authority": "๐ฎโโ๏ธ Authority",
|
|
49
50
|
"help": "๐ Help",
|
|
@@ -95,7 +96,7 @@
|
|
|
95
96
|
"save": "๐พ save",
|
|
96
97
|
"delete": "๐งจ delete",
|
|
97
98
|
"set": "๐ Set",
|
|
98
|
-
"get": "
|
|
99
|
+
"get": "๐ซด Get",
|
|
99
100
|
"put": "๐ค Put",
|
|
100
101
|
"push": "๐ซธ Push",
|
|
101
102
|
"pull": "๐ Pull",
|
|
@@ -117,7 +118,9 @@
|
|
|
117
118
|
"fraud": "โผ๏ธ Fraud",
|
|
118
119
|
"crime": "๐ Crime",
|
|
119
120
|
"official": "๐ซก Official",
|
|
120
|
-
"unofficial": "๐คฅ Unofficial"
|
|
121
|
+
"unofficial": "๐คฅ Unofficial",
|
|
122
|
+
"approved": "๐๏ธ Approved",
|
|
123
|
+
"denied": "๐ Denied"
|
|
121
124
|
},
|
|
122
125
|
"action": false,
|
|
123
126
|
"actions": {
|
|
@@ -159,7 +162,7 @@
|
|
|
159
162
|
"return": "๐ Return",
|
|
160
163
|
"resolve": "โต๏ธ Resolve",
|
|
161
164
|
"reject": "โ Reject",
|
|
162
|
-
|
|
165
|
+
"write": "๐๏ธ Write",
|
|
163
166
|
"question_ask": "๐ฃ๏ธ Asked",
|
|
164
167
|
"question_ask_answer": "๐๏ธ Answered",
|
|
165
168
|
"question_cmd": "๐ช Command",
|
|
@@ -171,11 +174,13 @@
|
|
|
171
174
|
"security": "๐จ Security",
|
|
172
175
|
"support": "โค๏ธ Support",
|
|
173
176
|
"services": "๐ ๏ธ Services",
|
|
177
|
+
"systems": "๐ป๏ธ Systems",
|
|
174
178
|
|
|
175
179
|
"Client": " Client",
|
|
176
180
|
"Security": "๐ Security",
|
|
177
181
|
"Support": "๐ Support",
|
|
178
182
|
"Services": "๐ Services",
|
|
183
|
+
"Systems": "๐ Systems",
|
|
179
184
|
"Done": "โ๏ธ Done",
|
|
180
185
|
|
|
181
186
|
"invalid": "โ Invalid",
|
|
@@ -194,13 +199,16 @@
|
|
|
194
199
|
"image": "๐ Image",
|
|
195
200
|
"image": "๐ฝ๏ธ Video",
|
|
196
201
|
"signature": "โ๏ธ Signature",
|
|
197
|
-
"orders": "๐ช Orders"
|
|
202
|
+
"orders": "๐ช Orders",
|
|
203
|
+
"law": "๐ Law",
|
|
204
|
+
"decree": "๐ Decree"
|
|
198
205
|
},
|
|
199
206
|
"feature": false,
|
|
200
207
|
"features": {
|
|
201
208
|
"security": "๐ Security",
|
|
202
209
|
"support": "๐ผ Support",
|
|
203
210
|
"services": "๐ ๏ธ Services",
|
|
211
|
+
"systems": "๐ฅ๏ธ๏ธ Systems",
|
|
204
212
|
"cipher": "๐ Cipher",
|
|
205
213
|
"decipher": "๐ Decipher",
|
|
206
214
|
"promp": "๐ชต Prompt",
|
package/index.js
CHANGED
|
@@ -20,6 +20,7 @@ class Deva {
|
|
|
20
20
|
this._security = false; // inherited Security features.
|
|
21
21
|
this._support = false; // inherited Support features.
|
|
22
22
|
this._services = false; // inherited Service features.
|
|
23
|
+
this._systems = false; // inherited Service features.
|
|
23
24
|
this.os = os; // It is used to provide basic operating system related utility functions.
|
|
24
25
|
this.fs = fs; // this is so file system functions are in the core.
|
|
25
26
|
this.path = path; // this is so we can get path in the system.
|
|
@@ -310,6 +311,40 @@ class Deva {
|
|
|
310
311
|
}
|
|
311
312
|
}
|
|
312
313
|
|
|
314
|
+
/**************
|
|
315
|
+
func: Systems
|
|
316
|
+
params: client: false
|
|
317
|
+
describe:
|
|
318
|
+
The Systems feature sets the correct variables and necessary rules for the
|
|
319
|
+
client presented data.
|
|
320
|
+
***************/
|
|
321
|
+
Systems() {
|
|
322
|
+
this.zone('systems')
|
|
323
|
+
this.action('Systems');
|
|
324
|
+
const _cl = this.client(); // set local client
|
|
325
|
+
try {
|
|
326
|
+
if (!_cl.features.services) return this.Done(); // move to Done if no Systems feature
|
|
327
|
+
else {
|
|
328
|
+
this.state('set', 'Systems');
|
|
329
|
+
const {id, features, profile} = _cl; // set the local consts from client copy
|
|
330
|
+
const {services} = features; // set services from features const
|
|
331
|
+
this._services = { // set this_services with data
|
|
332
|
+
id: this.uid(true), // uuid of the services feature
|
|
333
|
+
client_id: id, // client id for reference
|
|
334
|
+
client_name: profile.name, // client name for personalization
|
|
335
|
+
concerns: services.concerns, // any concerns for client
|
|
336
|
+
global: services.global, // the global policies for client
|
|
337
|
+
personal: services.devas[this._agent.key], // Client personal features and rules.
|
|
338
|
+
};
|
|
339
|
+
delete this._client.features.services; // delete the services key for isolation
|
|
340
|
+
return this.Done(); // go to Done
|
|
341
|
+
}
|
|
342
|
+
} catch (e) {
|
|
343
|
+
this.state('reject', 'Systems');
|
|
344
|
+
return this.error(e); // run error handling if an error is caught
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
313
348
|
/**************
|
|
314
349
|
func: Done
|
|
315
350
|
params: none
|
|
@@ -1197,6 +1232,24 @@ class Deva {
|
|
|
1197
1232
|
}
|
|
1198
1233
|
}
|
|
1199
1234
|
|
|
1235
|
+
/**************
|
|
1236
|
+
func: systems
|
|
1237
|
+
params: none
|
|
1238
|
+
describe: basic systems features available in a Deva.
|
|
1239
|
+
usage: this.systems()
|
|
1240
|
+
***************/
|
|
1241
|
+
systems(opts) {
|
|
1242
|
+
if (!this._active) return this._messages.offline; // check the active status
|
|
1243
|
+
this.zone('systems');
|
|
1244
|
+
this.feature('systems'); // set the support state
|
|
1245
|
+
try {
|
|
1246
|
+
this.state('return', 'systems'); // set the systems state
|
|
1247
|
+
return this.copy(this._systems); // return the systems feature
|
|
1248
|
+
} catch (e) {
|
|
1249
|
+
return this.error(e); // return this.error when error catch
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1200
1253
|
/**************
|
|
1201
1254
|
func: load
|
|
1202
1255
|
params:
|