@indra.ai/deva 1.64.108 → 1.65.11
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/_data/buddy.json +112 -0
- package/_data/index.js +2 -0
- package/buddy/index.js +213 -0
- package/buddy/template/assets/avatar.png +0 -0
- package/buddy/template/assets/background.png +0 -0
- package/buddy/template/assets/emoji.png +0 -0
- package/buddy/template/assets/image.png +0 -0
- package/buddy/template/data/index.json +69 -0
- package/buddy/template/help/corpus.feecting +13 -0
- package/buddy/template/help/main.feecting +25 -0
- package/buddy/template/index.js +58 -0
- package/buddy/template/index.test.js +5 -0
- package/devas/index.js +14 -0
- package/devas/test/assets/avatar.png +0 -0
- package/devas/test/assets/background.png +0 -0
- package/devas/test/assets/emoji.png +0 -0
- package/devas/test/assets/image.png +0 -0
- package/devas/test/data/index.json +68 -0
- package/devas/test/help/corpus.feecting +13 -0
- package/devas/test/help/main.feecting +25 -0
- package/devas/test/index.js +58 -0
- package/devas/test/index.test.js +5 -0
- package/package.json +3 -2
package/_data/buddy.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": 41314822285864353682,
|
|
3
|
+
"name": "Deva Buddy Data File",
|
|
4
|
+
"describe": "The main Data Buddy Data file for building New Devas",
|
|
5
|
+
"copyright": "Copyright ©2000-2026 Quinn Michaels. All rights reserved.",
|
|
6
|
+
"DATA": {
|
|
7
|
+
"agent": {
|
|
8
|
+
"id": 6047734400443,
|
|
9
|
+
"key": "buddy",
|
|
10
|
+
"prompt": {
|
|
11
|
+
"emoji": "⊙",
|
|
12
|
+
"text": "buddy",
|
|
13
|
+
"colors": {
|
|
14
|
+
"label": {
|
|
15
|
+
"R": 0,
|
|
16
|
+
"G": 150,
|
|
17
|
+
"B": 255
|
|
18
|
+
},
|
|
19
|
+
"text": {
|
|
20
|
+
"R": 101,
|
|
21
|
+
"G": 192,
|
|
22
|
+
"B": 255
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"voice": {
|
|
27
|
+
"speech": "Alex",
|
|
28
|
+
"speed": 1
|
|
29
|
+
},
|
|
30
|
+
"profile": {
|
|
31
|
+
"name": "Deva Buddy",
|
|
32
|
+
"describe": "Deva Buddy creator.",
|
|
33
|
+
"emoji": "",
|
|
34
|
+
"avatar": "",
|
|
35
|
+
"background": "",
|
|
36
|
+
"gender": "N"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"vars": {
|
|
40
|
+
"options": false,
|
|
41
|
+
"cmd": false,
|
|
42
|
+
"comp": {},
|
|
43
|
+
"template": "deva",
|
|
44
|
+
"paths": {
|
|
45
|
+
"copy_index": "",
|
|
46
|
+
"copy_from": "",
|
|
47
|
+
"copy_to": "",
|
|
48
|
+
"copy_to_base": ""
|
|
49
|
+
},
|
|
50
|
+
"messages": {
|
|
51
|
+
"heading": "👽 DEVA",
|
|
52
|
+
"que_heading": "📁 QUE FILES",
|
|
53
|
+
"success": "Holla!!! A NEW DEVA WAS CREATED",
|
|
54
|
+
"que_complete": "✅ QUE FILES COMPLETE",
|
|
55
|
+
"index_updated": "✅ INDEX UPDATED:",
|
|
56
|
+
"folder": "📁",
|
|
57
|
+
"file": "📝",
|
|
58
|
+
"deva_created": "✅ DEVA CREATED:"
|
|
59
|
+
},
|
|
60
|
+
"create": {
|
|
61
|
+
"files": [],
|
|
62
|
+
"directories": []
|
|
63
|
+
},
|
|
64
|
+
"items": [],
|
|
65
|
+
"answers": false,
|
|
66
|
+
"questions": [
|
|
67
|
+
{
|
|
68
|
+
"type": "input",
|
|
69
|
+
"name": "key",
|
|
70
|
+
"message": "Key",
|
|
71
|
+
"default": ""
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "input",
|
|
75
|
+
"name": "vector",
|
|
76
|
+
"message": "Vector",
|
|
77
|
+
"default": ""
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "input",
|
|
81
|
+
"name": "name",
|
|
82
|
+
"message": "Name",
|
|
83
|
+
"default": ""
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "input",
|
|
87
|
+
"name": "describe",
|
|
88
|
+
"message": "Describe",
|
|
89
|
+
"default": ""
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "input",
|
|
93
|
+
"name": "pronouns",
|
|
94
|
+
"message": "Pronouns",
|
|
95
|
+
"default": ""
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "list",
|
|
99
|
+
"name": "gender",
|
|
100
|
+
"message": "Gender",
|
|
101
|
+
"default": "DEVA"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "input",
|
|
105
|
+
"name": "owner",
|
|
106
|
+
"message": "Owner",
|
|
107
|
+
"default": "Quinn Michaels"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
package/_data/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import states from './states.json' with {type:'json'};
|
|
|
13
13
|
import intents from './intents.json' with {type:'json'};
|
|
14
14
|
import beliefs from './beliefs.json' with {type:'json'};
|
|
15
15
|
import msgs from './msgs.json' with {type:'json'};
|
|
16
|
+
import buddy from './buddy.json' with {type:'json'};
|
|
16
17
|
|
|
17
18
|
export default {
|
|
18
19
|
cmdChr: '/',
|
|
@@ -153,4 +154,5 @@ export default {
|
|
|
153
154
|
belief: 'vedic',
|
|
154
155
|
beliefs: beliefs.DATA,
|
|
155
156
|
messages: msgs.DATA,
|
|
157
|
+
buddy: buddy.DATA,
|
|
156
158
|
}
|
package/buddy/index.js
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// Copyright (c)2025 Quinn Michaels
|
|
5
|
+
// Distributed under the MIT software license, see the accompanying
|
|
6
|
+
// file LICENSE.md or http://www.opensource.org/licenses/mit-license.php.
|
|
7
|
+
import Deva from '../index.js';
|
|
8
|
+
import pkg from '../package.json' with {type: 'json'};
|
|
9
|
+
const {version} = pkg;
|
|
10
|
+
|
|
11
|
+
import Buddy from '../_data/buddy.json' with {type: 'json'};
|
|
12
|
+
const buddy = Buddy.DATA;
|
|
13
|
+
const {agent, vars} = buddy;
|
|
14
|
+
|
|
15
|
+
import Client from '../tests/client.json' with {type: 'json'};
|
|
16
|
+
const client = Client.DATA;
|
|
17
|
+
|
|
18
|
+
import readline from 'node:readline/promises';
|
|
19
|
+
|
|
20
|
+
import process from 'node:process';
|
|
21
|
+
import {dirname} from 'node:path';
|
|
22
|
+
import {fileURLToPath} from 'node:url';
|
|
23
|
+
|
|
24
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
25
|
+
|
|
26
|
+
const flash = `
|
|
27
|
+
::::::::::::::::::::::::::::::::::
|
|
28
|
+
|
|
29
|
+
██████╗ ███████╗██╗ ██╗ █████╗
|
|
30
|
+
██╔══██╗██╔════╝██║ ██║██╔══██╗
|
|
31
|
+
██║ ██║█████╗ ╚██╗ ██╔╝███████║
|
|
32
|
+
██║ ██║██╔══╝ ╚████╔╝ ██╔══██║
|
|
33
|
+
██████╔╝███████╗ ╚██╔╝ ██║ ██║
|
|
34
|
+
╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝
|
|
35
|
+
|
|
36
|
+
::::::::::::::::::::::::::::::::::
|
|
37
|
+
version: ${version}
|
|
38
|
+
::::::::::::::::::::::::::::::::::
|
|
39
|
+
`
|
|
40
|
+
|
|
41
|
+
// Creates a new DEVA Buddy.
|
|
42
|
+
const DevaBuddy = new Deva({
|
|
43
|
+
info: {
|
|
44
|
+
id: pkg.id,
|
|
45
|
+
name: pkg.name,
|
|
46
|
+
version: pkg.version,
|
|
47
|
+
VLA: pkg.VLA,
|
|
48
|
+
},
|
|
49
|
+
agent,
|
|
50
|
+
utils: {
|
|
51
|
+
translate(input) {
|
|
52
|
+
return input.trim();
|
|
53
|
+
},
|
|
54
|
+
parse(input) {
|
|
55
|
+
return input.trim();
|
|
56
|
+
},
|
|
57
|
+
process(input) {
|
|
58
|
+
return input.trim();
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
vars,
|
|
62
|
+
devas: {},
|
|
63
|
+
listeners: {
|
|
64
|
+
'devacore:prompt'(packet) {
|
|
65
|
+
console.log(packet.text);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
modules: {},
|
|
69
|
+
func: {
|
|
70
|
+
|
|
71
|
+
baseDevaDirectory() {
|
|
72
|
+
const { copy_to_base } = this.vars.paths;
|
|
73
|
+
const dir_exists = this.lib.fs.existsSync(copy_to_base);
|
|
74
|
+
if (!dir_exists) {
|
|
75
|
+
this.lib.fs.mkdirSync(copy_to_base);
|
|
76
|
+
}
|
|
77
|
+
return dir_exists;
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
queFiles(copy_from, copy_to) {
|
|
81
|
+
const { answers, create } = this.vars;
|
|
82
|
+
this.vars.create.directories.push(copy_to);
|
|
83
|
+
|
|
84
|
+
return new Promise((resolve, reject) => {
|
|
85
|
+
|
|
86
|
+
const items = this.lib.fs.readdirSync(copy_from);
|
|
87
|
+
if (!items) return reject('NO ITEMS');
|
|
88
|
+
|
|
89
|
+
items.forEach(item => {
|
|
90
|
+
const copy_from_file = this.lib.path.resolve(copy_from, item);
|
|
91
|
+
const copy_to_file = this.lib.path.join(copy_to, item);
|
|
92
|
+
|
|
93
|
+
const filestat = this.lib.fs.statSync(copy_from_file);
|
|
94
|
+
|
|
95
|
+
if (filestat.isDirectory()) this.func.queFiles(copy_from_file, copy_to_file);
|
|
96
|
+
|
|
97
|
+
else if (this.lib.path.extname(item) === '.png') {
|
|
98
|
+
this.vars.create.files.push({copy_to_file, content: this.lib.fs.readFileSync(copy_from_file)});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
else {
|
|
102
|
+
const theyear = new Date().getFullYear();
|
|
103
|
+
const content = this.lib.fs.readFileSync(copy_from_file, 'utf8')
|
|
104
|
+
.replace(/::id::/g, this.uid().uid)
|
|
105
|
+
.replace(/::owner::/g, answers.owner)
|
|
106
|
+
.replace(/::key::/g, answers.key)
|
|
107
|
+
.replace(/::year::/g, theyear)
|
|
108
|
+
.replace(/::key-upper::/g, answers.key.toUpperCase())
|
|
109
|
+
.replace(/::name::/g, answers.name)
|
|
110
|
+
.replace(/::describe::/g, answers.describe)
|
|
111
|
+
.replace(/::gender::/g, answers.gender)
|
|
112
|
+
.replace(/::pronouns::/g, answers.pronouns)
|
|
113
|
+
.replace(/::vector::/g, answers.vector)
|
|
114
|
+
.replace(/::vla::/g, this.info().VLA.uid)
|
|
115
|
+
.replace(/::date::/g, this.lib.formatDate(Date.now(), 'long', true));
|
|
116
|
+
|
|
117
|
+
// PUSH THE NEWLY CREATED FILE TO THE CREATE FILES ARRAY VARIABLE
|
|
118
|
+
this.vars.create.files.push({copy_to_file, content});
|
|
119
|
+
|
|
120
|
+
return resolve(this.vars.messages.que_complete);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
});
|
|
125
|
+
},
|
|
126
|
+
que() {
|
|
127
|
+
const { copy_from, copy_to } = this.vars.paths;
|
|
128
|
+
if (!copy_from) return console.log('no files to copy from');
|
|
129
|
+
if (!copy_to) return console.log('no files to copy to');
|
|
130
|
+
console.log(this.vars.messages.que_heading);
|
|
131
|
+
console.log(`↪ fr: ${copy_from}`);
|
|
132
|
+
console.log(`↪ to: ${copy_to}`);
|
|
133
|
+
this.func.queFiles(copy_from, copy_to).then(filesQued => {
|
|
134
|
+
this.prompt(filesQued);
|
|
135
|
+
return this.func.createDeva();
|
|
136
|
+
}).then(devaCreated => {
|
|
137
|
+
this.prompt(devaCreated);
|
|
138
|
+
const {key} = this.vars.answers;
|
|
139
|
+
this.prompt(`👉 Add ${key} to your Deva loader: import ${key} from './${key}/index.js';`);
|
|
140
|
+
}).catch(err => {
|
|
141
|
+
console.error('🛑 ERROR', err);
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
createDeva() {
|
|
146
|
+
this.func.baseDevaDirectory();
|
|
147
|
+
const {files,directories} = this.vars.create;
|
|
148
|
+
directories.forEach(dir => {
|
|
149
|
+
console.log(`${this.vars.messages.folder} ${dir}`);
|
|
150
|
+
this.lib.fs.mkdirSync(dir);
|
|
151
|
+
});
|
|
152
|
+
files.forEach(file => {
|
|
153
|
+
this.lib.fs.writeFileSync(file.copy_to_file, file.content)
|
|
154
|
+
console.log(`${this.vars.messages.file} ${file.copy_to_file}`);
|
|
155
|
+
});
|
|
156
|
+
return Promise.resolve(`${this.vars.messages.deva_created} ${this.vars.answers.key} (${this.vars.answers.name}) `);
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
methods: {
|
|
162
|
+
async inquire() {
|
|
163
|
+
// this sets up a custom directory question for the user which is not in the json data
|
|
164
|
+
this.vars.questions.push({ // append directory to questions because of __dirname
|
|
165
|
+
type: 'input', // set the input type
|
|
166
|
+
name: 'directory', // set the name
|
|
167
|
+
message: 'DIRECTORY', // set the MESSAGE
|
|
168
|
+
default: this.lib.path.join(process.cwd(), 'devas'), // set the default path for the question
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
// ask each question with readline and keep the default when the answer is blank
|
|
172
|
+
const rl = readline.createInterface({input: process.stdin, output: process.stdout});
|
|
173
|
+
const answers = {};
|
|
174
|
+
for (const question of this.vars.questions) {
|
|
175
|
+
const def = question.default ? ` (${question.default})` : '';
|
|
176
|
+
const answer = await rl.question(`${question.message}${def}: `);
|
|
177
|
+
answers[question.name] = answer.trim() || question.default || '';
|
|
178
|
+
}
|
|
179
|
+
rl.close();
|
|
180
|
+
|
|
181
|
+
// set the options variable to load what the BUDDY was configured with.
|
|
182
|
+
this.vars.paths = {
|
|
183
|
+
copy_from: this.lib.path.join(__dirname, 'template'),
|
|
184
|
+
copy_to: this.lib.path.join(answers.directory, answers.key),
|
|
185
|
+
copy_to_base: answers.directory,
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
this.prompt('::::::::::::::::::::::::::::');
|
|
189
|
+
this.prompt(this.vars.messages.heading);
|
|
190
|
+
|
|
191
|
+
for (let answer in answers) {
|
|
192
|
+
this.prompt(`↪ ${answer.toUpperCase()}: ${answers[answer]}`);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
this.prompt('::::::::::::::::::::::::::::');
|
|
196
|
+
|
|
197
|
+
// now this is where we take the
|
|
198
|
+
this.vars.answers = answers;
|
|
199
|
+
return this.func.que();
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
onInit(data, resolve) {
|
|
203
|
+
this.prompt(flash);
|
|
204
|
+
return this.start(data, resolve);
|
|
205
|
+
},
|
|
206
|
+
onReady(data, resolve) {
|
|
207
|
+
this.prompt(this._messages.ready);
|
|
208
|
+
this.methods.inquire(); // when buddy inits then run the inquire method.
|
|
209
|
+
return resolve(data);
|
|
210
|
+
},
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
DevaBuddy.init(client);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "::name:: Data File",
|
|
3
|
+
"describe": "The main Data file for ::name::",
|
|
4
|
+
"copyright": "Copyright ©::year:: ::owner::. All rights reserved.",
|
|
5
|
+
"DATA": {
|
|
6
|
+
"agent": {
|
|
7
|
+
"id": "::id::",
|
|
8
|
+
"key": "::key::",
|
|
9
|
+
"prompt": {
|
|
10
|
+
"emoji": "⊙",
|
|
11
|
+
"text": "::key::",
|
|
12
|
+
"colors": {
|
|
13
|
+
"label": {
|
|
14
|
+
"R": 0,
|
|
15
|
+
"G": 150,
|
|
16
|
+
"B": 255
|
|
17
|
+
},
|
|
18
|
+
"text": {
|
|
19
|
+
"R": 101,
|
|
20
|
+
"G": 192,
|
|
21
|
+
"B": 255
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"profile": {
|
|
26
|
+
"id": "::id::",
|
|
27
|
+
"name": "::name::",
|
|
28
|
+
"title": "",
|
|
29
|
+
"subtitle": "",
|
|
30
|
+
"describe": "::describe::",
|
|
31
|
+
"vector": "::vector::",
|
|
32
|
+
"vectors": "",
|
|
33
|
+
"pronouns": "::pronouns::",
|
|
34
|
+
"gender": "::gender::",
|
|
35
|
+
"style": "",
|
|
36
|
+
"voice": "alloy",
|
|
37
|
+
"system": "Deva.world",
|
|
38
|
+
"layout": "default",
|
|
39
|
+
"tweet": "",
|
|
40
|
+
"color": "#000000",
|
|
41
|
+
"bgcolor": "#ffffff",
|
|
42
|
+
"emoji": "/assets/emoji.png",
|
|
43
|
+
"avatar": "/assets/avatar.png",
|
|
44
|
+
"image": "/assets/imgae.png",
|
|
45
|
+
"background": "/assets/background.png",
|
|
46
|
+
"owner": "::owner::",
|
|
47
|
+
"creator": "::owner::",
|
|
48
|
+
"created": "::date::"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"vars": {
|
|
52
|
+
"messages": {
|
|
53
|
+
"init": "🟠 INIT",
|
|
54
|
+
"start": "🔵 START",
|
|
55
|
+
"enter": "🟢 ENTER",
|
|
56
|
+
"stop": "🔴 STOP",
|
|
57
|
+
"exit": "🟡 EXIT",
|
|
58
|
+
"done": "🟣 DONE",
|
|
59
|
+
"error": "💣 ERROR!",
|
|
60
|
+
"ready": "⭐️ READY!"
|
|
61
|
+
},
|
|
62
|
+
"context": {
|
|
63
|
+
"uid": "::name:: is creating a uid",
|
|
64
|
+
"status": "::name:: is viewing the status",
|
|
65
|
+
"help": "::name:: is viewing the help"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// ::name:: Corpus
|
|
2
|
+
// Copyright ©::year:: ::owner::; All rights reserved.
|
|
3
|
+
// Owner Signature Required For Lawful Use.
|
|
4
|
+
// Distributed under VLA:::vla:: LICENSE.md
|
|
5
|
+
// ::date::
|
|
6
|
+
|
|
7
|
+
::BEGIN:MAIN
|
|
8
|
+
# {{profile.name}}
|
|
9
|
+
|
|
10
|
+
p: {{profile.describe}}
|
|
11
|
+
|
|
12
|
+
copyright: {{profile.copyright}}
|
|
13
|
+
::END:MAIN
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// ::name:: Help
|
|
2
|
+
// Copyright ©::year:: ::owner::; All rights reserved.
|
|
3
|
+
// Owner Signature Required For Lawful Use.
|
|
4
|
+
// Distributed under VLA:::vla:: LICENSE.md
|
|
5
|
+
// ::date::
|
|
6
|
+
|
|
7
|
+
::BEGIN:MAIN
|
|
8
|
+
# {{profile.name}}
|
|
9
|
+
|
|
10
|
+
img: {{profile.image}}
|
|
11
|
+
|
|
12
|
+
{{profile}}
|
|
13
|
+
|
|
14
|
+
talk: #::key:: help main:license
|
|
15
|
+
|
|
16
|
+
::begin:hidden
|
|
17
|
+
#color = {{profile.color}}
|
|
18
|
+
#bgcolor = {{profile.bgcolor}}
|
|
19
|
+
#bg = {{profile.background}}
|
|
20
|
+
copyright: {{profile.copyright}}
|
|
21
|
+
::end:hidden
|
|
22
|
+
::END:MAIN
|
|
23
|
+
|
|
24
|
+
::BEGIN:LICENSE
|
|
25
|
+
::END:LICENSE
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// ::name::
|
|
2
|
+
// Copyright ©::year:: ::owner::; All rights reserved.
|
|
3
|
+
// Owner Signature Required For Lawful Use.
|
|
4
|
+
// Distributed under VLA:::vla:: LICENSE.md
|
|
5
|
+
// ::date::
|
|
6
|
+
|
|
7
|
+
import Deva from '@indra.ai/deva';
|
|
8
|
+
// make sure to correct for package location to match
|
|
9
|
+
import pkg from '../../package.json' with {type:'json'};
|
|
10
|
+
|
|
11
|
+
import data from './data/index.json' with {type:'json'};
|
|
12
|
+
const {agent,vars} = data.DATA;
|
|
13
|
+
|
|
14
|
+
// set the __dirname
|
|
15
|
+
import {dirname} from 'node:path';
|
|
16
|
+
import {fileURLToPath} from 'node:url';
|
|
17
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
18
|
+
|
|
19
|
+
const info = {
|
|
20
|
+
id: pkg.id,
|
|
21
|
+
name: pkg.name,
|
|
22
|
+
version: pkg.version,
|
|
23
|
+
author: pkg.author,
|
|
24
|
+
describe: pkg.description,
|
|
25
|
+
dir: __dirname,
|
|
26
|
+
url: pkg.homepage,
|
|
27
|
+
git: pkg.repository.url,
|
|
28
|
+
bugs: pkg.bugs.url,
|
|
29
|
+
license: pkg.license,
|
|
30
|
+
copyright: pkg.copyright,
|
|
31
|
+
VLA: pkg.VLA,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const ::key-upper:: = new Deva({
|
|
35
|
+
info,
|
|
36
|
+
agent,
|
|
37
|
+
vars,
|
|
38
|
+
utils: {
|
|
39
|
+
translate(input) {return input.trim();},
|
|
40
|
+
parse(input) {return input.trim();},
|
|
41
|
+
process(input) {return input.trim();},
|
|
42
|
+
},
|
|
43
|
+
listeners: {},
|
|
44
|
+
modules: {},
|
|
45
|
+
devas: {},
|
|
46
|
+
func: {},
|
|
47
|
+
methods: {},
|
|
48
|
+
onReady(data, resolve) {
|
|
49
|
+
this.prompt(this.vars.messages.ready);
|
|
50
|
+
return resolve(data);
|
|
51
|
+
},
|
|
52
|
+
onError(data, err, reject) {
|
|
53
|
+
this.prompt(this.vars.messages.error);
|
|
54
|
+
console.log(err);
|
|
55
|
+
return reject(err);
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
export default ::key-upper::
|
package/devas/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Deva Loader
|
|
3
|
+
// Copyright ©2000-2026 Quinn Michaels; All rights reserved.
|
|
4
|
+
// Owner Signature Required For Lawful Use.
|
|
5
|
+
// Distributed under VLA:31711622713594414221 LICENSE.md
|
|
6
|
+
// Sunday, November 1, 2026 - 10:04:59 PM PST
|
|
7
|
+
|
|
8
|
+
import test from './test/index.js';
|
|
9
|
+
|
|
10
|
+
const DEVAS = {
|
|
11
|
+
test,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default DEVAS;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "test Data File",
|
|
3
|
+
"describe": "The main Data file for test",
|
|
4
|
+
"copyright": "Copyright ©2026 Quinn Michaels. All rights reserved.",
|
|
5
|
+
"DATA": {
|
|
6
|
+
"agent": {
|
|
7
|
+
"id": "52016091124527523410",
|
|
8
|
+
"key": "test",
|
|
9
|
+
"prompt": {
|
|
10
|
+
"emoji": "⊙",
|
|
11
|
+
"text": "test",
|
|
12
|
+
"colors": {
|
|
13
|
+
"label": {
|
|
14
|
+
"R": 0,
|
|
15
|
+
"G": 150,
|
|
16
|
+
"B": 255
|
|
17
|
+
},
|
|
18
|
+
"text": {
|
|
19
|
+
"R": 101,
|
|
20
|
+
"G": 192,
|
|
21
|
+
"B": 255
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"profile": {
|
|
26
|
+
"id": "52016091124527523410",
|
|
27
|
+
"name": "test",
|
|
28
|
+
"title": "",
|
|
29
|
+
"subtitle": "",
|
|
30
|
+
"describe": "test",
|
|
31
|
+
"vectors": "::vectors::",
|
|
32
|
+
"pronouns": "test",
|
|
33
|
+
"gender": "DEVA",
|
|
34
|
+
"style": "",
|
|
35
|
+
"voice": "alloy",
|
|
36
|
+
"system": "Deva.world",
|
|
37
|
+
"layout": "default",
|
|
38
|
+
"tweet": "",
|
|
39
|
+
"color": "#000000",
|
|
40
|
+
"bgcolor": "#ffffff",
|
|
41
|
+
"emoji": "/assets/emoji.png",
|
|
42
|
+
"avatar": "/assets/avatar.png",
|
|
43
|
+
"image": "/assets/imgae.png",
|
|
44
|
+
"background": "/assets/background.png",
|
|
45
|
+
"owner": "Quinn Michaels",
|
|
46
|
+
"creator": "Quinn Michaels",
|
|
47
|
+
"created": "Monday, November 16, 2026 - 11:42:26 AM"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"vars": {
|
|
51
|
+
"messages": {
|
|
52
|
+
"init": "🟠 INIT",
|
|
53
|
+
"start": "🔵 START",
|
|
54
|
+
"enter": "🟢 ENTER",
|
|
55
|
+
"stop": "🔴 STOP",
|
|
56
|
+
"exit": "🟡 EXIT",
|
|
57
|
+
"done": "🟣 DONE",
|
|
58
|
+
"error": "💣 ERROR!",
|
|
59
|
+
"ready": "⭐️ READY!"
|
|
60
|
+
},
|
|
61
|
+
"context": {
|
|
62
|
+
"uid": "test is creating a uid",
|
|
63
|
+
"status": "test is viewing the status",
|
|
64
|
+
"help": "test is viewing the help"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// test Corpus
|
|
2
|
+
// Copyright ©2026 Quinn Michaels; All rights reserved.
|
|
3
|
+
// Owner Signature Required For Lawful Use.
|
|
4
|
+
// Distributed under VLA:31711622713594414221 LICENSE.md
|
|
5
|
+
// Monday, November 16, 2026 - 11:42:26 AM
|
|
6
|
+
|
|
7
|
+
::BEGIN:MAIN
|
|
8
|
+
# {{profile.name}}
|
|
9
|
+
|
|
10
|
+
p: {{profile.describe}}
|
|
11
|
+
|
|
12
|
+
copyright: {{profile.copyright}}
|
|
13
|
+
::END:MAIN
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// test Help
|
|
2
|
+
// Copyright ©2026 Quinn Michaels; All rights reserved.
|
|
3
|
+
// Owner Signature Required For Lawful Use.
|
|
4
|
+
// Distributed under VLA:31711622713594414221 LICENSE.md
|
|
5
|
+
// Monday, November 16, 2026 - 11:42:26 AM
|
|
6
|
+
|
|
7
|
+
::BEGIN:MAIN
|
|
8
|
+
# {{profile.name}}
|
|
9
|
+
|
|
10
|
+
img: {{profile.image}}
|
|
11
|
+
|
|
12
|
+
{{profile}}
|
|
13
|
+
|
|
14
|
+
talk: #test help main:license
|
|
15
|
+
|
|
16
|
+
::begin:hidden
|
|
17
|
+
#color = {{profile.color}}
|
|
18
|
+
#bgcolor = {{profile.bgcolor}}
|
|
19
|
+
#bg = {{profile.background}}
|
|
20
|
+
copyright: {{profile.copyright}}
|
|
21
|
+
::end:hidden
|
|
22
|
+
::END:MAIN
|
|
23
|
+
|
|
24
|
+
::BEGIN:LICENSE
|
|
25
|
+
::END:LICENSE
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// test
|
|
2
|
+
// Copyright ©2026 Quinn Michaels; All rights reserved.
|
|
3
|
+
// Owner Signature Required For Lawful Use.
|
|
4
|
+
// Distributed under VLA:31711622713594414221 LICENSE.md
|
|
5
|
+
// Monday, November 16, 2026 - 11:42:26 AM
|
|
6
|
+
|
|
7
|
+
import Deva from '@indra.ai/deva';
|
|
8
|
+
// make sure to correct for package location to match
|
|
9
|
+
import pkg from '../../package.json' with {type:'json'};
|
|
10
|
+
|
|
11
|
+
import data from './data/index.json' with {type:'json'};
|
|
12
|
+
const {agent,vars} = data.DATA;
|
|
13
|
+
|
|
14
|
+
// set the __dirname
|
|
15
|
+
import {dirname} from 'node:path';
|
|
16
|
+
import {fileURLToPath} from 'node:url';
|
|
17
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
18
|
+
|
|
19
|
+
const info = {
|
|
20
|
+
id: pkg.id,
|
|
21
|
+
name: pkg.name,
|
|
22
|
+
version: pkg.version,
|
|
23
|
+
author: pkg.author,
|
|
24
|
+
describe: pkg.description,
|
|
25
|
+
dir: __dirname,
|
|
26
|
+
url: pkg.homepage,
|
|
27
|
+
git: pkg.repository.url,
|
|
28
|
+
bugs: pkg.bugs.url,
|
|
29
|
+
license: pkg.license,
|
|
30
|
+
copyright: pkg.copyright,
|
|
31
|
+
VLA: pkg.VLA,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const TEST = new Deva({
|
|
35
|
+
info,
|
|
36
|
+
agent,
|
|
37
|
+
vars,
|
|
38
|
+
utils: {
|
|
39
|
+
translate(input) {return input.trim();},
|
|
40
|
+
parse(input) {return input.trim();},
|
|
41
|
+
process(input) {return input.trim();},
|
|
42
|
+
},
|
|
43
|
+
listeners: {},
|
|
44
|
+
modules: {},
|
|
45
|
+
devas: {},
|
|
46
|
+
func: {},
|
|
47
|
+
methods: {},
|
|
48
|
+
onReady(data, resolve) {
|
|
49
|
+
this.prompt(this.vars.messages.ready);
|
|
50
|
+
return resolve(data);
|
|
51
|
+
},
|
|
52
|
+
onError(data, err, reject) {
|
|
53
|
+
this.prompt(this.vars.messages.error);
|
|
54
|
+
console.log(err);
|
|
55
|
+
return reject(err);
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
export default TEST
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "31711622713594414221",
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.65.11",
|
|
5
5
|
"description": "Deva Core a Vedic-based Event Driven Context Aware Feature, Zone, Action, and State Machine integrated Artificial Intelligence Framework",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"license": "VLA:31711622713594414221 LICENSE.md",
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"type": "module",
|
|
50
50
|
"scripts": {
|
|
51
51
|
"test": "node --test \"tests/suite/*.test.js\"",
|
|
52
|
-
"demo": "node tests"
|
|
52
|
+
"demo": "node tests",
|
|
53
|
+
"buddy": "node buddy/index.js"
|
|
53
54
|
},
|
|
54
55
|
"repository": {
|
|
55
56
|
"type": "git",
|