@indra.ai/deva 1.6.6 → 1.6.8
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/README.md +3 -9
- package/examples/hello-world.js +2 -10
- package/index.js +31 -35
- package/lib/index.js +1 -11
- package/package.json +45 -24
- package/tests/client.json +5 -5
- package/tests/index.js +2 -11
package/README.md
CHANGED
|
@@ -486,12 +486,6 @@ The `initDeva()` function will initialize the Deva located under the current Dev
|
|
|
486
486
|
[Github Repo](https://github.com/indraai/deva)
|
|
487
487
|
[Back to indra.ai](https://indra.ai)
|
|
488
488
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
uid: 21524957441626894690
|
|
493
|
-
created: 1757290615444
|
|
494
|
-
md5: 8EHZEL6OWUT3cKAnvrBXaQ==
|
|
495
|
-
sha256: 6DXkbquJ6JHHThY+9eV2eFqybBRK/KiFuwXQHCxr7fw=
|
|
496
|
-
sha512: mkY6DDFKRf1yUMm4FzfbajM+3LcMnCAUoKwJtmlhTzNin8HUQBOWLaAU1Yb7msZZz7e24at7CL5Ry4MYzdbjGA==
|
|
497
|
-
::end:uid:indra:21524957441626894690
|
|
489
|
+
©2025 Quinn A Michaels; All rights reserved.
|
|
490
|
+
Legal Signature Required For Lawful Use.
|
|
491
|
+
Distributed under VLA:21524957441626894690 LICENSE.md
|
package/examples/hello-world.js
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// ©2025 Quinn A Michaels; All rights reserved.
|
|
3
3
|
// Legal Signature Required For Lawful Use.
|
|
4
|
-
// Distributed under
|
|
5
|
-
|
|
6
|
-
::begin:uid:indra:21524957441626894690
|
|
7
|
-
uid: 21524957441626894690
|
|
8
|
-
created: 1757290615444
|
|
9
|
-
md5: 8EHZEL6OWUT3cKAnvrBXaQ==
|
|
10
|
-
sha256: 6DXkbquJ6JHHThY+9eV2eFqybBRK/KiFuwXQHCxr7fw=
|
|
11
|
-
sha512: mkY6DDFKRf1yUMm4FzfbajM+3LcMnCAUoKwJtmlhTzNin8HUQBOWLaAU1Yb7msZZz7e24at7CL5Ry4MYzdbjGA==
|
|
12
|
-
::end:uid:indra:21524957441626894690
|
|
13
|
-
**/
|
|
4
|
+
// Distributed under VLA:21524957441626894690 LICENSE.md
|
|
5
|
+
|
|
14
6
|
|
|
15
7
|
const client = require('./client.json').DATA;
|
|
16
8
|
const agent = require('./agent.json').DATA;
|
package/index.js
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// ©2025 Quinn A Michaels; All rights reserved.
|
|
3
3
|
// Legal Signature Required For Lawful Use.
|
|
4
|
-
// Distributed under
|
|
5
|
-
/**
|
|
6
|
-
::begin:uid:indra:21524957441626894690
|
|
7
|
-
uid: 21524957441626894690
|
|
8
|
-
created: 1757290615444
|
|
9
|
-
md5: 8EHZEL6OWUT3cKAnvrBXaQ==
|
|
10
|
-
sha256: 6DXkbquJ6JHHThY+9eV2eFqybBRK/KiFuwXQHCxr7fw=
|
|
11
|
-
sha512: mkY6DDFKRf1yUMm4FzfbajM+3LcMnCAUoKwJtmlhTzNin8HUQBOWLaAU1Yb7msZZz7e24at7CL5Ry4MYzdbjGA==
|
|
12
|
-
::end:uid:indra:21524957441626894690
|
|
13
|
-
**/
|
|
4
|
+
// Distributed under VLA:21524957441626894690 LICENSE.md
|
|
14
5
|
|
|
15
6
|
import {EventEmitter} from 'node:events';
|
|
16
7
|
import {randomUUID} from 'crypto';
|
|
@@ -29,13 +20,13 @@ class Deva {
|
|
|
29
20
|
this._agent = opts.agent || false; // Agent profile object
|
|
30
21
|
this._client = {}; // this will be set on init.
|
|
31
22
|
this._active = false; // the active/birth date.
|
|
23
|
+
this._indra = false; // inherited Indra features.
|
|
32
24
|
this._veda = false; // inherited Veda features.
|
|
33
25
|
this._data = false; // inherited Data features.
|
|
34
26
|
this._error = false; // inherited Error features.
|
|
35
27
|
this._log = false; // inherited Log features.
|
|
36
28
|
this._report = false; // inherited Report features.
|
|
37
29
|
this._vector = false; // inherited Vector features.
|
|
38
|
-
this._god = false; // inherited God features.
|
|
39
30
|
this._king = false; // inherited King features.
|
|
40
31
|
this._treasury = false; // inherited Vector features.
|
|
41
32
|
this._security = false; // inherited Security features.
|
|
@@ -229,6 +220,8 @@ class Deva {
|
|
|
229
220
|
if (!this._active) return this._messages.offline; // check the active status
|
|
230
221
|
this.zone(key);
|
|
231
222
|
this.feature(key); // set the security state
|
|
223
|
+
this.action(key);
|
|
224
|
+
this.state(key);
|
|
232
225
|
try {
|
|
233
226
|
const data = this.lib.copy(value);
|
|
234
227
|
this.state('return', key); // set the security state
|
|
@@ -294,7 +287,7 @@ class Deva {
|
|
|
294
287
|
const _fe = `_${feature}`;
|
|
295
288
|
const {id, profile, features} = _cl; // make a copy the clinet data.
|
|
296
289
|
const data = features[feature]; // make a copy the clinet data.
|
|
297
|
-
this.state(
|
|
290
|
+
this.state(feature, _id.uid);
|
|
298
291
|
this[_fe] = { // set this feature with data
|
|
299
292
|
id: _id, // uid of the feature
|
|
300
293
|
client_id: id, // client id for reference
|
|
@@ -314,6 +307,18 @@ class Deva {
|
|
|
314
307
|
}
|
|
315
308
|
}
|
|
316
309
|
|
|
310
|
+
|
|
311
|
+
/**************
|
|
312
|
+
func: Indra
|
|
313
|
+
params: resolve, reject
|
|
314
|
+
describe:
|
|
315
|
+
The Indra feature sets the correct variables and necessary rules for the
|
|
316
|
+
client presented data.
|
|
317
|
+
***************/
|
|
318
|
+
Indra(resolve, reject) {
|
|
319
|
+
return this.Feature('indra', resolve, reject);
|
|
320
|
+
}
|
|
321
|
+
|
|
317
322
|
/**************
|
|
318
323
|
func: Veda
|
|
319
324
|
params: resolve, reject
|
|
@@ -380,17 +385,6 @@ class Deva {
|
|
|
380
385
|
return this.Feature('vector', resolve, reject);
|
|
381
386
|
}
|
|
382
387
|
|
|
383
|
-
/**************
|
|
384
|
-
func: God
|
|
385
|
-
params: resolve, reject
|
|
386
|
-
describe:
|
|
387
|
-
The God feature sets the correct variables and necessary rules for the
|
|
388
|
-
client presented data.
|
|
389
|
-
***************/
|
|
390
|
-
God(resolve, reject) {
|
|
391
|
-
return this.Feature('god', resolve, reject);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
388
|
/**************
|
|
395
389
|
func: King
|
|
396
390
|
params: resolve, reject
|
|
@@ -931,6 +925,8 @@ class Deva {
|
|
|
931
925
|
this.action('init');
|
|
932
926
|
this.state('init');
|
|
933
927
|
return this.Client(client, resolve, reject);
|
|
928
|
+
}).then(() => {
|
|
929
|
+
return this.Indra(resolve, reject);
|
|
934
930
|
}).then(() => {
|
|
935
931
|
return this.Veda(resolve, reject);
|
|
936
932
|
}).then(() => {
|
|
@@ -943,8 +939,6 @@ class Deva {
|
|
|
943
939
|
return this.Report(resolve, reject);
|
|
944
940
|
}).then(() => {
|
|
945
941
|
return this.Vector(resolve, reject);
|
|
946
|
-
}).then(() => {
|
|
947
|
-
return this.God(resolve, reject);
|
|
948
942
|
}).then(() => {
|
|
949
943
|
return this.King(resolve, reject);
|
|
950
944
|
}).then(() => {
|
|
@@ -1625,6 +1619,18 @@ class Deva {
|
|
|
1625
1619
|
}
|
|
1626
1620
|
|
|
1627
1621
|
// FEATURE FUNCTIONS
|
|
1622
|
+
|
|
1623
|
+
/**************
|
|
1624
|
+
func: indra
|
|
1625
|
+
params: none
|
|
1626
|
+
describe: basic indra features available in a Deva.
|
|
1627
|
+
usage: this.indra()
|
|
1628
|
+
***************/
|
|
1629
|
+
indra() {
|
|
1630
|
+
return this._getFeature('indra', this._indra);
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
|
|
1628
1634
|
/**************
|
|
1629
1635
|
func: veda
|
|
1630
1636
|
params: none
|
|
@@ -1687,16 +1693,6 @@ class Deva {
|
|
|
1687
1693
|
}
|
|
1688
1694
|
|
|
1689
1695
|
|
|
1690
|
-
/**************
|
|
1691
|
-
func: god
|
|
1692
|
-
params: none
|
|
1693
|
-
describe: basic god features available in a Deva.
|
|
1694
|
-
usage: this.god()
|
|
1695
|
-
***************/
|
|
1696
|
-
god() {
|
|
1697
|
-
return this._getFeature('god', this._god);
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
1696
|
/**************
|
|
1701
1697
|
func: king
|
|
1702
1698
|
params: none
|
package/lib/index.js
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// ©2025 Quinn A Michaels; All rights reserved.
|
|
3
3
|
// Legal Signature Required For Lawful Use.
|
|
4
|
-
// Distributed under
|
|
5
|
-
/**
|
|
6
|
-
::begin:uid:indra:21524957441626894690
|
|
7
|
-
uid: 21524957441626894690
|
|
8
|
-
created: 1757290615444
|
|
9
|
-
md5: 8EHZEL6OWUT3cKAnvrBXaQ==
|
|
10
|
-
sha256: 6DXkbquJ6JHHThY+9eV2eFqybBRK/KiFuwXQHCxr7fw=
|
|
11
|
-
sha512: mkY6DDFKRf1yUMm4FzfbajM+3LcMnCAUoKwJtmlhTzNin8HUQBOWLaAU1Yb7msZZz7e24at7CL5Ry4MYzdbjGA==
|
|
12
|
-
::end:uid:indra:21524957441626894690
|
|
13
|
-
**/
|
|
14
|
-
|
|
4
|
+
// Distributed under VLA:21524957441626894690 LICENSE.md
|
|
15
5
|
|
|
16
6
|
import path from 'path';
|
|
17
7
|
import fs from 'fs';
|
package/package.json
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "55286864875635314522",
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.8",
|
|
5
5
|
"description": "The Deva Core",
|
|
6
6
|
"main": "index.js",
|
|
7
|
+
"license": "VLA:21524957441626894690 LICENSE.md",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Quinn A Michaels",
|
|
10
|
+
"email": "quinn@indra.ai",
|
|
11
|
+
"url": "https://indra.ai/"
|
|
12
|
+
},
|
|
13
|
+
"funding": [
|
|
14
|
+
{
|
|
15
|
+
"type": "paypal",
|
|
16
|
+
"url": "https://paypal.me/rahulaclub"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "patreon",
|
|
20
|
+
"url": "https://patreon.com/rahulaclub"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
7
23
|
"copyright": "(c)2025 Quinn A Michaels; All rights reserved.",
|
|
8
24
|
"type": "module",
|
|
9
25
|
"scripts": {
|
|
@@ -22,22 +38,6 @@
|
|
|
22
38
|
"Deva",
|
|
23
39
|
"AI Framework"
|
|
24
40
|
],
|
|
25
|
-
"license": "VLA:21524957441626894690 LICENSE.md",
|
|
26
|
-
"author": {
|
|
27
|
-
"name": "Quinn A Michaels",
|
|
28
|
-
"email": "quinn@indra.ai",
|
|
29
|
-
"url": "https://indra.ai/"
|
|
30
|
-
},
|
|
31
|
-
"funding": [
|
|
32
|
-
{
|
|
33
|
-
"type": "paypal",
|
|
34
|
-
"url": "https://paypal.me/rahulaclub"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"type": "patreon",
|
|
38
|
-
"url": "https://patreon.com/rahulaclub"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
41
|
"bugs": {
|
|
42
42
|
"url": "https://github.com/indraai/deva/issues"
|
|
43
43
|
},
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"log": "🪵 Log",
|
|
119
119
|
"report": "🗂️ Report",
|
|
120
120
|
"vector": "👽️ Vector",
|
|
121
|
-
"
|
|
121
|
+
"indra": "💫 Indra",
|
|
122
122
|
"king": "👑️ King",
|
|
123
123
|
"owner": "🐲️ Owner",
|
|
124
124
|
"treasury": "🏦️ Treasury",
|
|
@@ -174,11 +174,10 @@
|
|
|
174
174
|
"unload": "🛻 Unload",
|
|
175
175
|
"resolve": "🤝 Resolve",
|
|
176
176
|
"reject": "🧱 Reject",
|
|
177
|
-
"data": "📡 Data",
|
|
178
177
|
"create": "🎨 Create",
|
|
179
178
|
"destroy": "💣 Destroy",
|
|
180
179
|
"write": "📝 Write",
|
|
181
|
-
"save": "
|
|
180
|
+
"save": "📀 Save",
|
|
182
181
|
"set": "🖖 Set",
|
|
183
182
|
"get": "🫴 Get",
|
|
184
183
|
"put": "🤝 Put",
|
|
@@ -190,7 +189,6 @@
|
|
|
190
189
|
"invalid": "👎 INVALID!",
|
|
191
190
|
"valid": "👍 VALID!",
|
|
192
191
|
"abort": "💔 ABORT!",
|
|
193
|
-
"error": "❌ ERROR!",
|
|
194
192
|
"help": "💙 Help",
|
|
195
193
|
"authorized": "🔑 Authorized",
|
|
196
194
|
"unauthorized": "🏴☠️ Unauthorized",
|
|
@@ -213,19 +211,42 @@
|
|
|
213
211
|
"update": "👆 Update",
|
|
214
212
|
"delete": "🗑️ Delete",
|
|
215
213
|
"return": "🤿 Return",
|
|
216
|
-
"hash": "#️⃣ Hash"
|
|
214
|
+
"hash": "#️⃣ Hash",
|
|
215
|
+
"indra": "💫 Indra",
|
|
216
|
+
"veda": "🕉️ Veda",
|
|
217
|
+
"data": "💾 Data",
|
|
218
|
+
"error": "❌ Error",
|
|
219
|
+
"log": "🪵 Log",
|
|
220
|
+
"report": "🗂️ Report",
|
|
221
|
+
"vector": "👽 Vector",
|
|
222
|
+
"king": "👑️ King",
|
|
223
|
+
"owner": "🐲️ Owner",
|
|
224
|
+
"treasury": "🏦 Treasury",
|
|
225
|
+
"security": "🚨 Security",
|
|
226
|
+
"guard": "💂 Guard",
|
|
227
|
+
"defense": "🪖 Defense",
|
|
228
|
+
"wall": "🧱 Wall",
|
|
229
|
+
"shield": "🛡️ Shield",
|
|
230
|
+
"proxy": "👾️ Proxy",
|
|
231
|
+
"legal": "🏛️ Legal",
|
|
232
|
+
"authority": "🚔 Authority",
|
|
233
|
+
"justice": "⚖️ Justice",
|
|
234
|
+
"support": "💼 Support",
|
|
235
|
+
"services": "🛠️ Services",
|
|
236
|
+
"systems": "🖥️ Systems",
|
|
237
|
+
"networks": "📡 Networks"
|
|
217
238
|
},
|
|
218
239
|
"action": false,
|
|
219
240
|
"actions": {
|
|
220
241
|
"client": "👨 Client",
|
|
221
242
|
"agent": "🕵️♂️ Agent",
|
|
243
|
+
"indra": "💫 Indra",
|
|
222
244
|
"veda": "🕉️ Veda",
|
|
223
245
|
"data": "💾 Data",
|
|
224
246
|
"error": "❌ Error",
|
|
225
247
|
"log": "🪵 Log",
|
|
226
248
|
"report": "🗂️ Report",
|
|
227
249
|
"vector": "👽 Vector",
|
|
228
|
-
"god": "💫 God",
|
|
229
250
|
"king": "👑️ King",
|
|
230
251
|
"owner": "🐲️ Owner",
|
|
231
252
|
"treasury": "🏦 Treasury",
|
|
@@ -277,13 +298,13 @@
|
|
|
277
298
|
"init": "🟠 Init",
|
|
278
299
|
"agent": "🦾 Agent",
|
|
279
300
|
"client": "💪 Client",
|
|
301
|
+
"indra": "💫 Indra",
|
|
280
302
|
"veda": "🕉️ Veda",
|
|
281
303
|
"data": "💾️ Data",
|
|
282
304
|
"error": "❌️ Error",
|
|
283
305
|
"log": "🪵️ Log",
|
|
284
306
|
"report": "🗂️ Report",
|
|
285
307
|
"vector": "👽️ Vector",
|
|
286
|
-
"god": "💫 God",
|
|
287
308
|
"king": "👑️ King",
|
|
288
309
|
"owner": "🐲️ Owner",
|
|
289
310
|
"treasury": "🏦 Treasury",
|
package/tests/client.json
CHANGED
|
@@ -34,6 +34,11 @@
|
|
|
34
34
|
"currency": "USD"
|
|
35
35
|
},
|
|
36
36
|
"features": {
|
|
37
|
+
"indra": {
|
|
38
|
+
"concerns": [],
|
|
39
|
+
"global": [],
|
|
40
|
+
"devas": {}
|
|
41
|
+
},
|
|
37
42
|
"veda": {
|
|
38
43
|
"concerns": [],
|
|
39
44
|
"global": [],
|
|
@@ -64,11 +69,6 @@
|
|
|
64
69
|
"global": [],
|
|
65
70
|
"devas": {}
|
|
66
71
|
},
|
|
67
|
-
"god": {
|
|
68
|
-
"concerns": [],
|
|
69
|
-
"global": [],
|
|
70
|
-
"devas": {}
|
|
71
|
-
},
|
|
72
72
|
"king": {
|
|
73
73
|
"concerns": [],
|
|
74
74
|
"global": [],
|
package/tests/index.js
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
"use strict"
|
|
1
|
+
"use strict";
|
|
2
2
|
// ©2025 Quinn A Michaels; All rights reserved.
|
|
3
3
|
// Legal Signature Required For Lawful Use.
|
|
4
|
-
// Distributed under
|
|
5
|
-
/**
|
|
6
|
-
::begin:uid:indra:21524957441626894690
|
|
7
|
-
uid: 21524957441626894690
|
|
8
|
-
created: 1757290615444
|
|
9
|
-
md5: 8EHZEL6OWUT3cKAnvrBXaQ==
|
|
10
|
-
sha256: 6DXkbquJ6JHHThY+9eV2eFqybBRK/KiFuwXQHCxr7fw=
|
|
11
|
-
sha512: mkY6DDFKRf1yUMm4FzfbajM+3LcMnCAUoKwJtmlhTzNin8HUQBOWLaAU1Yb7msZZz7e24at7CL5Ry4MYzdbjGA==
|
|
12
|
-
::end:uid:indra:21524957441626894690
|
|
13
|
-
**/
|
|
4
|
+
// Distributed under VLA:21524957441626894690 LICENSE.md
|
|
14
5
|
|
|
15
6
|
import Client from './client.json' with {type:'json'};
|
|
16
7
|
const client = Client.DATA;
|