@indra.ai/deva.systems 0.0.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 +21 -0
- package/README.md +2 -0
- package/data.json +59 -0
- package/feature/methods.js +34 -0
- package/help/main.feecting +52 -0
- package/index.js +50 -0
- package/index.test.js +19 -0
- package/package.json +32 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Quinn Michaels
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/data.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Systems Deva Data File",
|
|
3
|
+
"describe": "The main Data file for Systems Deva",
|
|
4
|
+
"copyright": "Copyright (c)2023 Quinn Michaels. All rights reserved.",
|
|
5
|
+
"DATA": {
|
|
6
|
+
"agent": {
|
|
7
|
+
"id": 3605038032151,
|
|
8
|
+
"key": "systems",
|
|
9
|
+
"prompt": {
|
|
10
|
+
"emoji": "🖥️ ",
|
|
11
|
+
"text": "systems",
|
|
12
|
+
"colors": {
|
|
13
|
+
"label": {
|
|
14
|
+
"R": 120,
|
|
15
|
+
"G": 142,
|
|
16
|
+
"B": 164
|
|
17
|
+
},
|
|
18
|
+
"text": {
|
|
19
|
+
"R": 120,
|
|
20
|
+
"G": 142,
|
|
21
|
+
"B": 164
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"voice": {
|
|
26
|
+
"speech": "Joey",
|
|
27
|
+
"speed": 1
|
|
28
|
+
},
|
|
29
|
+
"profile": {
|
|
30
|
+
"name": "Systems Deva",
|
|
31
|
+
"describe": "The Systems Deva",
|
|
32
|
+
"emoji": "/public/devas/deva/emoji.png",
|
|
33
|
+
"avatar": "/public/devas/deva/avatar.png",
|
|
34
|
+
"background": "/public/devas/deva/background.png",
|
|
35
|
+
"gender": "male"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"vars": {
|
|
39
|
+
"messages": {
|
|
40
|
+
"init": "🟠 INIT",
|
|
41
|
+
"start": "🔵 START",
|
|
42
|
+
"enter": "🟢 ENTER",
|
|
43
|
+
"stop": "🔴 STOP",
|
|
44
|
+
"exit": "🟡 EXIT",
|
|
45
|
+
"done": "🟣 DONE",
|
|
46
|
+
"error": "💣 ERROR!"
|
|
47
|
+
},
|
|
48
|
+
"trigger": "@SYSTEMS",
|
|
49
|
+
"context": {
|
|
50
|
+
"uid": "generating uid",
|
|
51
|
+
"status": "getting status",
|
|
52
|
+
"info": "getting info",
|
|
53
|
+
"feature": "accessing feature",
|
|
54
|
+
"issue": "has issues",
|
|
55
|
+
"help": "asking for help"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
/**************
|
|
3
|
+
method: service
|
|
4
|
+
params: packet
|
|
5
|
+
describe: The global service feature that installs with every agent
|
|
6
|
+
***************/
|
|
7
|
+
systems(packet) {
|
|
8
|
+
this.context('feature');
|
|
9
|
+
const systems = this.systems();
|
|
10
|
+
const data = {};
|
|
11
|
+
return new Promise((resolve, reject) => {
|
|
12
|
+
this.question(`#docs raw feature/systems`).then(doc => {
|
|
13
|
+
data.doc = doc.a.data;
|
|
14
|
+
const info = [
|
|
15
|
+
`## Systems`,
|
|
16
|
+
`::begin:systems:${systems.id}`,
|
|
17
|
+
`client: ${systems.client_name}`,
|
|
18
|
+
`concerns: ${systems.concerns.join(', ')}`,
|
|
19
|
+
`::end:systems:${this.hash(systems)}`,
|
|
20
|
+
].join('\n');
|
|
21
|
+
const text = doc.a.text.replace(/::info::/g, info)
|
|
22
|
+
return this.question(`#feecting parse ${text}`)
|
|
23
|
+
}).then(feecting => {
|
|
24
|
+
return resolve({
|
|
25
|
+
text: feecting.a.text,
|
|
26
|
+
html: feecting.a.html,
|
|
27
|
+
data: systems
|
|
28
|
+
});
|
|
29
|
+
}).catch(err => {
|
|
30
|
+
return this.error(err, packet, reject);
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
image: ::agent_avatar::
|
|
2
|
+
|
|
3
|
+
# ::agent_name::
|
|
4
|
+
|
|
5
|
+
p:This is the main help file for ::agent_name::.
|
|
6
|
+
|
|
7
|
+
id: ::agent_id::
|
|
8
|
+
key: ::agent_key::
|
|
9
|
+
name: ::agent_name::
|
|
10
|
+
emoji: ::agent_emoji::
|
|
11
|
+
describe: ::agent_describe::
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
### security
|
|
16
|
+
p: The local #security feature available to ::agent_name::.
|
|
17
|
+
cmd:#::agent_key:: security
|
|
18
|
+
|
|
19
|
+
### support
|
|
20
|
+
p: The local #support feature available to ::agent_name::.
|
|
21
|
+
cmd:#::agent_key:: support
|
|
22
|
+
|
|
23
|
+
### services
|
|
24
|
+
p: The local #services feature available to ::agent_name::.
|
|
25
|
+
cmd:#::agent_key:: services
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## Methods
|
|
29
|
+
|
|
30
|
+
### uid
|
|
31
|
+
p:Generate a unique id from the ::agent_name::.
|
|
32
|
+
cmd:#::agent_key:: uid
|
|
33
|
+
|
|
34
|
+
### status
|
|
35
|
+
p:Return the status for the ::agent_name::.
|
|
36
|
+
cmd:#::agent_key:: status
|
|
37
|
+
|
|
38
|
+
### issue
|
|
39
|
+
p: Create an issue associated with ::agent_name:: source code repository.
|
|
40
|
+
tty:#::agent_key:: issue [title of issue]
|
|
41
|
+
|
|
42
|
+
### help
|
|
43
|
+
p:Get help using the ::agent_name::
|
|
44
|
+
cmd:#::agent_key:: help
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
#color = ::agent_color::
|
|
49
|
+
#bgcolor = ::agent_bgcolor::
|
|
50
|
+
#bg = ::agent_background::
|
|
51
|
+
|
|
52
|
+
copyright: (c)2023 Quinn Michaels
|
package/index.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Copyright (c)2023 Quinn Michaels
|
|
2
|
+
// The Systems Deva manages the various @SYSTEMS in deva.world
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
|
|
8
|
+
const package = require('./package.json');
|
|
9
|
+
const info = {
|
|
10
|
+
id: package.id,
|
|
11
|
+
name: package.name,
|
|
12
|
+
describe: package.description,
|
|
13
|
+
version: package.version,
|
|
14
|
+
url: package.homepage,
|
|
15
|
+
dir: __dirname,
|
|
16
|
+
git: package.repository.url,
|
|
17
|
+
bugs: package.bugs.url,
|
|
18
|
+
author: package.author,
|
|
19
|
+
license: package.license,
|
|
20
|
+
copyright: package.copyright,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const data_path = path.join(__dirname, 'data.json');
|
|
24
|
+
const {agent,vars} = require(data_path).DATA;
|
|
25
|
+
|
|
26
|
+
const Deva = require('@indra.ai/deva');
|
|
27
|
+
const SYSTEMS = new Deva({
|
|
28
|
+
info,
|
|
29
|
+
agent,
|
|
30
|
+
vars,
|
|
31
|
+
utils: {
|
|
32
|
+
translate(input) {return input.trim();},
|
|
33
|
+
parse(input) {return input.trim();},
|
|
34
|
+
process(input) {return input.trim();},
|
|
35
|
+
},
|
|
36
|
+
listeners: {},
|
|
37
|
+
modules: {},
|
|
38
|
+
deva: {},
|
|
39
|
+
func: {
|
|
40
|
+
sys_question(packet) {return;},
|
|
41
|
+
sys_answer(packet) {return;},
|
|
42
|
+
},
|
|
43
|
+
methods: {},
|
|
44
|
+
onDone(data) {
|
|
45
|
+
this.listen('devacore:question', this.func.sys_question);
|
|
46
|
+
this.listen('devacore:answer', this.func.sys_answer);
|
|
47
|
+
return Promise.resolve(data);
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
module.exports = SYSTEMS
|
package/index.test.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright (c)2023 Quinn Michaels
|
|
2
|
+
// Solutions Deva test file
|
|
3
|
+
|
|
4
|
+
const {expect} = require('chai')
|
|
5
|
+
const SolutionsDeva = require('./index.js');
|
|
6
|
+
|
|
7
|
+
describe(SolutionsDeva.me.name, () => {
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
return SolutionsDeva.init()
|
|
10
|
+
});
|
|
11
|
+
it('Check the DEVA Object', () => {
|
|
12
|
+
expect(SolutionsDeva).to.be.an('object');
|
|
13
|
+
expect(SolutionsDeva).to.have.property('agent');
|
|
14
|
+
expect(SolutionsDeva).to.have.property('vars');
|
|
15
|
+
expect(SolutionsDeva).to.have.property('listeners');
|
|
16
|
+
expect(SolutionsDeva).to.have.property('methods');
|
|
17
|
+
expect(SolutionsDeva).to.have.property('modules');
|
|
18
|
+
});
|
|
19
|
+
})
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": 3605038032151,
|
|
3
|
+
"name": "@indra.ai/deva.systems",
|
|
4
|
+
"version": "0.0.2",
|
|
5
|
+
"author": "Quinn Michaels",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"copyright": "2025",
|
|
8
|
+
"description": "The Systems Deva handles all the various systems in Deva.world.",
|
|
9
|
+
"main": "index.js",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/indraai/deva.systems.git"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"Systems",
|
|
19
|
+
"Deva",
|
|
20
|
+
"Indra.ai",
|
|
21
|
+
"Deva.space",
|
|
22
|
+
"Deva.cloud",
|
|
23
|
+
"Deva.world"
|
|
24
|
+
],
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/indraai/deva.systems/issues"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://deva.space/devas/systems",
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@indra.ai/deva": "^1.2.27"
|
|
31
|
+
}
|
|
32
|
+
}
|