@indra.ai/deva 1.53.1 → 1.54.0
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 +8 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -824,15 +824,15 @@ class Deva {
|
|
|
824
824
|
// if: isAsk wait for the once event which is key'd to the packet ID for specified responses
|
|
825
825
|
this.action('ask', `${key}:${id.uid}`);
|
|
826
826
|
this.intent('good', `ask:${key}:${id.uid}`);
|
|
827
|
-
this.talk(`${key}:ask`, this.lib.copy(packet));
|
|
828
827
|
this.once(`${key}:ask:${packet.id.uid}`, answer => {
|
|
829
828
|
this.action('talk', `${this._events.ask}:${id.uid}`);
|
|
830
|
-
this.intent('good', `${this.
|
|
829
|
+
this.intent('good', `${this._events.ask}:${id.uid}`);
|
|
831
830
|
this.talk(this._events.ask, this.lib.copy(answer));
|
|
832
831
|
this.action('return', `finish:${key}:ask:${id.uid}`);
|
|
833
832
|
this.intent('good', `finish:${method}:${id.uid}`);
|
|
834
833
|
return this.finish(answer, resolve); // if:isAsk resolve the answer from the call
|
|
835
834
|
});
|
|
835
|
+
this.talk(`${key}:ask`, this.lib.copy(packet));
|
|
836
836
|
}
|
|
837
837
|
else { // else: answer the question locally
|
|
838
838
|
this.state('answer', `${method}:${id.uid}`); //set the answer state to the method
|
|
@@ -1043,9 +1043,9 @@ class Deva {
|
|
|
1043
1043
|
this.action('hash', `${key}:${method}:packet:sha512:${packet.id.uid}`);
|
|
1044
1044
|
packet.sha512 = this.hash(packet, 'sha512');
|
|
1045
1045
|
|
|
1046
|
-
this.action('talk', `${this.
|
|
1047
|
-
this.state('valid', `${this.
|
|
1048
|
-
this.intent('good', `${this.
|
|
1046
|
+
this.action('talk', `${this._events.answer}:${key}:${method}:${packet.id.uid}`);
|
|
1047
|
+
this.state('valid', `${this._events.answer}:${key}:${method}:${packet.id.uid}`);
|
|
1048
|
+
this.intent('good', `${this._events.answer}:${key}:${method}:${packet.id.uid}`);
|
|
1049
1049
|
this.talk(this._events.answer, this.lib.copy(packet)); // global talk event
|
|
1050
1050
|
|
|
1051
1051
|
this.action('talk', `${agent.key}:${key}:${method}:${packet.id.uid}`);
|
|
@@ -1340,8 +1340,9 @@ class Deva {
|
|
|
1340
1340
|
return new Promise((resolve, reject) => {
|
|
1341
1341
|
try {
|
|
1342
1342
|
this.state('set', `${key}:agent:${id.uid}`); // state stop agent
|
|
1343
|
-
const
|
|
1344
|
-
const
|
|
1343
|
+
const agentData = this.agent();
|
|
1344
|
+
const agent = agentData.sha256; // get the current agent
|
|
1345
|
+
const value = agentData.key;
|
|
1345
1346
|
|
|
1346
1347
|
this.state('set', `${key}:client:${id.uid}`); // state stop agent
|
|
1347
1348
|
const client = this.client().sha256; // set the current client
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "23221940810208468106",
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.54.0",
|
|
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:23221940810208468106 LICENSE.md",
|