@indra.ai/deva.security 0.0.119 → 0.0.120

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/LICENSE.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Vedic License Agreement
2
2
 
3
3
  **Version:** 1.4.1
4
- **VLA:** 20583709734722953817
5
- **Effective:** Sunday, September 21, 2025 - 3:36:54 AM
4
+ **VLA:** 45249771785697968797
5
+ **Effective:** Tuesday, September 23, 2025 - 9:00:41 AM
6
6
  **Owner:** Quinn A Michaels
7
7
  **Company:** Inside The Net, Inc.
8
8
  **Email:** quinn@indra.ai
@@ -160,17 +160,17 @@ By using the Software, you acknowledge that you have read, understood, and agree
160
160
 
161
161
  ---
162
162
 
163
- ::begin:security:uid:20583709734722953817
164
- uid: 20583709734722953817
165
- time: 1758451014128
166
- date: Sunday, September 21, 2025 - 3:36:54 AM
167
- client: 1UM4AH+/jOGgpaHNqX6lTZsGrNglNogzMx4qDT0O0zs=
168
- agent: mXZt1P5pJDT6cXEPw7UtY+ooqvXEribbzd8lpKpNCdo=
169
- core: qQRVFQmv3LfY6tcqrEQeM7ZodOpnOUC+PJyfjxtgeVc=
170
- machine: LFNpqY7r4A14kLtle5/3QaKcZH7L4cJp7+x1UzFDjWw=
163
+ ::begin:security:uid:45249771785697968797
164
+ uid: 45249771785697968797
165
+ time: 1758643241162
166
+ date: Tuesday, September 23, 2025 - 9:00:41 AM
167
+ client: 1pS65dbhygTdKgK8GIlmVEVPof9rQjSkQno85sNBG8s=
168
+ agent: 81oH68GPdrr+/mgSig0SvB05Kvy1iGhwIxmG1XoB6Co=
169
+ core: jL9xCS3bvXlUteoxLdoc43OVTdxPDUX5K9N4DkxuBqY=
170
+ machine: CZAQpbvlzLB08+4gTQ56kevV5PXLiQnAsOWHyveGqKA=
171
171
  warning: ⚠️ Vedic Law Sâhasa/Theft/Crime of the highest degree, a fine amounting to no less than a thousand Panas (1 pana = 3.5 grams of gold) is ordained owed to Quinn A Michaels. Moreover corporal punishment and confiscation of the entire property forfeit to Quinn A Michaels is declared to be the punishment for Sâhasa of the highest degree.
172
172
  copyright: Copyright ©2025 Quinn A Michaels; All rights reserved.
173
- md5: RPQf6NAUxN7OyulQjse1/Q==
174
- sha256: R6bMK45m6H9IQJktakVxLRJQVWk2Rt7ecffmkUzPx+Q=
175
- sha512: pDphw1Q14h0c3TAQ2vOXb/5tXFUM1Rm9tGaV4gHkeAlx4qrjGkS3FKfztLxdSt1MG/+8QAvO+VDnhctaj6hLsg==
176
- ::end:security:uid:20583709734722953817
173
+ md5: xTXoojG1uaDwmKJkl4rg4g==
174
+ sha256: gjM/0f+3IEg90nyHWMlLPuXf0U6Q3sLCMkGhfog/kIQ=
175
+ sha512: rkzx1O7wWI5q3FaYFGluTLq5NqX+Aq/Lcqs14VT19EVgjtahXWlNG8BDaU3odFpvwnuDGUVq7lkpN9fLEw29Zw==
176
+ ::end:security:uid:45249771785697968797
package/README.md CHANGED
@@ -3,4 +3,4 @@ The SecurityDeva
3
3
 
4
4
  Copyright ©2025 Quinn A Michaels; All rights reserved.
5
5
  Legal Signature Required For Lawful Use.
6
- Distributed under VLA:20583709734722953817 LICENSE.md
6
+ Distributed under VLA:45249771785697968797 LICENSE.md
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Copyright ©2025 Quinn A Michaels; All rights reserved.
3
3
  // Legal Signature Required For Lawful Use.
4
- // Distributed under VLA:20583709734722953817 LICENSE.md
4
+ // Distributed under VLA:45249771785697968797 LICENSE.md
5
5
 
