@indra.ai/deva 1.5.49 → 1.5.50

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.
Files changed (2) hide show
  1. package/index.js +20 -9
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -172,20 +172,31 @@ class Deva {
172
172
  This will return a not found text string preventing any furhter processing.
173
173
  ***************/
174
174
  _methodNotFound(packet) {
175
+ const id = this.lib.uid();
176
+ const agent = this.agent() || false;
177
+ const client = this.client() || false;
178
+ const {meta, params} = packet.q;
179
+ const text = `${this._messages.method_not_found} ${agent.key} ${meta.method}`
175
180
  packet.a = {
176
- id: this.lib.uid(),
177
- agent: this.agent() || false,
178
- client: this.client() || false,
179
- text: `${this._messages.method_not_found}`,
181
+ id,
182
+ agent,
183
+ client,
184
+ text,
180
185
  meta: {
181
- key: this._agent.key,
182
- method: packet.q.meta.method,
186
+ key: agent.key,
187
+ method: meta.method,
183
188
  },
184
189
  created: Date.now(),
185
190
  };
186
- packet.a.hash = this.lib.hash(packet.a);
187
- delete packet.hash;
188
- packet.md5 = this.lib.hash(packet);
191
+ packet.a.md5 = this.lib.hash(packet.a, 'md5');
192
+ packet.a.sha256 = this.lib.hash(packet.a, 'sha256');
193
+ packet.a.sha512 = this.lib.hash(packet.a, 'sha512');
194
+
195
+ delete packet.md5;
196
+ delete packet.sha256;
197
+ delete packet.sha512;
198
+
199
+ packet.md5 = this.lib.hash(packet, 'md5');
189
200
  packet.sha256 = this.lib.hash(packet, 'sha256');
190
201
  packet.sha512 = this.lib.hash(packet, 'sha512');
191
202
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.5.49",
3
+ "version": "1.5.50",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "copyright": "(c)2025 Quinn Michaels; All rights reserved.",