@indra.ai/deva.algorithm 0.0.1
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/help/main.feecting +50 -0
- package/index.js +52 -0
- package/index.test.js +19 -0
- package/package.json +95 -0
- package/packs/indra.ai-deva.algorithm-0.0.1.tgz +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# ::agent_name::
|
|
2
|
+
|
|
3
|
+
p:This is the main help file for ::agent_name::.
|
|
4
|
+
|
|
5
|
+
id: ::agent_id::
|
|
6
|
+
key: ::agent_key::
|
|
7
|
+
name: ::agent_name::
|
|
8
|
+
emoji: ::agent_emoji::
|
|
9
|
+
describe: ::agent_describe::
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
### security
|
|
14
|
+
p: The local #security feature available to ::agent_name::.
|
|
15
|
+
cmd:#::agent_key:: security
|
|
16
|
+
|
|
17
|
+
### support
|
|
18
|
+
p: The local #support feature available to ::agent_name::.
|
|
19
|
+
cmd:#::agent_key:: support
|
|
20
|
+
|
|
21
|
+
### services
|
|
22
|
+
p: The local #services feature available to ::agent_name::.
|
|
23
|
+
cmd:#::agent_key:: services
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## Methods
|
|
27
|
+
|
|
28
|
+
### uid
|
|
29
|
+
p:Generate a unique id from the ::agent_name::.
|
|
30
|
+
cmd:#::agent_key:: uid
|
|
31
|
+
|
|
32
|
+
### today
|
|
33
|
+
p:Generate a date from the ::agent_name::.
|
|
34
|
+
cmd:#::agent_key:: today
|
|
35
|
+
|
|
36
|
+
### status
|
|
37
|
+
p:Return the status for the ::agent_name::.
|
|
38
|
+
cmd:#::agent_key:: status
|
|
39
|
+
|
|
40
|
+
### help
|
|
41
|
+
p:Get help using the ::agent_name::
|
|
42
|
+
cmd:#::agent_key:: help
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
#color = ::agent_color::
|
|
47
|
+
#bgcolor = ::agent_bgcolor::
|
|
48
|
+
#bg = ::agent_background::
|
|
49
|
+
|
|
50
|
+
copyright: (c)2025 Quinn Michaels; All rights reserved.
|
package/index.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Copyright (c)2025 Quinn Michaels
|
|
2
|
+
// Algorithm Deva
|
|
3
|
+
import Deva from '@indra.ai/deva';
|
|
4
|
+
import pkg from './package.json' with {type:'json'};
|
|
5
|
+
|
|
6
|
+
import data from './data.json' with {type:'json'};
|
|
7
|
+
const {agent,vars} = data.DATA;
|
|
8
|
+
|
|
9
|
+
// set the __dirname
|
|
10
|
+
import {dirname} from 'node:path';
|
|
11
|
+
import {fileURLToPath} from 'node:url';
|
|
12
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
13
|
+
|
|
14
|
+
const info = {
|
|
15
|
+
id: pkg.id,
|
|
16
|
+
name: pkg.name,
|
|
17
|
+
describe: pkg.description,
|
|
18
|
+
version: pkg.version,
|
|
19
|
+
url: pkg.homepage,
|
|
20
|
+
dir: __dirname,
|
|
21
|
+
git: pkg.repository.url,
|
|
22
|
+
bugs: pkg.bugs.url,
|
|
23
|
+
author: pkg.author,
|
|
24
|
+
license: pkg.license,
|
|
25
|
+
copyright: pkg.copyright,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const ALGORITHM = new Deva({
|
|
29
|
+
info,
|
|
30
|
+
agent,
|
|
31
|
+
vars,
|
|
32
|
+
utils: {
|
|
33
|
+
translate(input) {return input.trim();},
|
|
34
|
+
parse(input) {return input.trim();},
|
|
35
|
+
process(input) {return input.trim();}
|
|
36
|
+
},
|
|
37
|
+
listeners: {},
|
|
38
|
+
modules: {},
|
|
39
|
+
deva: {},
|
|
40
|
+
func: {},
|
|
41
|
+
methods: {},
|
|
42
|
+
onReady(data, resolve) {
|
|
43
|
+
this.prompt(this.vars.messages.ready);
|
|
44
|
+
return resolve(data);
|
|
45
|
+
},
|
|
46
|
+
onError(err, data, reject) {
|
|
47
|
+
this.prompt(this.vars.messages.error);
|
|
48
|
+
console.log(err);
|
|
49
|
+
return reject(err);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export default ALGORITHM
|
package/index.test.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright (c):year: :copyright:
|
|
2
|
+
// :name: test file
|
|
3
|
+
|
|
4
|
+
const {expect} = require('chai')
|
|
5
|
+
const AuthorityDeva = require('./index.js');
|
|
6
|
+
|
|
7
|
+
describe(AuthorityDeva.me.name, () => {
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
return AuthorityDeva.init()
|
|
10
|
+
});
|
|
11
|
+
it('Check the DEVA Object', () => {
|
|
12
|
+
expect(AuthorityDeva).to.be.an('object');
|
|
13
|
+
expect(AuthorityDeva).to.have.property('agent');
|
|
14
|
+
expect(AuthorityDeva).to.have.property('vars');
|
|
15
|
+
expect(AuthorityDeva).to.have.property('listeners');
|
|
16
|
+
expect(AuthorityDeva).to.have.property('methods');
|
|
17
|
+
expect(AuthorityDeva).to.have.property('modules');
|
|
18
|
+
});
|
|
19
|
+
})
|
package/package.json
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": 2786414868244,
|
|
3
|
+
"name": "@indra.ai/deva.algorithm",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"author": "Quinn Michaels",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"copyright": "2025",
|
|
8
|
+
"description": "The Algorithm Deva manages algorithms ensuring Quinn Michaels and his intellectual property is managed properly.",
|
|
9
|
+
"main": "index.js",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/indraai/deva.algorithm.git"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"Algorithm",
|
|
20
|
+
"Indra.ai",
|
|
21
|
+
"Deva.space",
|
|
22
|
+
"Deva.cloud",
|
|
23
|
+
"Deva.world"
|
|
24
|
+
],
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/indraai/deva.algorithm/issues"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://deva.space/devas/algorithm",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@indra.ai/deva": "^1.4.10"
|
|
31
|
+
},
|
|
32
|
+
"data": {
|
|
33
|
+
"agent": {
|
|
34
|
+
"id": 2786414868244,
|
|
35
|
+
"key": "algo",
|
|
36
|
+
"prompt": {
|
|
37
|
+
"emoji": "👮",
|
|
38
|
+
"text": "Algorithm",
|
|
39
|
+
"colors": {
|
|
40
|
+
"label": {
|
|
41
|
+
"R": 248,
|
|
42
|
+
"G": 18,
|
|
43
|
+
"B": 19
|
|
44
|
+
},
|
|
45
|
+
"text": {
|
|
46
|
+
"R": 18,
|
|
47
|
+
"G": 94,
|
|
48
|
+
"B": 248
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"profile": {
|
|
53
|
+
"name": "Authority Deva",
|
|
54
|
+
"pronouns": "He, Him",
|
|
55
|
+
"gender": "DEVA",
|
|
56
|
+
"owner": "Quinn Michaels",
|
|
57
|
+
"creator": "Quinn Michaels",
|
|
58
|
+
"created": "February 7, 2025 at 8:02 PM",
|
|
59
|
+
"system": "Deva.world.authority",
|
|
60
|
+
"describe": "Algorithm Deva is responsible for handling algorithms in Deva.world.",
|
|
61
|
+
"emoji": "/public/devas/deva/emoji.png",
|
|
62
|
+
"avatar": "/public/devas/deva/avatar.png",
|
|
63
|
+
"color": "#ffffff",
|
|
64
|
+
"bgcolor": "#000000",
|
|
65
|
+
"background": "/public/devas/deva/background.png",
|
|
66
|
+
"voice": "onyx"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"vars": {
|
|
70
|
+
"messages": {
|
|
71
|
+
"init": "🟠 INIT",
|
|
72
|
+
"start": "🔵 START",
|
|
73
|
+
"enter": "🟢 ENTER",
|
|
74
|
+
"ready": "⭐️ Algorithm Deva Ready!",
|
|
75
|
+
"stop": "🔴 STOP",
|
|
76
|
+
"exit": "🟡 EXIT",
|
|
77
|
+
"done": "🟣 DONE",
|
|
78
|
+
"error": "💣 ERROR!"
|
|
79
|
+
},
|
|
80
|
+
"trigger": "@LEGAL",
|
|
81
|
+
"context": {
|
|
82
|
+
"uid": "generating uid",
|
|
83
|
+
"status": "getting status",
|
|
84
|
+
"info": "getting info",
|
|
85
|
+
"feature": "accessing feature",
|
|
86
|
+
"issue": "has issues",
|
|
87
|
+
"help": "asking for help",
|
|
88
|
+
"file": "📁 File"
|
|
89
|
+
},
|
|
90
|
+
"ask": {
|
|
91
|
+
"history": []
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
Binary file
|