@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.
Files changed (3) hide show
  1. package/config.json +12 -4
  2. package/index.js +53 -0
  3. 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": "๐Ÿ‘ 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:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.2.27",
3
+ "version": "1.2.28",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "type": "module",