@indra.ai/deva 1.4.6 → 1.4.7
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 +1 -2
- package/index.js +14 -15
- package/package.json +1 -1
package/config.json
CHANGED
|
@@ -157,7 +157,6 @@
|
|
|
157
157
|
"method": "❤️🔥 Method",
|
|
158
158
|
"list": "📋 List",
|
|
159
159
|
"reply": "📮 Reply",
|
|
160
|
-
"write": "️📝 Write",
|
|
161
160
|
"set": "🍽️ Set",
|
|
162
161
|
"get": "🤔 Get",
|
|
163
162
|
"send": "🚀 Send",
|
|
@@ -200,7 +199,7 @@
|
|
|
200
199
|
"audio": "👂 Audio",
|
|
201
200
|
"text": "📕 Text",
|
|
202
201
|
"image": "🌄 Image",
|
|
203
|
-
"
|
|
202
|
+
"video": "📽️ Video",
|
|
204
203
|
"signature": "✍️ Signature",
|
|
205
204
|
"orders": "🪖 Orders",
|
|
206
205
|
"law": "🔏 Law",
|
package/index.js
CHANGED
|
@@ -238,7 +238,7 @@ class Deva {
|
|
|
238
238
|
const data = features[feature]; // make a copy the clinet data.
|
|
239
239
|
this.state('set', feature);
|
|
240
240
|
this[_fe] = { // set this_security with data
|
|
241
|
-
id: this.lib.uid(
|
|
241
|
+
id: this.lib.uid(), // uuid of the security feature
|
|
242
242
|
client_id: id, // client id for reference
|
|
243
243
|
client_name: profile.name, // client name for personalization
|
|
244
244
|
concerns: data.concerns, // any concerns for client
|
|
@@ -677,7 +677,7 @@ class Deva {
|
|
|
677
677
|
const agent = this.agent();
|
|
678
678
|
|
|
679
679
|
const _data = {
|
|
680
|
-
id: this.lib.uid(
|
|
680
|
+
id: this.lib.uid(),
|
|
681
681
|
key: 'init',
|
|
682
682
|
value: agent.key,
|
|
683
683
|
agent,
|
|
@@ -915,7 +915,7 @@ class Deva {
|
|
|
915
915
|
|
|
916
916
|
this.action('exit');
|
|
917
917
|
const data = {
|
|
918
|
-
id: this.lib.uid(
|
|
918
|
+
id: this.lib.uid(),
|
|
919
919
|
key: 'exit',
|
|
920
920
|
value: this._messages.exit,
|
|
921
921
|
agent,
|
|
@@ -982,7 +982,7 @@ class Deva {
|
|
|
982
982
|
this.action('func', 'states');
|
|
983
983
|
this.state('return', 'states');
|
|
984
984
|
return {
|
|
985
|
-
id: this.lib.uid(
|
|
985
|
+
id: this.lib.uid(),
|
|
986
986
|
key: 'states',
|
|
987
987
|
value: this._states,
|
|
988
988
|
created: Date.now(),
|
|
@@ -1028,7 +1028,7 @@ class Deva {
|
|
|
1028
1028
|
this.action('func', 'zones');
|
|
1029
1029
|
this.state('return', 'zones');
|
|
1030
1030
|
return {
|
|
1031
|
-
id: this.lib.uid(
|
|
1031
|
+
id: this.lib.uid(), // set the uuid of the data
|
|
1032
1032
|
agent: this.agent(), // set the agent value
|
|
1033
1033
|
cleint: this.client(), // set the client value
|
|
1034
1034
|
key: 'zones', // set the key return value
|
|
@@ -1055,7 +1055,7 @@ class Deva {
|
|
|
1055
1055
|
const msg = msg_action || action; // set the correct message
|
|
1056
1056
|
const text = extra ? `${msg} ${extra}` : msg; // set the text of the action
|
|
1057
1057
|
const data = { // build the data object for the action.
|
|
1058
|
-
id: this.lib.uid(
|
|
1058
|
+
id: this.lib.uid(), // generate a guid for the action transmitssion.
|
|
1059
1059
|
agent: this.agent(), // the agent data to send with the action
|
|
1060
1060
|
client: this.client(), // the client data to send with the action
|
|
1061
1061
|
key: 'action', // the key for event to transmit action type
|
|
@@ -1080,7 +1080,7 @@ class Deva {
|
|
|
1080
1080
|
this.action('func', 'actions');
|
|
1081
1081
|
this.state('return', 'actions');
|
|
1082
1082
|
return {
|
|
1083
|
-
id: this.lib.uid(
|
|
1083
|
+
id: this.lib.uid(), // set the id with a uuid
|
|
1084
1084
|
agent: this.agent(), // set the agent value
|
|
1085
1085
|
client: this.client(), // set the client value
|
|
1086
1086
|
key: 'actions', // set the data key
|
|
@@ -1104,7 +1104,7 @@ class Deva {
|
|
|
1104
1104
|
const text = extra ? `${lookup} ${extra}` : lookup; // set the text value
|
|
1105
1105
|
|
|
1106
1106
|
const data = { // build data object
|
|
1107
|
-
id: this.lib.uid(
|
|
1107
|
+
id: this.lib.uid(), // set the id
|
|
1108
1108
|
agent: this.agent(), // set the agent transporting the packet.
|
|
1109
1109
|
key: 'feature', // set the key for transport
|
|
1110
1110
|
value, // set the value of the key
|
|
@@ -1127,7 +1127,7 @@ class Deva {
|
|
|
1127
1127
|
features() {
|
|
1128
1128
|
this.state('return', 'features');
|
|
1129
1129
|
return { // return the data object
|
|
1130
|
-
id: this.lib.uid(
|
|
1130
|
+
id: this.lib.uid(), // set the object id
|
|
1131
1131
|
agent: this.agent(), // set the agent value.
|
|
1132
1132
|
client: this.client(), // set the client value.
|
|
1133
1133
|
key: 'features', // set the key
|
|
@@ -1151,7 +1151,7 @@ class Deva {
|
|
|
1151
1151
|
const text = extra ? `${lookup} ${extra}` : lookup;
|
|
1152
1152
|
|
|
1153
1153
|
const data = {
|
|
1154
|
-
id: this.lib.uid(
|
|
1154
|
+
id: this.lib.uid(),
|
|
1155
1155
|
agent: this.agent(),
|
|
1156
1156
|
client: this.client(),
|
|
1157
1157
|
key: 'context',
|
|
@@ -1172,7 +1172,7 @@ class Deva {
|
|
|
1172
1172
|
if (!this._active) return this._messages.offline; // check the active status
|
|
1173
1173
|
this.state('return', 'contexts');
|
|
1174
1174
|
return {
|
|
1175
|
-
id: this.lib.uid(
|
|
1175
|
+
id: this.lib.uid(),
|
|
1176
1176
|
agent: this.agent(),
|
|
1177
1177
|
client: this.client(),
|
|
1178
1178
|
key: 'contexts',
|
|
@@ -1419,7 +1419,7 @@ class Deva {
|
|
|
1419
1419
|
const agent = this.agent();
|
|
1420
1420
|
const client = this.client();
|
|
1421
1421
|
const _data = {
|
|
1422
|
-
id: this.lib.uid(
|
|
1422
|
+
id: this.lib.uid(),
|
|
1423
1423
|
key: 'prompt',
|
|
1424
1424
|
value: agent.key,
|
|
1425
1425
|
agent,
|
|
@@ -1505,17 +1505,16 @@ class Deva {
|
|
|
1505
1505
|
- data: Any additional data associated with the error
|
|
1506
1506
|
- reject: An associated promise reject if the caller requires.
|
|
1507
1507
|
describe:
|
|
1508
|
-
The
|
|
1508
|
+
The error function provides the consistent error manage of the system.
|
|
1509
1509
|
usage: this.error(err, data, reject);
|
|
1510
1510
|
***************/
|
|
1511
1511
|
error(err,data=false,reject=false) {
|
|
1512
1512
|
this.zone('error');
|
|
1513
|
-
|
|
1514
1513
|
this.action('error')
|
|
1515
1514
|
const agent = this.agent();
|
|
1516
1515
|
const client = this.client();
|
|
1517
1516
|
const _data = {
|
|
1518
|
-
id: this.lib.uid(
|
|
1517
|
+
id: this.lib.uid(),
|
|
1519
1518
|
key: 'error',
|
|
1520
1519
|
value: agent.key,
|
|
1521
1520
|
agent,
|