@indra.ai/deva.guard 0.0.125 → 0.1.0

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.
Files changed (2) hide show
  1. package/index.js +3 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -38,14 +38,7 @@ const GUARD = new Deva({
38
38
  parse(input) {return input.trim();},
39
39
  process(input) {return input.trim();},
40
40
  },
41
- listeners: {
42
- 'devacore:question'(packet) {
43
- this.methods.echo(agent.key, 'q', packet);
44
- },
45
- 'devacore:answer'(packet) {
46
- this.methods.echo(agent.key, 'a', packet);
47
- }
48
- },
41
+ listeners: {},
49
42
  modules: {},
50
43
  deva: {},
51
44
  func: {},
@@ -55,11 +48,13 @@ const GUARD = new Deva({
55
48
  const agent_license = this.info().VLA; // get agent license
56
49
  const license_check = this.license_check(personal, agent_license); // check license
57
50
  // return this.start if license_check passes otherwise stop.
51
+ this.action('return', `onInit:${data.id.uid}`);
58
52
  return license_check ? this.start(data, resolve) : this.stop(data, resolve);
59
53
  },
60
54
  onReady(data, resolve) {
61
55
  const {VLA} = this.info();
62
56
  this.prompt(`${this.vars.messages.ready} > VLA:${VLA.uid}`);
57
+ this.action('resolve', `onReady:${data.id.uid}`);
63
58
  return resolve(data);
64
59
  },
65
60
  onError(err, data, reject) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "43649051198159438170",
3
3
  "name": "@indra.ai/deva.guard",
4
- "version": "0.0.125",
4
+ "version": "0.1.0",
5
5
  "license": "VLA:43649051198159438170 LICENSE.md",
6
6
  "VLA": {
7
7
  "uid": "43649051198159438170",