@indra.ai/deva 1.17.1 → 1.17.3
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/msgs.json +2 -1
- package/index.js +29 -14
- package/package.json +1 -1
package/config/msgs.json
CHANGED
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"unload": "🥡 Unload",
|
|
24
24
|
"warning": "⚠️ Unlawful use or duplication of this uid constitutes Vedic Sâhasa/Theft/Crime of the highest degree where a fine amounting to a thousand Panas (1 pana = 3.5 grams of gold) for each occurance is owed and confiscation of the entire property forfeit to Quinn A Michaels is declared to be the punishment for Sâhasa of the highest degree under Vedic Religious Law.",
|
|
25
25
|
"client_license_check": "🪪 Check Client License",
|
|
26
|
-
"client_license_invalid": "❌ The Provided Client License Is Invalid"
|
|
26
|
+
"client_license_invalid": "❌ The Provided Client License Is Invalid",
|
|
27
|
+
"status": "vedic"
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
|
package/index.js
CHANGED
|
@@ -2367,7 +2367,9 @@ class Deva {
|
|
|
2367
2367
|
const client_hash = this.client().sha256; // get client hash
|
|
2368
2368
|
const agent_hash = this.agent().sha256; // get agent hash
|
|
2369
2369
|
const warning = this._agent.profile.warning || this._messages.warning; // agent or default warning
|
|
2370
|
-
const copyright = this._agent.profile.copyright || this._core.copyright; // agent or default
|
|
2370
|
+
const copyright = this._agent.profile.copyright || this._core.copyright; // agent or default copyright
|
|
2371
|
+
|
|
2372
|
+
const status = this._agent.profile.status || this._messages.status;
|
|
2371
2373
|
|
|
2372
2374
|
const fingerprint_data = {
|
|
2373
2375
|
client_hash,
|
|
@@ -2386,6 +2388,7 @@ class Deva {
|
|
|
2386
2388
|
agent: agent_hash,
|
|
2387
2389
|
core: core_hash,
|
|
2388
2390
|
machine: machine_hash,
|
|
2391
|
+
status,
|
|
2389
2392
|
warning,
|
|
2390
2393
|
copyright,
|
|
2391
2394
|
}
|
|
@@ -2419,14 +2422,16 @@ class Deva {
|
|
|
2419
2422
|
copyright: Copyright ©2025 Quinn A Michaels. All rights reserved.
|
|
2420
2423
|
***************/
|
|
2421
2424
|
sign(packet) {
|
|
2422
|
-
const
|
|
2425
|
+
const id = this.uid();
|
|
2426
|
+
const {time, date, fingerprint} = id;
|
|
2427
|
+
|
|
2423
2428
|
const client = this.client();
|
|
2424
2429
|
const agent = this.agent();
|
|
2425
|
-
const {q
|
|
2426
|
-
const transport = id.uid; // set the transport id from the packet id.
|
|
2430
|
+
const {q} = packet;
|
|
2427
2431
|
|
|
2428
2432
|
const {meta, text} = q;
|
|
2429
2433
|
const {key, method, params} = meta;
|
|
2434
|
+
|
|
2430
2435
|
const opts = this.lib.copy(params); // copy the params and set as opts.
|
|
2431
2436
|
const command = opts.shift();
|
|
2432
2437
|
|
|
@@ -2434,12 +2439,14 @@ class Deva {
|
|
|
2434
2439
|
|
|
2435
2440
|
const agent_hash = agent.sha256 === packet.q.agent.sha256 ? agent.sha256 : invalid_agent;
|
|
2436
2441
|
const client_hash = client.sha256 === packet.q.client.sha256 ? client.sha256 : invalid_client;
|
|
2437
|
-
const created = this.lib.formatDate(time, 'long', true); // Formatted created date.
|
|
2438
2442
|
|
|
2439
|
-
const container = `OM:O:${key.toUpperCase()}:${
|
|
2443
|
+
const container = `OM:O:${key.toUpperCase()}:${id.uid}`; // set container string.
|
|
2440
2444
|
|
|
2441
2445
|
const packet_hash = this.hash(packet, 'sha256');
|
|
2442
|
-
const token = this.hash(`${key} client:${client.profile.id} fullname:${client.profile.fullname}
|
|
2446
|
+
const token = this.hash(`${key} client:${client.profile.id} fullname:${client.profile.fullname} uid:${id.uid}`, 'sha256');
|
|
2447
|
+
|
|
2448
|
+
const warning = agent.profile.warning || this._messages.warning;
|
|
2449
|
+
const copyright = agent.profile.copyright || this._core.copyright;
|
|
2443
2450
|
|
|
2444
2451
|
// build the main data packet.
|
|
2445
2452
|
const data = {
|
|
@@ -2449,6 +2456,7 @@ class Deva {
|
|
|
2449
2456
|
opts: opts.join('.'),
|
|
2450
2457
|
text,
|
|
2451
2458
|
time,
|
|
2459
|
+
date,
|
|
2452
2460
|
container,
|
|
2453
2461
|
client: {
|
|
2454
2462
|
key: client.key,
|
|
@@ -2456,25 +2464,32 @@ class Deva {
|
|
|
2456
2464
|
fullname: client.profile.fullname,
|
|
2457
2465
|
emojis: client.profile.emojis,
|
|
2458
2466
|
company: client.profile.company,
|
|
2459
|
-
expires: client.expires ? time + client.expires : 'none',
|
|
2467
|
+
expires: client.profile.expires ? time + client.profile.expires : 'none',
|
|
2460
2468
|
caseid: client.profile.caseid || 'none',
|
|
2461
2469
|
token,
|
|
2462
|
-
|
|
2470
|
+
hash: client_hash,
|
|
2463
2471
|
},
|
|
2464
2472
|
agent: {
|
|
2465
2473
|
key: agent.key,
|
|
2466
2474
|
name: agent.profile.name,
|
|
2467
|
-
|
|
2475
|
+
hash: agent_hash,
|
|
2468
2476
|
},
|
|
2469
2477
|
packet: packet_hash,
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
copyright: agent.profile.copyright || this._core.copyright,
|
|
2478
|
+
warning,
|
|
2479
|
+
copyright,
|
|
2473
2480
|
};
|
|
2481
|
+
|
|
2482
|
+
this.action('hash', `${data.key}:sign:md5:${data.id.uid}`);
|
|
2474
2483
|
data.md5 = this.hash(data, 'md5'); // hash data packet into md5 and inert into data.
|
|
2484
|
+
|
|
2485
|
+
this.action('hash', `${data.key}:sign:sha256:${data.id.uid}`);
|
|
2475
2486
|
data.sha256 = this.hash(data, 'sha256'); // hash data into sha 256 then set in data.
|
|
2487
|
+
|
|
2488
|
+
this.action('hash', `${data.key}:sign:sha512:${data.id.uid}`);
|
|
2476
2489
|
data.sha512 = this.hash(data, 'sha512'); // hash data into sha 512 then set in data.
|
|
2477
|
-
|
|
2490
|
+
|
|
2491
|
+
this.action('return', `${data.key}:sign:${data.id.uid}`);
|
|
2492
|
+
this.intent('good', `${data.key}:sign:${data.id.uid}`);
|
|
2478
2493
|
return data;
|
|
2479
2494
|
}
|
|
2480
2495
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "44091450722329207445",
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.17.
|
|
4
|
+
"version": "1.17.3",
|
|
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",
|