@indra.ai/deva 1.1.102 → 1.1.104

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 (3) hide show
  1. package/config.json +3 -3
  2. package/index.js +21 -15
  3. package/package.json +1 -1
package/config.json CHANGED
@@ -241,11 +241,11 @@
241
241
  "help": "::agent.name:: providing help"
242
242
  },
243
243
  "features": {
244
- "security": "security feature",
244
+ "security": "::agent.name:: accessing #security feature",
245
245
  "Security": "Security configure",
246
- "support": "support feature",
246
+ "support": "::agent.name:: accessing #support feature",
247
247
  "Support": "Support configure",
248
- "services": "services feature",
248
+ "services": "::agent.name:: accessing #services feature",
249
249
  "Services": "Services configure",
250
250
  "solutions": "solutions feature",
251
251
  "Solutions": "Solutions configure",
package/index.js CHANGED
@@ -959,12 +959,12 @@ class Deva {
959
959
  init(client) {
960
960
  // set client
961
961
  this._active = Date.now();
962
-
962
+ const agent = this.agent();
963
963
  const _data = {
964
964
  id: this.uid(true),
965
- key: 'return',
966
- value: 'init',
967
- agent: this._agent,
965
+ key: 'init',
966
+ value: agent.key,
967
+ agent,
968
968
  client: this.copy(client),
969
969
  text: this._messages.states.start,
970
970
  created: Date.now(),
@@ -1099,12 +1099,14 @@ class Deva {
1099
1099
  stop() {
1100
1100
  if (!this._active) return Promise.resolve(this._messages.states.offline);
1101
1101
  this.state('stop');
1102
+ const agent = this.agent();
1103
+ const client = this.client();
1102
1104
  const data = {
1103
1105
  id: this.uid(true),
1104
- key: 'return',
1105
- value: 'stop',
1106
- agent: this.agent(),
1107
- client: this.client(),
1106
+ key: 'stop',
1107
+ value: agent.key,
1108
+ agent,
1109
+ client,
1108
1110
  text: this._messages.states.stop,
1109
1111
  created: Date.now(),
1110
1112
  }
@@ -1663,12 +1665,14 @@ class Deva {
1663
1665
  ***************/
1664
1666
  prompt(text) {
1665
1667
  // Talk a global prompt event for the client
1668
+ const agent = this.agent();
1669
+ const client = this.client();
1666
1670
  const _data = {
1667
1671
  id: this.uid(true),
1668
1672
  key: 'prompt',
1669
- value: 'prompt',
1670
- agent: this.agent(),
1671
- client: this.client(),
1673
+ value: agent.key,
1674
+ agent,
1675
+ client,
1672
1676
  text,
1673
1677
  created: Date.now(),
1674
1678
  }
@@ -1908,12 +1912,14 @@ class Deva {
1908
1912
  console.log('\n::END:DATA\n');
1909
1913
  }
1910
1914
 
1915
+ const agent = this.agent();
1916
+ const client = this.client();
1911
1917
  const _data = {
1912
1918
  id: this.uid(true),
1913
- key: 'return',
1914
- value: 'error',
1915
- agent: this.agent(),
1916
- client: this.client(),
1919
+ key: 'error',
1920
+ value: agent.key,
1921
+ agent,
1922
+ client,
1917
1923
  error: err,
1918
1924
  data,
1919
1925
  created: Date.now(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.1.102",
3
+ "version": "1.1.104",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "scripts": {