@indra.ai/deva.wall 0.0.95 → 0.0.97
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/index.js +4 -37
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -40,56 +40,23 @@ const WALL = new Deva({
|
|
|
40
40
|
parse(input) {return input.trim();},
|
|
41
41
|
process(input) {return input.trim();},
|
|
42
42
|
},
|
|
43
|
-
listeners: {
|
|
44
|
-
'devacore:question'(packet) {
|
|
45
|
-
const echo = this.methods.echo('wall', 'q', packet);
|
|
46
|
-
},
|
|
47
|
-
'devacore:answer'(packet) {
|
|
48
|
-
const echo = this.methods.echo('wall', 'a', packet);
|
|
49
|
-
}
|
|
50
|
-
},
|
|
43
|
+
listeners: {},
|
|
51
44
|
modules: {},
|
|
52
45
|
devas: {},
|
|
53
|
-
func: {
|
|
54
|
-
echostr(opts) {
|
|
55
|
-
const {id, agent, client, md5, sha256, sha512} = opts;
|
|
56
|
-
const created = Date.now();
|
|
57
|
-
|
|
58
|
-
this.action('func', `echostr:${id}`);
|
|
59
|
-
this.state('set', `echostr:${id}`);
|
|
60
|
-
const echostr = [
|
|
61
|
-
`::begin:wall:${id}`,
|
|
62
|
-
`transport: ${id}`,
|
|
63
|
-
`client: ${client.profile.id}`,
|
|
64
|
-
`agent: ${agent.profile.id}`,
|
|
65
|
-
`created: ${created}`,
|
|
66
|
-
`md5: ${md5}`,
|
|
67
|
-
`sha256:${sha256}`,
|
|
68
|
-
`sha512:${sha512}`,
|
|
69
|
-
`::end:wall:${id}`,
|
|
70
|
-
].join('\n');
|
|
71
|
-
|
|
72
|
-
// stub for later features right now just echo into the system process for SIGINT monitoring.
|
|
73
|
-
const echo = spawn('echo', [echostr])
|
|
74
|
-
echo.stderr.on('data', err => {
|
|
75
|
-
this.error(err, opts);
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
this.state('return', `echostr:${id}`);
|
|
79
|
-
return echostr;
|
|
80
|
-
}
|
|
81
|
-
},
|
|
46
|
+
func: {},
|
|
82
47
|
methods: {},
|
|
83
48
|
onInit(data, resolve) {
|
|
84
49
|
const {personal} = this.license(); // get the license config
|
|
85
50
|
const agent_license = this.info().VLA; // get agent license
|
|
86
51
|
const license_check = this.license_check(personal, agent_license); // check license
|
|
87
52
|
// return this.start if license_check passes otherwise stop.
|
|
53
|
+
this.action('return', `onInit:${data.id.uid}`);
|
|
88
54
|
return license_check ? this.start(data, resolve) : this.stop(data, resolve);
|
|
89
55
|
},
|
|
90
56
|
onReady(data, resolve) {
|
|
91
57
|
const {VLA} = this.info();
|
|
92
58
|
this.prompt(`${this.vars.messages.ready} > VLA:${VLA.uid}`);
|
|
59
|
+
this.action('resolve', `onReady:${data.id.uid}`);
|
|
93
60
|
return resolve(data);
|
|
94
61
|
},
|
|
95
62
|
onError(data, err, reject) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "49233848941661900396",
|
|
3
3
|
"name": "@indra.ai/deva.wall",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.97",
|
|
5
5
|
"license": "VLA:49233848941661900396 LICENSE.md",
|
|
6
6
|
"VLA": {
|
|
7
7
|
"uid": "49233848941661900396",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"homepage": "https://indra.ai",
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@indra.ai/deva": "^1.
|
|
63
|
+
"@indra.ai/deva": "^1.9.1"
|
|
64
64
|
},
|
|
65
65
|
"data": {
|
|
66
66
|
"agent": {
|