@indra.ai/deva 1.21.1 → 1.22.1

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/index.js CHANGED
@@ -15,6 +15,14 @@ import msgs from './msgs.json' with {type:'json'};
15
15
  export default {
16
16
  cmdChr: '/',
17
17
  askChr: '#',
18
+ container: {
19
+ begin: '::BEGIN:',
20
+ end: '::END:',
21
+ },
22
+ box: {
23
+ begin: '::begin:',
24
+ end: '::end:',
25
+ },
18
26
  uid: {
19
27
  end_min: 1000000,
20
28
  end_max: 9999999
package/index.js CHANGED
@@ -65,7 +65,9 @@ class Deva {
65
65
 
66
66
  this.cmdChr = config.cmdChr; // the trigger for local commands
67
67
  this.askChr = config.askChr; // the trigger for ask other DEva features
68
-
68
+ this.container = config.container // set the container object
69
+ this.box = config.box // set the box object
70
+
69
71
  this._inherit = config.inherit; // set inherit from config data.
70
72
  this._bind = config.bind; // set the bind from the config data.
71
73
 
package/lib/index.js CHANGED
@@ -83,10 +83,10 @@ class LIB {
83
83
  const encrypted = Buffer.from(opts.encrypted, 'hex');
84
84
  const key_in_bytes = Buffer.from(key, 'base64')
85
85
  const decipher = createDecipheriv(algorithm, key_in_bytes, iv);
86
- const decrypted = decipher.update(encrypted, 'hex', 'utf8');
87
- const final = Buffer.concat([decrypted, decipher.final('utf8')]);
88
- this.action('return', 'decipher');
89
- return final.toString();
86
+ let decrypted = decipher.update(encrypted, 'hex', 'utf8');
87
+ decrypted += decipher.final('utf8');
88
+
89
+ return decrypted;
90
90
  }
91
91
 
92
92
  /**************
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "64907438819979111427",
3
3
  "name": "@indra.ai/deva",
4
- "version": "1.21.1",
4
+ "version": "1.22.1",
5
5
  "description": "Deva Core a Vedic-inspired Event Based Context Aware Feature, Zone, Action, and State Machine integrated Artificial Intelligence Framework",
6
6
  "main": "index.js",
7
7
  "license": "VLA:64907438819979111427 LICENSE.md",