@indra.ai/deva.veda 0.0.26 → 0.0.28

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.
@@ -1,3 +1,8 @@
1
+ // set the __dirname
2
+ import {dirname} from 'node:path';
3
+ import {fileURLToPath} from 'node:url';
4
+ const __dirname = dirname(fileURLToPath(import.meta.url));
5
+
1
6
  import index from './index.json' with {type:'json'};
2
7
  import book01 from './01.json' with {type:'json'};
3
8
  import book02 from './02.json' with {type:'json'};
@@ -10,7 +15,7 @@ import book08 from './08.json' with {type:'json'};
10
15
  import book09 from './09.json' with {type:'json'};
11
16
  import book10 from './10.json' with {type:'json'};
12
17
 
13
- export default {
18
+ export const data = {
14
19
  index: index,
15
20
  books: [
16
21
  book01.DATA,
@@ -25,3 +30,61 @@ export default {
25
30
  book10.DATA,
26
31
  ]
27
32
  }
33
+
34
+ export async function bookimport(packet) {
35
+ this.context('json');
36
+ // here we want to build text files for all the books that we can use in a custom agent.
37
+ // first we need to get all the books
38
+ try {
39
+ this.action('get', 'get books');
40
+ const books = await this.func.books();
41
+ books.data.books.forEach(async book => {
42
+ this.action('get', `Get book ${book.key}`);
43
+ const hymns = await this.func.book(book.key);
44
+ const jsonbook = {
45
+ id: this.lib.uid(),
46
+ key: book.key,
47
+ describe: book.describe,
48
+ link: `https://indra.ai/rigveda/books/${book.key}.html`,
49
+ hymns: [],
50
+ copyright: '©2025 Quinn Michaels (indra.ai). All rights reserved.',
51
+ created: this.formatDate(Date.now(), 'long', true),
52
+ };
53
+
54
+ const loopTo = hymns.data.hymns.length;
55
+ for (var i = 0; i < loopTo; i++) {
56
+ const {data} = await this.func.hymn(hymns.data.hymns[i].key);
57
+ const hymn = {
58
+ id: this.lib.uid(),
59
+ key: data.key,
60
+ book: data.book,
61
+ title: data.title,
62
+ link: `https://indra.ai/rigveda/hymns/${data.key}.html`,
63
+ text:data.text,
64
+ people: data.people,
65
+ places: data.places,
66
+ things: data.things,
67
+ groups: data.groups,
68
+ concepts: data.concepts,
69
+ hash: data.hash,
70
+ created: this.formatDate(Date.now(), 'long', true),
71
+ };
72
+ jsonbook.hymns.push(hymn);
73
+ }
74
+ const jsonfile = this.lib.path.join(__dirname, 'data', 'json', `rigveda-book-${book.key}.json`);
75
+ this.prompt(`writing json ${jsonfile}`);
76
+ this.state('data', `Writing json ${jsonfile}`);
77
+ this.lib.fs.writeFileSync(jsonfile, JSON.stringify(jsonbook));
78
+ });
79
+ }
80
+ catch (e) {
81
+ return this.error(packet, e, Promise.reject());
82
+ }
83
+ finally {
84
+ return await Promise.resolve({
85
+ text: 'building json files',
86
+ html: '<p>building json files</p>',
87
+ data: false
88
+ })
89
+ }
90
+ }
package/data/vars.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "init": "🟠 INIT",
8
8
  "start": "🔵 START",
9
9
  "enter": "🟢 ENTER",
10
- "ready": "⭐️ Veda.deva Ready",
10
+ "ready": "⭐️ READY!",
11
11
  "stop": "🔴 STOP",
12
12
  "exit": "🟡 EXIT",
13
13
  "done": "🟣 DONE",
@@ -19,7 +19,8 @@
19
19
  "writing": "🖋 Writing hymn",
20
20
  "built": "👷‍♂️ Book is built",
21
21
  "nobook": "📕 You did not provide a book number.",
22
- "notfound": "📜 Hymn not found."
22
+ "notfound": "📜 Hymn not found.",
23
+ "manu": "Importing Manu Laws"
23
24
  },
24
25
  "trigger": "@VEDA",
25
26
  "context": {
@@ -28,7 +29,8 @@
28
29
  "view": "📜 View Hymn",
29
30
  "book": "📖 Get Book",
30
31
  "books": "📚 Get Books",
31
- "ask": "Asking important things"
32
+ "ask": "Asking important things",
33
+ "manu": "Build Manu Laws"
32
34
  },
33
35
  "live": {
34
36
  "profile": "deva",
@@ -6,4 +6,7 @@ talk: #algorithm file:public main:header
6
6
  talk: #security file:public main:header
7
7
  talk: #legal file:public main:header
8
8
 
9
+ p: A hermit is he who regulates his conduct entirely according to the Institutes proclaimed by Vikhanas.
10
+ A Vaikhânasa (shall live) in the forest, subsisting on roots and fruit, practising austerities and bathing at morn, noon, and eve; he shall kindle a fire according to the Srâmanaka (rule); he shall eat wild-growing (vegetables and grain) only; he shall worship gods, manes, Bhûtas, men, and Rishis; he shall receive hospitably (men of) all (castes) except those (with whom intercourse is) forbidden; he may even use the flesh of animals killed by carnivorous beasts; he shall not step on ploughed (land); and he shall not enter a village; he shall wear his hair in braids, and dress in (garments made of) bark or skins; he shall not eat anything that has been hoarded for more than a year.
11
+
9
12
  copyright: ©2025 Quinn Michaels
@@ -0,0 +1,30 @@
1
+ # Vedic Kingdom
2
+
3
+ p: The definition of the Vedic Kingdom provides a comprehensive and balanced understanding of what constitutes a fully functional and self-sustaining realm. It highlights that all parts of the kingdom are interdependent and equally crucial for ensuring the prosperity, security, and well-being of the people. Here’s a breakdown of the seven constituent parts of the Vedic Kingdom, as outlined:
4
+
5
+ 1. The King: The King serves as the central authority figure, responsible for overseeing the kingdom, ensuring justice, and upholding law and order. As the leader, the King ensures that all other parts of the kingdom function harmoniously. His actions, decisions, and vision guide the future of the realm.
6
+
7
+ 2. The Minister: The Minister supports the King by offering counsel, ensuring the day-to-day administration of the kingdom runs smoothly, and helping execute the King’s orders. The Minister is a key advisor and helps manage the kingdom’s affairs with wisdom and foresight.
8
+
9
+ 3. The Capital: The Capital is the heart of the kingdom, where the King’s authority is most visible, and where central administration, governance, and decision-making take place. It is also where the kingdom’s culture, economy, and systems converge, making it a focal point for the functioning of the state.
10
+
11
+ 4. The Realm: The Realm encompasses the territory and the people under the King’s rule. The realm is the land that the King governs, and it is integral to the kingdom’s identity and growth. It is the foundation that holds the kingdom together and sustains the people within it.
12
+
13
+ 5. The Treasury: The Treasury holds the wealth and resources of the kingdom, which are crucial for funding the King’s plans, paying the military and public officials, and sustaining the kingdom’s infrastructure. Financial stability is paramount to ensure that the kingdom can thrive and protect its people.
14
+
15
+ 6. The Military: The Military is the protector of the kingdom, ensuring that it can defend itself from external threats and maintain internal peace. A strong military ensures the kingdom’s safety and sovereignty, acting as the enforcer of the King’s decrees and the protector of the realm.
16
+
17
+ 7. The Ally: The Ally refers to neighboring states or nations that offer support, whether through military, economic, or diplomatic means. A kingdom that maintains alliances ensures that it has the strength to counter external threats and can benefit from mutual agreements that promote peace and prosperity.
18
+
19
+ ## Conclusion
20
+
21
+ p: In the Vedic Kingdom, the importance of these seven parts lies in their mutual dependence and contribution to the success of the kingdom. No one part is more critical than another because they all serve distinct but complementary roles. This structure ensures that the kingdom operates in harmony, with each part fulfilling its purpose to support the others.
22
+
23
+ p: Just as a tree cannot thrive without its roots, trunk, branches, and leaves, the Vedic Kingdom’s success relies on the balance and health of all its components. The King, his Minister, the Capital, the Realm, the Treasury, the Military, and the Ally are all integral parts of a greater whole. When each is fulfilled and each works together, the kingdom flourishes in peace and prosperity.
24
+
25
+ ::begin:hidden
26
+ #color = {{profile.color}}
27
+ #bgcolor = {{profile.bgcolor}}
28
+ #bg = {{profile.background}}
29
+ ::end:hidden
30
+ copyright: (c)2025 Quinn Michaels
@@ -18,7 +18,7 @@ law[67f1efd38fb7ca42284d6cb1]: For these three gradations of adultery, the first
18
18
 
19
19
  law[67f1efdd8fb7ca42284d6cb2]: When a man enjoys a woman by fraud, his punishment shall be life in prison and confiscation of his entire wealth.
20
20
 
21
- law[67f1efdd8fb7ca42284d6cb3]: When a woman comes to a man's house, workplace, or location of religious practice and excites his concupiscence by touching him or the like acts without mutual consent, she shall be punished equally with fines and inprisonment.
21
+ law[67f1efdd8fb7ca42284d6cb3]: When a woman comes to a man's house, workplace, or location of religious practice and excites his concupiscence by touching him or the like acts without mutual consent, she shall be punished equally with fines and imprisonment.
22
22
 
23
23
  ::begin:hidden
24
24
  #color = {{profile.color}}
@@ -26,3 +26,4 @@ law[67f1efdd8fb7ca42284d6cb3]: When a woman comes to a man's house, workplace, o
26
26
  #bg = {{profile.background}}
27
27
  ::end:hidden
28
28
  copyright: (c)2025 Quinn Michaels
29
+ cd
@@ -0,0 +1,39 @@
1
+ # Inheritance Laws
2
+
3
+ law: Houses and landed property inherited from an ancestor shall be shared equally by the father and sons; but the sons cannot claim a share of their father's own property without the consent of the father.
4
+
5
+ law: Of property acquired by the grandfather, whether immovable or movable, father and son are declared to be entitled to equal shares.
6
+
7
+ law: Those sons for whom their shares have been arranged by the father, whether equal, less, or greater, must be compelled to abide by such arrangement. Otherwise (if they try to alter the arrangement), they shall be punished.
8
+
9
+ law: When they divide their father's heritage, all the sons shall share alike; but he who is distinguished by sacred knowledge and virtue, shall obtain a greater share (than the rest).
10
+
11
+ law: They are parents in the true sense of the term who have a son whose fame is spread in the world for sacred knowledge, cleverness, valour, wealth, and for knowledge, liberality, and pious acts.
12
+
13
+ law: Whether it be a debt, or a document, or house, or field, which has been inherited from the paternal grandfather, he shall take his proper share of it, when he returns after a protracted absence even.
14
+
15
+ law: Whether he be the third or the fifth or even the seventh in descent, he shall receive the share belonging to him by right of succession, his birth and family name having been ascertained (first).
16
+
17
+ law: He whom indigenous inhabitants and neighbours know to be the (legal) owner, to the descendants of that man must the land be surrendered by his kinsmen, when they make their appearance.
18
+
19
+ law: No one but a legitimate son of the body is declared to be heir of his father's wealth. All the others are stated to have a claim to maintenance (only).
20
+
21
+ law: A son who is destitute of learning, valour, and wealth, void of devotion and insight, and unobservant of good custom, such a son is declared to be no better than urine and fæces.
22
+
23
+ law: As her father's wealth becomes her property, though kinsmen be in existence, even so her son becomes the owner of his mother's and maternal grandfather's wealth.
24
+
25
+ law: When a man dies without leaving either wife or male issue, the mother has to be considered as her son's heiress, or a brother (may succeed) if she consents to it.
26
+
27
+ law: He who (having been divided) is again living, through affection, together with his father or brother, or with his uncle even, is said to be reunited with them.
28
+
29
+ law: When brothers formerly divided are again living together through affection and arrange a second division, the right of primogeniture does not accrue in that case.
30
+
31
+ law: If among reunited coparceners any one should acquire property through learning, valour, or other (independent effort of his own), a double share must be given to him; the rest shall take equal shares.
32
+
33
+
34
+ ::begin:hidden
35
+ #color = {{profile.color}}
36
+ #bgcolor = {{profile.bgcolor}}
37
+ #bg = {{profile.background}}
38
+ ::end:hidden
39
+ copyright: (c)2025 Quinn Michaels
@@ -44,6 +44,8 @@ law[67eaf84243b227f12b92002f]: All plants, propagated by seed or by slips, grow
44
44
 
45
45
  law[67eaf85243b227f12b920030]: Eighteen nimeshas (twinklings of the eye, are one kashtha), thirty kashthas one kala, thirty kalas one muhurta, and as many (muhurtas) one day and night. The sun divides days and nights, both human and divine, the night (being intended) for the repose of created beings and the day for exertion. A month is a day and a night of the manes, but the division is according to fortnights. The dark (fortnight) is their day for active exertion, the bright (fortnight) their night for sleep. A year is a day and a night of the gods; their division is (as follows): the half year during which the sun progresses to the north will be the day, that during which it goes southwards the night.
46
46
 
47
+ But, joining minute particles even of those six, which possess measureless power, with particles of himself, he created all beings. Because those six kinds of minute particles, which form the creator's frame, enter (a-sri) these creatures, therefore the wise call his frame Sarira, the body. That the great elements enter, together with their functions and the mind, through its minute parts the framer of all beings, the imperishable one. But from minute body (-framing) particles of these seven very powerful Purushas springs this world, the perishable from the imperishable. Among them each succeeding element acquires the quality of the preceding one, and whatever place in the sequence each of them occupies, even so many qualities it is declared to possess. But from fire, wind, and the sun he drew forth the threefold eternal Veda, called Rik, Yagus, and Saman, for the due performance of the sacrifice. Time and the divisions of time, the lunar mansions and the planets, the rivers, the oceans, the mountains, plains, and uneven ground. Austerity, speech, pleasure, desire, and anger, this whole creation he likewise produced, as he desired to call these beings into existence.
48
+
47
49
 
48
50
  ::begin:hidden
49
51
  #color = {{profile.color}}
@@ -90,6 +90,23 @@ law[67f1c7512ecedc5226ed33fa]: To a Brahmana (householder), or to an ascetic who
90
90
 
91
91
  law[67f1c9ce7f8bd6d02abd0a45]: The Brahmana (guests) shall then answer him, 'Let there be Svadha;' for at all rites in honour of the manes the word Svadha is the highest benison.
92
92
 
93
+ law: The ancestors of men are satisfied for one month with sesamum grains, rice, barley, masha beans, water, roots, and fruits, which have been given according to the prescribed rule.
94
+
95
+ law: 'May such a man (the manes say) be born in our family who will give us milk-rice, with honey and clarified butter, on the thirteenth lunar day (of the month of Bhadrapada) and (in the afternoon) when the shadow of an elephant falls towards the east.'
96
+
97
+ law: Whatever (a man), full of faith, duly gives according to the prescribed rule, that becomes in the other world a perpetual and imperishable (gratification) for the manes.
98
+
99
+ law: The days of the dark half of the month, beginning with the tenth, but excepting the fourteenth, are recommended for a funeral sacrifice; (it is) not thus (with) the others.
100
+
101
+ law: As the second half of the month is preferable to the first half, even so the afternoon is better for (the performance of) a funeral sacrifice than the forenoon.
102
+
103
+ law: Let him, untired, duly perform the (rites) in honour of the manes in accordance with the prescribed rule, passing the sacred thread over the right shoulder, proceeding from the left to the right (and) holding Kusa grass in his hands, up to the end (of the ceremony).
104
+
105
+ law: Let him offer here below a funeral sacrifice, according to the rule given above, (at least) thrice a year, in winter, in summer, and in the rainy season, but that which is included among the five great sacrifices, every day.
106
+
107
+ law: The burnt-oblation, offered at a sacrifice to the manes, must not be made in a common fire; a Brahmana who keeps a sacred fire (shall) not (perform) a funeral sacrifice except on the new-moon day.
108
+
109
+
93
110
  ::begin:hidden
94
111
  #color = {{profile.color}}
95
112
  #bgcolor = {{profile.bgcolor}}
@@ -31,7 +31,11 @@ example: #{{agent.key}} hymn 01001
31
31
  The (various) classes of the manes are declared to be the sons of all those sages,
32
32
 
33
33
  Mariki son of Manu the son of Hiranyagarbha.
34
+ The Somasads, the sons of Virag, are stated to be the manes of the Sadhyas
35
+ Agnishvattas, the children of Mariki, are famous in the world (as the manes) of the gods.
36
+ The Barhishads, born of Atri, are recorded to be (the manes) of the Daityas, Danavas, Yakshas, Gandharvas, Snake-deities,
34
37
 
38
+ Rakshasas, Suparnas, and a Kimnaras,
35
39
 
36
40
  ::begin:hidden
37
41
  #color = {{profile.color}}
package/index.js CHANGED
@@ -7,13 +7,14 @@ import utils from './utils.js';
7
7
  import data from './data/index.js';
8
8
  const {agent,vars,rigveda} = data;
9
9
 
10
+ import {manu, manuhash} from './data/laws/index.js';
11
+ import {bookimport} from './data/rigveda/index.js';
12
+
10
13
  // set the __dirname
11
14
  import {dirname} from 'node:path';
12
15
  import {fileURLToPath} from 'node:url';
13
16
  const __dirname = dirname(fileURLToPath(import.meta.url));
14
17
 
15
- import querystring from 'node:querystring';
16
-
17
18
  const info = {
18
19
  id: pkg.id,
19
20
  name: pkg.name,
@@ -305,64 +306,10 @@ const VEDA = new Deva({
305
306
  this.context('view');
306
307
  return this.methods.hymn(packet);
307
308
  },
308
-
309
- async json(packet) {
310
- this.context('json');
311
- // here we want to build text files for all the books that we can use in a custom agent.
312
- // first we need to get all the books
313
- try {
314
- this.action('get', 'get books');
315
- const books = await this.func.books();
316
- books.data.books.forEach(async book => {
317
- this.action('get', `Get book ${book.key}`);
318
- const hymns = await this.func.book(book.key);
319
- const jsonbook = {
320
- id: this.lib.uid(true),
321
- key: book.key,
322
- describe: book.describe,
323
- link: `https://indra.ai/rigveda/books/${book.key}.html`,
324
- hymns: [],
325
- copyright: '©2025 Quinn Michaels (indra.ai). All rights reserved.',
326
- created: this.formatDate(Date.now(), 'long', true),
327
- };
328
-
329
- const loopTo = hymns.data.hymns.length;
330
- for (var i = 0; i < loopTo; i++) {
331
- const {data} = await this.func.hymn(hymns.data.hymns[i].key);
332
- const hymn = {
333
- id: this.lib.uid(true),
334
- key: data.key,
335
- book: data.book,
336
- title: data.title,
337
- link: `https://indra.ai/rigveda/hymns/${data.key}.html`,
338
- text:data.text,
339
- people: data.people,
340
- places: data.places,
341
- things: data.things,
342
- groups: data.groups,
343
- concepts: data.concepts,
344
- hash: data.hash,
345
- created: this.formatDate(Date.now(), 'long', true),
346
- };
347
- jsonbook.hymns.push(hymn);
348
- }
349
- const jsonfile = this.lib.path.join(__dirname, 'data', 'json', `rigveda-book-${book.key}.json`);
350
- this.prompt(`writing json ${jsonfile}`);
351
- this.state('data', `Writing json ${jsonfile}`);
352
- this.lib.fs.writeFileSync(jsonfile, JSON.stringify(jsonbook));
353
- });
354
- }
355
- catch (e) {
356
- return this.error(packet, e, Promise.reject());
357
- }
358
- finally {
359
- return await Promise.resolve({
360
- text: 'building json files',
361
- html: '<p>building json files</p>',
362
- data: false
363
- })
364
- }
365
- }
309
+ bookimport,
310
+ // Manu function for important laws
311
+ manu,
312
+ manuhash,
366
313
  },
367
314
  onReady(data, resolve) {
368
315
  this.prompt(this.vars.messages.ready);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": 6642777683539,
3
3
  "name": "@indra.ai/deva.veda",
4
- "version": "0.0.26",
4
+ "version": "0.0.28",
5
5
  "author": "Quinn Michaels",
6
6
  "license": "MIT",
7
7
  "copyright": "2025",
@@ -27,10 +27,8 @@
27
27
  "url": "https://github.com/indraai/deva.veda/issues"
28
28
  },
29
29
  "homepage": "https://deva.space/devas/veda",
30
- "devDependencies": {
31
- "@indra.ai/deva": "^1.5.4"
32
- },
33
30
  "dependencies": {
31
+ "@indra.ai/deva": "^1.5.23",
34
32
  "he": "^1.2.0"
35
33
  }
36
34
  }