@indra.ai/deva 1.1.115 → 1.1.117

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 +5 -18
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -883,7 +883,6 @@ class Deva {
883
883
  init(client) {
884
884
  // set client
885
885
  this._active = Date.now();
886
- this._agent.dir = __dirname;
887
886
  const agent = this.agent();
888
887
  const _data = {
889
888
  id: this.uid(true),
@@ -1770,23 +1769,11 @@ class Deva {
1770
1769
  params: id
1771
1770
  describe: return info data.
1772
1771
  ***************/
1773
- info(id=false) {
1774
- id = id || this._id;
1775
- const agent = this.agent();
1776
- if (this._info) {
1777
- const _info = [
1778
- `::begin:info:${id}`,
1779
- `## ${this._agent.profile.name} (#${agent.key})`,
1780
- ];
1781
- for (let x in this._info) {
1782
- _info.push(`- ${x}: ${this._info[x]}`);
1783
- }
1784
- _info.push(`::end:info:${this.hash(this._info)}`);
1785
- return _info.join('\n');
1786
- }
1787
- else {
1788
- return '';
1789
- }
1772
+ info() {
1773
+ // check the active status
1774
+ if (!this._active) return Promise.resolve(this._messages.states.offline);
1775
+ this.action('info');
1776
+ return this._info;
1790
1777
  }
1791
1778
 
1792
1779
  /**************
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.1.115",
3
+ "version": "1.1.117",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "scripts": {