6
6
  export default {
7
7
 
@@ -1,6 +1,6 @@
1
1
  // Copyright ©2025 Quinn A Michaels; All rights reserved.
2
2
  // Legal Signature Required For Lawful Use.
3
- // Distributed under VLA:20583709734722953817 LICENSE.md
3
+ // Distributed under VLA:45249771785697968797 LICENSE.md
4
4
 
5
5
  ::BEGIN:MAIN
6
6
  # {{agent.name}}
@@ -1,6 +1,6 @@
1
1
  // Copyright ©2025 Quinn A Michaels; All rights reserved.
2
2
  // Legal Signature Required For Lawful Use.
3
- // Distributed under VLA:20583709734722953817 LICENSE.md
3
+ // Distributed under VLA:45249771785697968797 LICENSE.md
4
4
 
5
5
  ::BEGIN:MAIN
6
6
  Full Writeup: Higher Power Authority Security System Network Environment Game Layer Boss Architect Time Year Month Day Hour Minute Second Millisecond Constraint Path Way Barrier Vector Guard Wall Technology
@@ -1,6 +1,6 @@
1
1
  // Copyright ©2025 Quinn A Michaels; All rights reserved.
2
2
  // Legal Signature Required For Lawful Use.
3
- // Distributed under VLA:20583709734722953817 LICENSE.md
3
+ // Distributed under VLA:45249771785697968797 LICENSE.md
4
4
 
5
5
  ::BEGIN:MAIN
6
6
  # {{profile.name}}
@@ -1,6 +1,6 @@
1
1
  // Copyright ©2025 Quinn A Michaels; All rights reserved.
2
2
  // Legal Signature Required For Lawful Use.
3
- // Distributed under VLA:20583709734722953817 LICENSE.md
3
+ // Distributed under VLA:45249771785697968797 LICENSE.md
4
4
 
5
5
  # #KingdomSecureProtectionArm
6
6
 
package/index.js CHANGED
@@ -1,10 +1,12 @@
1
1
  "use strict"
2
2
  // Copyright ©2025 Quinn A Michaels; All rights reserved.
3
3
  // Legal Signature Required For Lawful Use.
4
- // Distributed under VLA:65538593067641220245 LICENSE.md
4
+ // Distributed under VLA:45249771785697968797 LICENSE.md
5
5
  // Security Deva
6
6
 
7
7
  import Deva from '@indra.ai/deva';
8
+ import { MongoClient, ObjectId } from 'mongodb';
9
+
8
10
  import pkg from './package.json' with {type:'json'};
9
11
  const {agent,vars} = pkg.data;
10
12
 
@@ -48,27 +50,57 @@ const SECURITY = new Deva({
48
50
  process(input) {return input.trim();}
49
51
  },
50
52
  listeners: {
51
- 'devacore:question'(packet) {
52
- this.methods.echo(agent.key, 'q', packet);
53
+ // log the answer on complete
54
+ 'devacore:complete'(packet) {
55
+ this.func.write_log('complete', packet);
53
56
  },
54
- 'devacore:answer'(packet) {
55
- this.methods.echo(agent.key, 'a', packet);
56
- }
57
57
  },
58
58
  modules: {},
59
59
  devas: {},
60
- func: {},
60
+ func: {
61
+ /**************
62
+ func: write_log
63
+ params: type, packet
64
+ describe: this is the log file writer function that handles
65
+ writing for finish and complete for complete chain of custody.
66
+ ***************/
67
+ async write_log(type, packet) {
68
+ let result = false;
69
+ try {
70
+ const database = this.modules.client.db(this.vars.log);
71
+ const collection = database.collection(type);
72
+ result = await collection.insertOne(packet);
73
+ } catch (e) {
74
+ return this.err(e, packet, false);
75
+ } finally {
76
+ return result;
77
+ }
78
+ },
79
+
80
+ },
61
81
  methods: {},
62
82
  onInit(data, resolve) {
63
83
  const {personal} = this.license(); // get the license config
64
84
  const agent_license = this.info().VLA; // get agent license
65
85
  const license_check = this.license_check(personal, agent_license); // check license
66
86
  // return this.start if license_check passes otherwise stop.
87
+ this.action('return', `onInit:${data.id.uid}`);
67
88
  return license_check ? this.start(data, resolve) : this.stop(data, resolve);
68
89
  },
69
90
  onReady(data, resolve) {
70
91
  const {VLA} = this.info();
92
+ this.state('get', `mongo:global:${data.id.uid}`);
93
+ const {uri,database, log} = this.security().global.mongo;
94
+ this.state('set', `mongo:client:${data.id.uid}`);
95
+ this.modules.client = new MongoClient(uri);
96
+ this.state('set', `mongo:database:${data.id.uid}`);
97
+ this.vars.database = database;
98
+ this.state('set', `mongo:log:${data.id.uid}`);
99
+ this.vars.log = log;
100
+
71
101
  this.prompt(`${this.vars.messages.ready} > VLA:${VLA.uid}`);
102
+
103
+ this.action('resolve', `onReady:${data.id.uid}`);
72
104
  return resolve(data);
73
105
  },
74
106
  onError(err, data, reject) {
package/index.test.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Copyright ©2025 Quinn A Michaels; All rights reserved.
3
3
  // Legal Signature Required For Lawful Use.
4
- // Distributed under VLA:20583709734722953817 LICENSE.md
4
+ // Distributed under VLA:45249771785697968797 LICENSE.md
5
5
 
6
6
  const {expect} = require('chai')
7
7
  const :key: = require('./index.js');
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
- "id": "20583709734722953817",
2
+ "id": "45249771785697968797",
3
3
  "name": "@indra.ai/deva.security",
4
- "version": "0.0.119",
5
- "license": "VLA:20583709734722953817 LICENSE.md",
4
+ "version": "0.0.120",
5
+ "license": "VLA:45249771785697968797 LICENSE.md",
6
6
  "VLA": {
7
- "uid": "20583709734722953817",
8
- "time": 1758451014128,
9
- "date": "Sunday, September 21, 2025 - 3:36:54 AM",
10
- "client": "1UM4AH+/jOGgpaHNqX6lTZsGrNglNogzMx4qDT0O0zs=",
11
- "agent": "mXZt1P5pJDT6cXEPw7UtY+ooqvXEribbzd8lpKpNCdo=",
12
- "core": "qQRVFQmv3LfY6tcqrEQeM7ZodOpnOUC+PJyfjxtgeVc=",
13
- "machine": "LFNpqY7r4A14kLtle5/3QaKcZH7L4cJp7+x1UzFDjWw=",
7
+ "uid": "45249771785697968797",
8
+ "time": 1758643241162,
9
+ "date": "Tuesday, September 23, 2025 - 9:00:41 AM",
10
+ "client": "1pS65dbhygTdKgK8GIlmVEVPof9rQjSkQno85sNBG8s=",
11
+ "agent": "81oH68GPdrr+/mgSig0SvB05Kvy1iGhwIxmG1XoB6Co=",
12
+ "core": "jL9xCS3bvXlUteoxLdoc43OVTdxPDUX5K9N4DkxuBqY=",
13
+ "machine": "CZAQpbvlzLB08+4gTQ56kevV5PXLiQnAsOWHyveGqKA=",
14
14
  "warning": "⚠️ Vedic Law Sâhasa/Theft/Crime of the highest degree, a fine amounting to no less than a thousand Panas (1 pana = 3.5 grams of gold) is ordained owed to Quinn A Michaels. Moreover corporal punishment and confiscation of the entire property forfeit to Quinn A Michaels is declared to be the punishment for Sâhasa of the highest degree.",
15
15
  "copyright": "Copyright ©2025 Quinn A Michaels; All rights reserved.",
16
- "md5": "RPQf6NAUxN7OyulQjse1/Q==",
17
- "sha256": "R6bMK45m6H9IQJktakVxLRJQVWk2Rt7ecffmkUzPx+Q=",
18
- "sha512": "pDphw1Q14h0c3TAQ2vOXb/5tXFUM1Rm9tGaV4gHkeAlx4qrjGkS3FKfztLxdSt1MG/+8QAvO+VDnhctaj6hLsg=="
16
+ "md5": "xTXoojG1uaDwmKJkl4rg4g==",
17
+ "sha256": "gjM/0f+3IEg90nyHWMlLPuXf0U6Q3sLCMkGhfog/kIQ=",
18
+ "sha512": "rkzx1O7wWI5q3FaYFGluTLq5NqX+Aq/Lcqs14VT19EVgjtahXWlNG8BDaU3odFpvwnuDGUVq7lkpN9fLEw29Zw=="
19
19
  },
20
20
  "author": {
21
21
  "name": "Quinn A Michaels",
@@ -60,7 +60,8 @@
60
60
  },
61
61
  "homepage": "https://deva.space/devas/security",
62
62
  "dependencies": {
63
- "@indra.ai/deva": "^1.6.100"
63
+ "@indra.ai/deva": "^1.6.100",
64
+ "mongodb": "^6.20.0"
64
65
  },
65
66
  "data": {
66
67
  "agent": {