@indra.ai/deva 1.5.49 → 1.5.51
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 +22 -10
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -172,24 +172,36 @@ class Deva {
|
|
|
172
172
|
This will return a not found text string preventing any furhter processing.
|
|
173
173
|
***************/
|
|
174
174
|
_methodNotFound(packet) {
|
|
175
|
+
if (!this._active) return this._messages.offline; // check the active status
|
|
176
|
+
const id = this.lib.uid();
|
|
177
|
+
const agent = this.agent() || false;
|
|
178
|
+
const client = this.client() || false;
|
|
179
|
+
const {meta, params} = packet.q;
|
|
180
|
+
const text = `${this._messages.method_not_found} ${agent.key} ${meta.method}`
|
|
175
181
|
packet.a = {
|
|
176
|
-
id
|
|
177
|
-
agent
|
|
178
|
-
client
|
|
179
|
-
text
|
|
182
|
+
id,
|
|
183
|
+
agent,
|
|
184
|
+
client,
|
|
185
|
+
text,
|
|
180
186
|
meta: {
|
|
181
|
-
key:
|
|
182
|
-
method:
|
|
187
|
+
key: agent.key,
|
|
188
|
+
method: meta.method,
|
|
183
189
|
},
|
|
184
190
|
created: Date.now(),
|
|
185
191
|
};
|
|
186
|
-
packet.a.
|
|
187
|
-
|
|
188
|
-
packet.
|
|
192
|
+
packet.a.md5 = this.lib.hash(packet.a, 'md5');
|
|
193
|
+
packet.a.sha256 = this.lib.hash(packet.a, 'sha256');
|
|
194
|
+
packet.a.sha512 = this.lib.hash(packet.a, 'sha512');
|
|
195
|
+
|
|
196
|
+
delete packet.md5;
|
|
197
|
+
delete packet.sha256;
|
|
198
|
+
delete packet.sha512;
|
|
199
|
+
|
|
200
|
+
packet.md5 = this.lib.hash(packet, 'md5');
|
|
189
201
|
packet.sha256 = this.lib.hash(packet, 'sha256');
|
|
190
202
|
packet.sha512 = this.lib.hash(packet, 'sha512');
|
|
191
203
|
|
|
192
|
-
this.state('invalid', `${
|
|
204
|
+
this.state('invalid', `${meta.method}:${packet.id}`);
|
|
193
205
|
return packet;
|
|
194
206
|
}
|
|
195
207
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indra.ai/deva",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.51",
|
|
4
4
|
"description": "The Deva Core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"copyright": "(c)2025 Quinn Michaels; All rights reserved.",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"online": "🤩 Online",
|
|
120
120
|
"offline": "😴 Offline",
|
|
121
121
|
"active": "😀 Active",
|
|
122
|
-
"inactive": "
|
|
122
|
+
"inactive": "🥱 Inactive",
|
|
123
123
|
"idle": "🚘 Idle",
|
|
124
124
|
"talk": "📢 Talk",
|
|
125
125
|
"listen": "👂 Listen",
|