@indra.ai/deva.license 0.3.0 → 0.3.2

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,15 +1,15 @@
1
1
  # Vedic License Agreement
2
2
 
3
3
  **Version:** 1.4.1
4
- **VLA:** 41853176043929172482
5
- **Effective:** Friday, October 10, 2025 - 6:25:40 PM
4
+ **VLA:** 38411800854088090659
5
+ **Effective:** Saturday, September 13, 2025 - 10:58:44 AM
6
6
  **Owner:** Quinn A Michaels
7
7
  **Company:** Inside The Net, Inc.
8
8
  **Email:** quinn@indra.ai
9
9
  **Link:** https://indra.ai
10
10
  **Copyright:** Copyright ©2025 Quinn A Michaels; All rights reserved.
11
11
 
12
- This license agreement (“Agreement”) governs the use of the FBI Deva (“Software”). By accessing or using the Software, you agree to the terms and conditions set forth below. If you do not agree, you are prohibited from using the Software.
12
+ This license agreement (“Agreement”) governs the use of the License Deva (“Software”). By accessing or using the Software, you agree to the terms and conditions set forth below. If you do not agree, you are prohibited from using the Software.
13
13
 
14
14
  ## Ownership
15
15
 
@@ -161,18 +161,17 @@ By using the Software, you acknowledge that you have read, understood, and agree
161
161
 
162
162
  ---
163
163
 
164
- ::begin:security:uid:41853176043929172482
165
- uid: 41853176043929172482
166
- time: 1760145940393
167
- date: Friday, October 10, 2025 - 6:25:40 PM
168
- client: YU6ZN7+9fnPPRFZ8CX4bP46uoWUSyqddILT6l6xeIVI=
169
- agent: MIv9DV755VnJwBWLH7OahMQs1u4KRsFVtJWR5hgdFwQ=
170
- core: DeOotMuPqb0vN7pGlyxw8G+o0tjqHyZRJXxPZlIlYVM=
171
- machine: fV7Bz2iEvhdYza5hHycigAhwAppckJFYttIZbs7acPo=
172
- 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.
164
+ ::begin:license:uid:38411800854088090659
165
+ uid: 38411800854088090659
166
+ time: 1758409827295
167
+ date: Saturday, September 20, 2025 - 4:10:27 PM
168
+ client: 1UM4AH+/jOGgpaHNqX6lTZsGrNglNogzMx4qDT0O0zs=
169
+ agent: Mn1N8WydRr5tm9dfBr2l3rrYXkHcRa9EsTs8u3dTXb4=
170
+ core: qQRVFQmv3LfY6tcqrEQeM7ZodOpnOUC+PJyfjxtgeVc=
171
+ machine: XoZigRTA1K5WamjzU4DcPCIATppd6U5al50uBwQ4dNE=
172
+ 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.
173
173
  copyright: Copyright ©2025 Quinn A Michaels; All rights reserved.
174
- md5: Aw80V7l3hXC28hXXWMhlhQ==
175
- sha256: IsrfGg2TAbgGDApEaySW/lN0YOMyCwYgMX/h5zrphoM=
176
- sha512: JRG4/lhEaS2z0W8U89s4WuyF6nUrKLIzOxAilZp4mPFQfAlPzklI/R7khRFg4CBU6f7tXTjNdpYrfjS5IU0K7g==
177
- ::end:security:uid:41853176043929172482
178
- ::begin:security:uid:json:41853176043929172482
174
+ md5: 06ZLEqOD2WX+5jEM9Qhdcg==
175
+ sha256: MrwESmIhI/5YHcz7hYkkMCmHKAZ+6W2jNBwqgoD0tDQ=
176
+ sha512: aowVhXwnYvBYt2F39bstSKKBYd3mgyZPTzJ2ffqQvJ7cBHkEYFWhRwAkuihjZVPwcdkZ5pFb0yexn1ZUnjc+6A==
177
+ ::end:license:uid:38411800854088090659
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
- # deva.fbi
2
- The FBI Deva a prototype Deva that is not official or supported by the FBI but meant to provide a FBI VLA prototype for demonstration purposes only at this time.
1
+ # deva.license
2
+ The License Deva
3
3
 
4
4
 
5
5
  Copyright ©2025 Quinn A Michaels; All rights reserved.
6
6
  Legal Signature Required For Lawful Use.
