@indra.ai/deva 1.11.0 → 1.12.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/index.js +9 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -334,7 +334,7 @@ class Deva {
|
|
|
334
334
|
|
|
335
335
|
// setup the complete talk event
|
|
336
336
|
this.action('talk', `${this._events[key]}:${data.id.uid}`); // action talk for the event.
|
|
337
|
-
this.talk(this._events[key], data); // talk the complete event
|
|
337
|
+
this.talk(this._events[key], this.lib.copy(data)); // talk the complete event
|
|
338
338
|
|
|
339
339
|
if (clear) {
|
|
340
340
|
this.state('loop', `${key}:clear:${data.id.uid}`);
|
|
@@ -882,7 +882,7 @@ class Deva {
|
|
|
882
882
|
// if: isAsk wait for the once event which is key'd to the packet ID for specified responses
|
|
883
883
|
this.action('ask', `${key}:${id.uid}`);
|
|
884
884
|
this.intent('good', `ask:${key}:${id.uid}`);
|
|
885
|
-
this.talk(`${key}:ask`, packet);
|
|
885
|
+
this.talk(`${key}:ask`, this.lib.copy(packet));
|
|
886
886
|
this.once(`${key}:ask:${packet.id.uid}`, answer => {
|
|
887
887
|
this.action('talk', `${this._events.ask}:${id.uid}`);
|
|
888
888
|
this.intent('good', `${this.events.ask}:${id.uid}`);
|
|
@@ -1523,7 +1523,7 @@ class Deva {
|
|
|
1523
1523
|
data.sha256 = this.hash(data, 'sha256');
|
|
1524
1524
|
data.sha512 = this.hash(data, 'sha512');
|
|
1525
1525
|
|
|
1526
|
-
this.talk(this._events.context, data);
|
|
1526
|
+
this.talk(this._events.context, this.lib.copy(data));
|
|
1527
1527
|
return data;
|
|
1528
1528
|
} catch (e) {
|
|
1529
1529
|
this.state('catch', `context:${value}:${id.uid}`);
|
|
@@ -1705,7 +1705,7 @@ class Deva {
|
|
|
1705
1705
|
data.sha256 = this.hash(data, 'sha256');
|
|
1706
1706
|
data.sha512 = this.hash(data, 'sha512');
|
|
1707
1707
|
|
|
1708
|
-
this.talk(this._events[key], data); // broadcast the state event
|
|
1708
|
+
this.talk(this._events[key], this.lib.copy(data)); // broadcast the state event
|
|
1709
1709
|
return data;
|
|
1710
1710
|
} catch (e) { // catch any errors
|
|
1711
1711
|
return this.err(e); // return if an error happens
|
|
@@ -2365,8 +2365,10 @@ class Deva {
|
|
|
2365
2365
|
const machine_hash = this.machine().sha256; // get the machine hash
|
|
2366
2366
|
|
|
2367
2367
|
const client_hash = this.client().sha256 || false; // get client hash
|
|
2368
|
-
const
|
|
2369
|
-
|
|
2368
|
+
const agent = this.agent();
|
|
2369
|
+
const agent_hash = agent.sha256 || false; // get agent hash
|
|
2370
|
+
const warning = agent.messages.uid_warning || this._messages.uid_warning;
|
|
2371
|
+
|
|
2370
2372
|
const data = {
|
|
2371
2373
|
uid: false,
|
|
2372
2374
|
time,
|
|
@@ -2375,7 +2377,7 @@ class Deva {
|
|
|
2375
2377
|
agent: agent_hash,
|
|
2376
2378
|
core: core_hash,
|
|
2377
2379
|
machine: machine_hash,
|
|
2378
|
-
warning
|
|
2380
|
+
warning,
|
|
2379
2381
|
copyright: this._core.copyright,
|
|
2380
2382
|
}
|
|
2381
2383
|
if (guid) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "44091450722329207445",
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.12.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:44091450722329207445 LICENSE.md",
|