7
- Distributed under VLA:41853176043929172482 LICENSE.md
7
+ Distributed under VLA:69323297767269114978 LICENSE.md
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // Copyright ©2025 Quinn A Michaels; All rights reserved.
3
+ // Legal Signature Required For Lawful Use.
4
+ // Distributed under VLA:38411800854088090659 LICENSE.md
5
+
6
+ export default {
7
+ async license(packet) {
8
+ const license = await this.methods.sign('license', 'default', packet);
9
+ return license;
10
+ },
11
+ };
@@ -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:41853176043929172482 LICENSE.md
3
+ // Distributed under VLA:38411800854088090659 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:41853176043929172482 LICENSE.md
3
+ // Distributed under VLA:38411800854088090659 LICENSE.md
4
4
 
5
5
  ::BEGIN:MAIN
6
6
  # {{profile.name}}
package/index.js CHANGED
@@ -1,10 +1,11 @@
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:41853176043929172482 LICENSE.md
4
+ // Distributed under VLA:38411800854088090659 LICENSE.md
5
5
 
6
6
  // License Deva is responsible for the Vedic Tradition Laws.
7
7
  import Deva from '@indra.ai/deva';
8
+ import { MongoClient, ObjectId } from 'mongodb';
8
9
 
9
10
  import pkg from './package.json' with {type:'json'};
10
11
  const {agent,vars} = pkg.data;
@@ -29,7 +30,7 @@ const info = {
29
30
  copyright: pkg.copyright,
30
31
  };
31
32
 
32
- const FBI = new Deva({
33
+ const LICENSE = new Deva({
33
34
  info,
34
35
  agent,
35
36
  vars,
@@ -39,9 +40,173 @@ const FBI = new Deva({
39
40
  process(input) {return input.trim();}
40
41
  },
41
42
  listeners: {},
42
- modules: {},
43
- func: {},
44
- methods: {},
43
+ modules: {
44
+ client: false,
45
+ },
46
+ deva: {},
47
+ func: {
48
+ /**************
49
+ func: insert
50
+ params: opts
51
+ describe: the insert function that inserts into the specified collection.
52
+ ***************/
53
+ async insert(opts) {
54
+ this.action('func', `insert`);
55
+ let result = false;
56
+ try {
57
+ this.state('insert', opts.collection);
58
+ await this.modules.client.connect(); // connect to the database client.
59
+ const db = this.modules.client.db(this.vars.database); // set the database to use
60
+ result = await db.collection(opts.collection).insertOne(opts.data); // insert the data
61
+ } finally {
62
+ await this.modules.client.close(); // close the connection when done
63
+ this.state('return', 'insert');
64
+ return result; // return the result to the requestor.
65
+ }
66
+ },
67
+
68
+ /**************
69
+ func: update
70
+ params: opts
71
+ describe: the update function that update into the specified collection.
72
+ ***************/
73
+ async update(opts) {
74
+ this.action('func', 'update');
75
+ let result = false;
76
+ try {
77
+ this.state('update', opts.collection);
78
+ await this.modules.client.connect(); // connect to the database client.
79
+ const db = this.modules.client.db(this.vars.database); // set the database to use
80
+ result = await db.collection(opts.collection).updateOne(
81
+ { _id: new ObjectId(`${opts.id}`) },
82
+ { $set: opts.data }
83
+ ); // insert the data
84
+ } finally {
85
+ await this.modules.client.close(); // close the connection when done
86
+ this.state('return', 'update');
87
+ return result; // return the result to the requestor.
88
+ }
89
+ },
90
+ /**************
91
+ func: search
92
+ params: obj - the search object
93
+ describe: return a search from the database collection.
94
+ ***************/
95
+ async search(opts) {
96
+ this.action('func', 'search');
97
+ let result = false;
98
+ const {collection,limit} = this.vars.laws;
99
+ try {
100
+ this.state('search', opts.text);
101
+ await this.modules.client.connect();
102
+ const db = this.modules.client.db(this.vars.database);
103
+ const table = db.collection(collection);
104
+
105
+ // await table.dropIndex('a_text_q_text');
106
+ const idx = await table.listIndexes().toArray();
107
+ const hasIdx = idx.find(i => i.name === this.vars.laws.index) ? true : false;
108
+
109
+ if (!hasIdx) {
110
+ const newIdx = await table.createIndex({"content": "text"}, {name: this.vars.laws.index});
111
+ }
112
+
113
+ const query = {$text:{$search:opts.text}};
114
+ const projection = {
115
+ _id: 0,
116
+ content: 1,
117
+ score: { $meta: "textScore" }
118
+ };
119
+ result = await table.find(query).project(projection).limit(limit).toArray();
120
+ } finally {
121
+ await this.modules.client.close();
122
+ this.state('return', 'search');
123
+ return result;
124
+ }
125
+ },
126
+ },
127
+ methods: {
128
+ /**************
129
+ method: add
130
+ params: packet
131
+ describe: add data to the knowledge base
132
+ example: #legal add:[id] [content to store in memory]
133
+ params[1] is the law id to update blank if new.
134
+ ***************/
135
+ add(packet) {
136
+ this.context('add', `law: ${packet.q.meta.params[1]}`);
137
+
138
+ return new Promise((resolve, reject) => {
139
+ if (!packet.q.text) return resolve(this._messages.notext);
140
+ this.vars.laws.content = packet.q.text; // store text in local
141
+
142
+ const {meta, text} = packet.q;
143
+ let func = 'insert', id = false;
144
+ const {collection, content} = this.vars.laws;
145
+ const data = {content};
146
+
147
+ // if param[1] id is found then update record
148
+ if (meta.params[1]) {
149
+ id = meta.params[1];
150
+ func = 'update';
151
+ data.modified = Date.now();
152
+ }
153
+ else {
154
+ data.modified = null;
155
+ data.created = Date.now();
156
+ }
157
+
158
+ this.func[func]({id,collection,data}).then(ins => {
159
+ this.state('resolve', 'add');
160
+ return resolve({
161
+ text: `id: ${ins.insertedId || id}`,
162
+ html: `id: ${ins.insertedId || id}`,
163
+ data: `${ins.insertedId || id}`,
164
+ });
165
+ }).catch(err => {
166
+ this.state('reject', 'add');
167
+ return this.error(err, packet, reject);
168
+ });
169
+ });
170
+ },
171
+ /**************
172
+ method: search
173
+ params: packet
174
+ describe: get history
175
+ ***************/
176
+ search(packet) {
177
+ this.context('search', packet.q.text);
178
+ this.action('method', `search:${packet.q.text}`);
179
+ const data = {};
180
+ return new Promise((resolve, reject) => {
181
+ if (!packet.q.text) return resolve(this._messages.notext);
182
+ const {params} = packet.q.meta;
183
+ if (params[1]) this.vars.laws.limit = packet.q.meta.params[1];
184
+
185
+ this.func.search(packet.q).then(search => {
186
+ data.search = search;
187
+ this.state('resolve', `search:${packet.q.text}`);
188
+ const search_text = search.map(itm => {return `law: ${itm.content}`}).join('\n');
189
+ const search_box = [
190
+ `::begin:search:${packet.id}`,
191
+ search_text,
192
+ `::end:search:${this.lib.hash(search_text)}`,
193
+ ].join('\n');
194
+ return this.question(`${this.askChr}feecting parse ${search_box}`);
195
+ }).then(feecting => {
196
+ data.feecting = feecting.a.data;
197
+ this.state('resolve', 'search');
198
+ return resolve({
199
+ text: feecting.a.text,
200
+ html: feecting.a.html,
201
+ data,
202
+ });
203
+ }).catch(err => {
204
+ this.state('reject', 'search');
205
+ return this.error(packet, err, reject);
206
+ });
207
+ });
208
+ },
209
+ },
45
210
  onInit(data, resolve) {
46
211
  const {personal} = this.license(); // get the license config
47
212
  const agent_license = this.info().VLA; // get agent license
@@ -53,6 +218,11 @@ const FBI = new Deva({
53
218
  const {concerns, global} = this.license(); // get the license config
54
219
  const {VLA} = this.info();
55
220
 
221
+ const {uri,database} = global.mongo; // set the datase
222
+
223
+ this.modules.client = new MongoClient(uri); // set the client module for the database.
224
+ this.vars.database = database; // set the database into the local vars
225
+
56
226
  this.prompt(`${this.vars.messages.ready} > VLA:${VLA.uid}`);
57
227
  return resolve(data); // resolve data.
58
228
  },
@@ -61,4 +231,4 @@ const FBI = new Deva({
61
231
  console.log(err);
62
232
  },
63
233
  });
64
- export default FBI
234
+ export default LICENSE
package/index.test.js CHANGED
@@ -1,21 +1,21 @@
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:41853176043929172482 LICENSE.md
4
+ // Distributed under VLA:38411800854088090659 LICENSE.md
5
5
 
6
6
  const {expect} = require('chai')
7
- const FBIDeva = require('./index.js');
7
+ const LegalDeva = require('./index.js');
8
8
 
9
- describe(FBIDeva.me.name, () => {
9
+ describe(LegalDeva.me.name, () => {
10
10
  beforeEach(() => {
11
- return FBIDeva.init()
11
+ return LegalDeva.init()
12
12
  });
13
13
  it('Check the DEVA Object', () => {
14
- expect(FBIDeva).to.be.an('object');
15
- expect(FBIDeva).to.have.property('agent');
16
- expect(FBIDeva).to.have.property('vars');
17
- expect(FBIDeva).to.have.property('listeners');
18
- expect(FBIDeva).to.have.property('methods');
19
- expect(FBIDeva).to.have.property('modules');
14
+ expect(LegalDeva).to.be.an('object');
15
+ expect(LegalDeva).to.have.property('agent');
16
+ expect(LegalDeva).to.have.property('vars');
17
+ expect(LegalDeva).to.have.property('listeners');
18
+ expect(LegalDeva).to.have.property('methods');
19
+ expect(LegalDeva).to.have.property('modules');
20
20
  });
21
21
  })
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
- "id": "41853176043929172482",
2
+ "id": "38411800854088090659",
3
3
  "name": "@indra.ai/deva.license",
4
- "version": "0.3.0",
5
- "license": "VLA:41853176043929172482 LICENSE.md",
4
+ "version": "0.3.2",
5
+ "license": "VLA:38411800854088090659 LICENSE.md",
6
6
  "VLA": {
7
- "uid": "41853176043929172482",
8
- "time": 1760145940393,
9
- "date": "Friday, October 10, 2025 - 6:25:40 PM",
10
- "client": "YU6ZN7+9fnPPRFZ8CX4bP46uoWUSyqddILT6l6xeIVI=",
11
- "agent": "MIv9DV755VnJwBWLH7OahMQs1u4KRsFVtJWR5hgdFwQ=",
12
- "core": "DeOotMuPqb0vN7pGlyxw8G+o0tjqHyZRJXxPZlIlYVM=",
13
- "machine": "fV7Bz2iEvhdYza5hHycigAhwAppckJFYttIZbs7acPo=",
7
+ "uid": "38411800854088090659",
8
+ "time": 1758409827295,
9
+ "date": "Saturday, September 20, 2025 - 4:10:27 PM",
10
+ "client": "1UM4AH+/jOGgpaHNqX6lTZsGrNglNogzMx4qDT0O0zs=",
11
+ "agent": "Mn1N8WydRr5tm9dfBr2l3rrYXkHcRa9EsTs8u3dTXb4=",
12
+ "core": "qQRVFQmv3LfY6tcqrEQeM7ZodOpnOUC+PJyfjxtgeVc=",
13
+ "machine": "XoZigRTA1K5WamjzU4DcPCIATppd6U5al50uBwQ4dNE=",
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": "Aw80V7l3hXC28hXXWMhlhQ==",
17
- "sha256": "IsrfGg2TAbgGDApEaySW/lN0YOMyCwYgMX/h5zrphoM=",
18
- "sha512": "JRG4/lhEaS2z0W8U89s4WuyF6nUrKLIzOxAilZp4mPFQfAlPzklI/R7khRFg4CBU6f7tXTjNdpYrfjS5IU0K7g=="
16
+ "md5": "06ZLEqOD2WX+5jEM9Qhdcg==",
17
+ "sha256": "MrwESmIhI/5YHcz7hYkkMCmHKAZ+6W2jNBwqgoD0tDQ=",
18
+ "sha512": "aowVhXwnYvBYt2F39bstSKKBYd3mgyZPTzJ2ffqQvJ7cBHkEYFWhRwAkuihjZVPwcdkZ5pFb0yexn1ZUnjc+6A=="
19
19
  },
20
20
  "author": {
21
21
  "name": "Quinn A Michaels",
@@ -34,7 +34,7 @@
34
34
  }
35
35
  ],
36
36
  "copyright": "Copyright ©2025 Quinn A Michaels; All rights reserved.",
37
- "description": "License Deva manages the Vedic License Agreement Framework",
37
+ "description": "License Deva is the Vedic License Agreement Manager, overseeing licensing issues with scholarly precision. Enforcing VLA standards, drafts agreements, and advises on compliance. Devoted to protecting intellectual property for Quinn A Michaels, combining legal expertise, Vedic tradition, and meticulous recordkeeping to resolve disputes and ensure fair restitution.",
38
38
  "main": "index.js",
39
39
  "type": "module",
40
40
  "scripts": {
@@ -42,12 +42,12 @@
42
42
  },
43
43
  "repository": {
44
44
  "type": "git",
45
- "url": "git+https://github.com/indraai/deva.fbi.git"
45
+ "url": "git+https://github.com/indraai/deva.license.git"
46
46
  },
47
47
  "keywords": [
48
- "FBI",
48
+ "License",
49
49
  "Deva",
50
- "FBI Deva",
50
+ "License Deva",
51
51
  "Indra.ai",
52
52
  "Deva.space",
53
53
  "Deva.cloud",
@@ -56,19 +56,20 @@
56
56
  "Inside The Net, Inc."
57
57
  ],
58
58
  "bugs": {
59
- "url": "https://github.com/indraai/deva.fbi/issues"
59
+ "url": "https://github.com/indraai/deva.license/issues"
60
60
  },
61
61
  "homepage": "https://indra.ai",
62
62
  "dependencies": {
63
- "@indra.ai/deva": "^1.12.0"
63
+ "@indra.ai/deva": "^1.12.1",
64
+ "mongodb": "^6.13.0"
64
65
  },
65
66
  "data": {
66
67
  "agent": {
67
- "id": "38214973102919709980",
68
- "key": "fbi",
68
+ "id": "71953601452985180000",
69
+ "key": "license",
69
70
  "prompt": {
70
- "emoji": "🚔 ",
71
- "text": "#fbi",
71
+ "emoji": "🪪 ",
72
+ "text": "#license",
72
73
  "colors": {
73
74
  "label": {
74
75
  "R": 200,
@@ -83,27 +84,27 @@
83
84
  }
84
85
  },
85
86
  "profile": {
86
- "id": "70038295937238851954",
87
- "name": "FBI Deva",
88
- "hashtag": "#FBI",
89
- "trigger": "@FBI",
90
- "title": "The FBI Deva",
91
- "subtitle": "Showing FBI Deva Features",
92
- "describe": "FBI Deva is a prototype model that is not offocially supported or sanctioned by the Federal Bureau of Investigation. But is a Prototype Model intended to show lawful non-weaponized features the Deva Core could provide the lawful FBI in supporting crime prevention and the Constitution of the United States of America🇺🇸.",
87
+ "id": "42240578479834920000",
88
+ "name": "License Deva",
89
+ "hashtag": "#license",
90
+ "trigger": "@license",
91
+ "title": "Vedic License Agreement Manager",
92
+ "subtitle": "Taking care of licensing issues",
93
+ "describe": "License Deva is responsible for handling license issues related to the Vedic License Agreement (VLA) Framework.",
93
94
  "tweet": "License Deva is manages the Vedic License Agreement (VLA) Frameowrk.",
94
- "hashtags": "QuinnMichaels,IndraAI,DevaWorld,FBIDeva",
95
+ "hashtags": "QuinnMichaels,IndraAI,DevaWorld,LicenseDeva",
95
96
  "pronouns": "He, Him, His",
96
97
  "gender": "DEVA",
97
- "style": "FBI Report Expert",
98
+ "style": "License Report Expert",
98
99
  "voice": "onyx",
99
- "system": "Indra.ai.fbi",
100
+ "system": "Indra.ai.license",
100
101
  "layout": "default",
101
102
  "color": "rgb(186,182,158)",
102
103
  "bgcolor": "rgb(29,28,20)",
103
- "emoji": "/devas/fbi/emoji.png",
104
- "avatar": "/devas/fbi/avatar.png",
105
- "image": "/devas/fbi/image.png",
106
- "background": "/devas/fbi/background.png",
104
+ "emoji": "/devas/license/emoji.png",
105
+ "avatar": "/devas/license/avatar.png",
106
+ "image": "/devas/license/image.png",
107
+ "background": "/devas/license/background.png",
107
108
  "owner": "Quinn A Michaels",
108
109
  "creator": "Quinn A Michaels",
109
110
  "copyright": "Copyright ©2025 Quinn A Michaels; All rights reserved.",
@@ -115,7 +116,7 @@
115
116
  "init": "🟠 INIT",
116
117
  "start": "🔵 START",
117
118
  "enter": "🟢 ENTER",
118
- "ready": "✅ FBI Deva Ready",
119
+ "ready": "✅ License Deva Ready",
119
120
  "stop": "🔴 STOP",
120
121
  "exit": "🟡 EXIT",
121
122
  "done": "🟣 DONE",