@indra.ai/deva 1.62.6 → 1.62.73

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.
@@ -0,0 +1,51 @@
1
+ ---
2
+ layout: page
3
+ title: Core - Features
4
+ description: What features are in the Deva Core, how this.feature() marks which one is active, and the full list.
5
+ image: /assets/banner.png
6
+ permalink: /core/features/
7
+ ---
8
+
9
+ {{page.description}}
10
+
11
+ ## What a feature is
12
+
13
+ A feature is **a built-in capability of the Deva Core**, such as License, Error, Log, Security or Support. The ten capabilities from License through Systems are loaded when a Deva starts, and each can be read from your code through a getter of the same name, such as `this.license()` or `this.security()`. `init`, `agent` and `client` are also on the list so the Core can mark the startup, agent and client steps.
14
+
15
+ ## How to use it
16
+
17
+ ```js
18
+ this.feature(<feature>, <emit_value>)
19
+ ```
20
+
21
+ - `<feature>` is a key from the list below, such as `'security'` or `'client'`.
22
+ - `<emit_value>` is optional extra text added to the record. Use it to say what the feature is working on, such as an id.
23
+
24
+ This call **marks** which feature the Deva is working in. It does not load a feature or run one. The Core uses it like this:
25
+
26
+ ```js
27
+ this.feature('client', `client:${client.id}`); // marks the client step
28
+ this.feature('init', data.id.uid); // marks the init step
29
+ this.feature(key, id.uid); // marks a feature as it loads
30
+ ```
31
+
32
+ To read a loaded feature's data, call its getter instead:
33
+
34
+ ```js
35
+ const license = this.license(); // returns a copy of the license feature data
36
+ ```
37
+
38
+ ## What happens when you call it
39
+
40
+ 1. The Core checks that the Deva is active. If it is not, it returns the offline message.
41
+ 2. If the feature name is not in the list below, the call is ignored without an error. Check the spelling against the list.
42
+ 3. Otherwise the Core sets the current feature and builds a record with a unique id, the feature key, the label plus your extra text, the agent, the client, and a timestamp.
43
+ 4. The record is hashed with md5, sha256 and sha512, emitted as `devacore:feature`, and returned to you.
44
+
45
+ ## Available features
46
+
47
+ There are {{ site.data.features.DATA | size }} features.
48
+
49
+ {% for feature in site.data.features.DATA %}
50
+ - **{{ feature[0] }}**: {{ feature[1] }}
51
+ {% endfor %}
package/core/index.md ADDED
@@ -0,0 +1,26 @@
1
+ ---
2
+ layout: page
3
+ title: Core
4
+ description: What the Deva Core tracks inside every action, and the reference data behind it.
5
+ image: /assets/banner.png
6
+ permalink: /core/
7
+ ---
8
+
9
+ [![npm](https://img.shields.io/npm/v/@indra.ai/deva)](https://www.npmjs.com/package/@indra.ai/deva)
10
+
11
+ **{{page.description}}**
12
+
13
+ Every **Deva Core** run is described by a small, fixed vocabulary. Each time something happens, the Core records which *feature* was involved, what was done, what *state* it is in, and what the *intent* was. The same names are used everywhere in the code, so a *log* entry means the same thing in every **Deva**.
14
+
15
+ This reference is generated from the live data files shipped with the Core.
16
+
17
+ - **[Features]({{ "/core/features/" | relative_url }})** ({{ site.data.features.DATA | size }}): the built-in capabilities, such as License, Error, Log, Security and Support.
18
+ - **[Zones]({{ "/core/zones/" | relative_url }})** ({{ site.data.zones.DATA | size }}): where an action is happening, so activity can be traced to its location.
19
+ - **[Actions]({{ "/core/actions/" | relative_url }})** ({{ site.data.actions.DATA | size }}): what was done, such as consent, encrypt, decrypt, return.
20
+ - **[States]({{ "/core/states/" | relative_url }})** ({{ site.data.states.DATA | size }}): the condition something is in, such as online, active, idle, valid or catch.
21
+ - **[Intents]({{ "/core/intents/" | relative_url }})** ({{ site.data.intents.DATA | size }}): the purpose behind an action, such as good, bad or lawful.
22
+ - **[Beliefs]({{ "/core/beliefs/" | relative_url }})** ({{ site.data.beliefs.DATA | size }}): the stance recorded for the work, such as positive, productive or vedic.
23
+ - **[Events]({{ "/core/events/" | relative_url }})** ({{ site.data.events.DATA | size }}): the named signals the Core emits through its lifecycle, such as `devacore:start`, `devacore:ready` and `devacore:error`, which your own code can listen for.
24
+ - **[Messages]({{ "/core/msgs/" | relative_url }})** ({{ site.data.msgs.DATA | size }}): the standard text the Core uses for lifecycle steps and errors, so output is consistent and can be audited.
25
+
26
+ **Why it matters:** these lists form the audit trail. Because every record uses the same fixed names, activity can be searched, verified and reported on without guessing what a label means.
@@ -0,0 +1,53 @@
1
+ ---
2
+ layout: page
3
+ title: Core - Intents
4
+ description: What intents are in the Deva Core, how to set one, and the full list of available intents.
5
+ image: /assets/banner.png
6
+ permalink: /core/intents/
7
+ ---
8
+
9
+ {{page.description}}
10
+
11
+ ## What an intent is
12
+
13
+ An intent records **the purpose or outcome behind what the Deva is doing**. Most calls in the Core use `good` when work succeeds and `bad` when it fails, but the list also covers lifecycle steps such as `init`, `start` and `ready`, and a wide range of purposes such as `help`, `work`, `business` and `lawful`. Each time you set one, the Core records it and broadcasts a `devacore:intent` event. Actions say what is done, states say the condition, and intents say why and how it ended.
14
+
15
+ ## How to use it
16
+
17
+ ```js
18
+ this.intent(<intent>, <emit_value>)
19
+ ```
20
+
21
+ - `<intent>` is a key from the list below, such as `'good'` or `'bad'`.
22
+ - `<emit_value>` is optional extra text added to the record. Use it to say what the intent applies to, such as a function name and an id.
23
+
24
+ The usual pattern in the Core is to return, mark `good`, and only then hash and stamp the data. Bad data is never hashed.
25
+
26
+ ```js
27
+ try {
28
+ const data = this.lib.copy(this[`_${key}`]);
29
+ this.action('return', `_getFeature:${key}`); // 1. the return action
30
+ this.state('valid', `_getFeature:${key}`);
31
+ this.intent('good', `_getFeature:${key}`); // 2. the good intent
32
+ return data;
33
+ } catch (err) {
34
+ this.state('catch', `_getFeature:${key}`);
35
+ this.intent('bad', `_getFeature:${key}`); // the failure path marks bad
36
+ return this.err(err);
37
+ }
38
+ ```
39
+
40
+ ## What happens when you call it
41
+
42
+ 1. The Core checks that the Deva is active. If it is not, it returns the offline message.
43
+ 2. If the intent name is not in the list below, the call is ignored without an error. Check the spelling against the list.
44
+ 3. Otherwise the Core sets the current intent and builds a record with a unique id, the intent key, the label plus your extra text, the agent, the client, and a timestamp.
45
+ 4. The record is hashed with md5, sha256 and sha512, emitted as `devacore:intent`, and returned to you.
46
+
47
+ ## Available intents
48
+
49
+ There are {{ site.data.intents.DATA | size }} intents.
50
+
51
+ {% for intent in site.data.intents.DATA %}
52
+ - **{{ intent[0] }}**: {{ intent[1] }}
53
+ {% endfor %}
package/core/msgs.md ADDED
@@ -0,0 +1,62 @@
1
+ ---
2
+ layout: page
3
+ title: Core - Messages
4
+ description: What the standard messages in the Deva Core are for, where each one is used, and the full list.
5
+ image: /assets/banner.png
6
+ permalink: /core/msgs/
7
+ ---
8
+
9
+ {{page.description}}
10
+
11
+ ## What messages are
12
+
13
+ Messages are **the standard text the Core returns when it can't, or won't, do something**, plus the default legal and identity text it stamps on a Deva. They live in one data file, so every Deva says the same thing in the same situation. That makes results consistent, and it lets your code compare a result against a known message.
14
+
15
+ The Core reads them from `this._messages`. You can add your own: any key you put in your agent's `messages` is added alongside the Core's. A key the Core already has is not replaced, so the standard text always stays the same.
16
+
17
+ ```js
18
+ if (result === this._messages.offline) {
19
+ // the Deva has been shut down
20
+ }
21
+ ```
22
+
23
+ ## Where they are used
24
+
25
+ **The offline message.** Almost every public function checks that the Deva is active first, and returns `offline` if it isn't. It is the most used message in the Core.
26
+
27
+ **Missing or bad input.** These come back when a function is called with the wrong arguments.
28
+
29
+ | Message | When |
30
+ | --- | --- |
31
+ | `notext` | `question()` is called with no text, or text that isn't a string. |
32
+ | `nokey`, `invalidkey`, `nodata` | An internal step is called without a key, with a key it doesn't know, or without data. |
33
+ | `noid` | Data is checked for an id and doesn't have one. |
34
+ | `invalidfeature` | A feature name isn't one of the Core's features. The feature getters return it, and `Feature()` rejects with it. |
35
+
36
+ **Asking another Deva.**
37
+
38
+ | Message | When |
39
+ | --- | --- |
40
+ | `asktimeout` | The Deva you asked didn't answer before the timeout. |
41
+ | `noask` | The ask target couldn't be found. |
42
+ | `method_not_found` | The Deva you asked has no method with that name. It is returned with the agent key and method. |
43
+ | `help_not_found` | A help request has nothing to show. |
44
+
45
+ **Loading and licensing.**
46
+
47
+ | Message | When |
48
+ | --- | --- |
49
+ | `unload` | A feature is unloaded. It is returned with the feature key. |
50
+ | `client_license_invalid` | The client's license check fails during startup. |
51
+ | `invalid_agent`, `invalid_client` | A hash check on the agent or client fails. |
52
+ | `init` | The text of the init data packet. |
53
+
54
+ **Identity and legal text.** `warning`, `notice`, `copyright`, `status`, `vectors`, `owner`, `creator` and `salute` are the defaults the Core uses when it builds a Deva's license and fingerprint data. If your agent profile sets its own value, the profile wins, and the message is only the fallback.
55
+
56
+ ## Available messages
57
+
58
+ There are {{ site.data.msgs.DATA | size }} messages.
59
+
60
+ {% for message in site.data.msgs.DATA %}
61
+ - **{{ message[0] }}**: {{ message[1] }}
62
+ {% endfor %}
package/core/states.md ADDED
@@ -0,0 +1,53 @@
1
+ ---
2
+ layout: page
3
+ title: Core - States
4
+ description: What states are in the Deva Core, how to set one with this.state(), how to list them with this.states(), and the full list.
5
+ image: /assets/banner.png
6
+ permalink: /core/states/
7
+ ---
8
+
9
+ {{page.description}}
10
+
11
+ ## What a state is
12
+
13
+ A state records **the condition a Deva or a piece of work is in right now**: online, idle, waiting, pending, valid, or catch for an error. Each time you set one, the Core records it and broadcasts a `devacore:state` event. Actions say what is being done, and states say what condition it is in while it happens.
14
+
15
+ ## Setting a state: this.state()
16
+
17
+ ```js
18
+ this.state(<state>, <emit_value>)
19
+ ```
20
+
21
+ - `<state>` is a key from the list below, such as `'try'`, `'valid'` or `'catch'`.
22
+ - `<emit_value>` is optional extra text added to the record. Use it to say what the state applies to, such as a function name and an id.
23
+
24
+ ```js
25
+ this.state('try', key); // work is starting inside a try block
26
+ this.state('valid', `_getFeature:${key}`); // the data passed its check
27
+ this.state('catch', `_getFeature:${key}`); // an error was caught
28
+ ```
29
+
30
+ When you call it:
31
+
32
+ 1. The Core checks that the Deva is active. If it is not, it returns the offline message.
33
+ 2. If the state name is not in the list below, the call is ignored without an error. Check the spelling against the list.
34
+ 3. Otherwise the Core sets the current state and builds a record with a unique id, the state key, the label plus your extra text, the agent, the client, and a timestamp.
35
+ 4. The record is hashed with md5, sha256 and sha512, emitted as `devacore:state`, and returned to you.
36
+
37
+ ## Listing the states: this.states()
38
+
39
+ ```js
40
+ const states = this.states();
41
+ ```
42
+
43
+ This returns every state the Deva knows about as one data packet, with its own id, the agent, the client, a timestamp, and the md5, sha256 and sha512 hashes. The list itself is under `states.value`, as key and label pairs. If the Deva is not active it returns the offline message. Calling it also records a `states` action and a `data` state of its own, so reading the list leaves a trace like everything else.
44
+
45
+ The matching functions `this.actions()`, `this.zones()`, `this.intents()` and the others work the same way for their lists.
46
+
47
+ ## Available states
48
+
49
+ There are {{ site.data.states.DATA | size }} states.
50
+
51
+ {% for state in site.data.states.DATA %}
52
+ - **{{ state[0] }}**: {{ state[1] }}
53
+ {% endfor %}
package/core/zones.md ADDED
@@ -0,0 +1,51 @@
1
+ ---
2
+ layout: page
3
+ title: Core - Zones
4
+ description: What zones are in the Deva Core, how this.zone() places an entity in one, how this.zones() lists them, and the full list.
5
+ image: /assets/banner.png
6
+ permalink: /core/zones/
7
+ ---
8
+
9
+ {{page.description}}
10
+
11
+ ## What a zone is
12
+
13
+ A zone is **the place or area an entity is working in right now**: home, away, play, work, rest, or a step of the Core such as init, load, question, answer and the feature areas. Each time you set one, the Core records it and broadcasts a `devacore:zone` event, so you can trace any activity back to where it happened. Zones say where, actions say what, states say the condition, and intents say why.
14
+
15
+ ## Placing an entity in a zone: this.zone()
16
+
17
+ ```js
18
+ this.zone(<zone>, <emit_value>)
19
+ ```
20
+
21
+ - `<zone>` is a key from the list below, such as `'client'`, `'question'` or `'load'`.
22
+ - `<emit_value>` is optional extra text added to the record. Use it to say what is working in that zone, such as a method name and an id.
23
+
24
+ ```js
25
+ this.zone('client', `client:${client.id}`); // the client step
26
+ this.zone('question', id.uid); // a question is being asked
27
+ this.zone(key, `${method}:${id.uid}`); // a feature zone, with the method and request id
28
+ ```
29
+
30
+ When you call it:
31
+
32
+ 1. The Core checks that the Deva is active. If it is not, it returns the offline message.
33
+ 2. If the zone name is not in the list below, the call is ignored without an error. Check the spelling against the list.
34
+ 3. Otherwise the Core sets the current zone and builds a record with a unique id, the zone key, the label plus your extra text, the agent, the client, and a timestamp.
35
+ 4. The record is hashed with md5, sha256 and sha512, emitted as `devacore:zone`, and returned to you.
36
+
37
+ ## Listing the zones: this.zones()
38
+
39
+ ```js
40
+ const zones = this.zones();
41
+ ```
42
+
43
+ This returns every zone the Deva knows about as one data packet, with its own id, the agent, the client, a timestamp, and the md5, sha256 and sha512 hashes. The list itself is under `zones.value`, as key and label pairs. If the Deva is not active it returns the offline message.
44
+
45
+ ## Available zones
46
+
47
+ There are {{ site.data.zones.DATA | size }} zones.
48
+
49
+ {% for zone in site.data.zones.DATA %}
50
+ - **{{ zone[0] }}**: {{ zone[1] }}
51
+ {% endfor %}
package/docs.md ADDED
@@ -0,0 +1,11 @@
1
+ ---
2
+ layout: page
3
+ title: Docs
4
+ permalink: /docs/
5
+ description: The Deva Documentation - install, quick start, lifecycle, messaging between Devas, stamped packets, events and the full method reference.
6
+ image: /assets/banner.png
7
+ ---
8
+
9
+ {{ page.description}}
10
+
11
+ {% include_relative README.md %}
package/index.js CHANGED
@@ -8,7 +8,7 @@
8
8
  import {EventEmitter} from 'node:events';
9
9
  import {createHash,randomUUID} from 'crypto';
10
10
  import lib from './lib/index.js';
11
- import config from './config/index.js';
11
+ import config from './_data/index.js';
12
12
  import pkg from './package.json' with {type:'json'};
13
13
 
14
14
  class Deva {
@@ -295,22 +295,32 @@ class Deva {
295
295
  return packet;
296
296
  }
297
297
 
298
- _getFeature(key, value) {
298
+ /**************
299
+ func: _getFeature
300
+ params:
301
+ - key: the feature key parameter.
302
+ - value: the value being passed into the data.
303
+ describe:
304
+ ***************/
305
+ _getFeature(key) {
299
306
  if (!this._active) return this._messages.offline; // check the active status
307
+ if (!this._features[key]) return this._messages.invalidfeature; // return no key if doesn't match.
308
+
300
309
  this.feature(key); // set the security state
301
310
  this.zone(key);
302
311
  this.action(key);
303
312
  this.state(key);
304
313
  this.state('try', key);
305
314
  try {
306
- const data = this.lib.copy(value);
307
- this.action('return', key); // set the security state
308
- this.intent('good', key);
309
- return data; // return the security feature
310
- } catch (e) {
311
- this.state('catch', key);
312
- this.intent('bad', key);
313
- return this.err(e);
315
+ const data = this.lib.copy(this[`_${key}`]);
316
+ this.action('return', `_getFeature:${key}`); // set the return action
317
+ this.state('valid', `_getFeature:${key}`); // set the valid state
318
+ this.intent('good', `_getFeature:${key}`); // set the intent good
319
+ return data; // return the data
320
+ } catch (err) {
321
+ this.state('catch', `_getFeature:${key}`);
322
+ this.intent('bad', `_getFeature:${key}`);
323
+ return this.err(err);
314
324
  }
315
325
  }
316
326
 
@@ -452,19 +462,20 @@ class Deva {
452
462
  client presented data.
453
463
  ***************/
454
464
  Feature(feature, resolve, reject) {
465
+ if (!this._features[feature]) return reject(this._messages.invalidfeature); // reject if there is no feature match.
455
466
  const _id = this.uid();
456
467
  this.feature(feature, _id.uid);
457
468
  this.zone(feature, _id.uid);
458
- const _cl = this.client(); // set local copy of client data
459
469
  try {
460
- if (!_cl.features[feature]) return resolve(); // if no security feature goto Support
470
+ if (!this._features[feature]) return resolve(this._messages.invalidfeature); // if no feature resolve invalid feature
461
471
  else {
462
- this.action(feature, _id.uid); // set action to feature
463
- const _fe = `_${feature}`;
464
- const {id, profile, features} = _cl; // make a copy the clinet data.
465
- const data = features[feature]; // make a copy the clinet data.
466
- this.state(feature, _id.uid);
467
- this[_fe] = { // set this feature with data
472
+ const call_str = `Feature:${feature}:${_id.uid}` // call string for action state intent.
473
+ this.action('feature', call_str); // set action to feature
474
+ const {id, profile, features} = this.client(); // set the values from the client.
475
+ const data = features[feature]; // make a copy of the feature data
476
+
477
+ this.state('set', `Feature:this._${feature}:${_id.uid}`); // set the feature state value
478
+ this[`_${feature}`] = { // set this feature with data
468
479
  id: _id, // uid of the feature
469
480
  client_id: id, // client id for reference
470
481
  client_name: profile.name, // client name for personalization
@@ -473,14 +484,17 @@ class Deva {
473
484
  personal: data.devas[this._agent.key], // Client personal features and rules.
474
485
  created: Date.now(),
475
486
  };
487
+ this.state('delete', `Feature:client:${feature}:${_id.uid}`); // set the state to delete
476
488
  delete this._client.features[feature]; // make a copy the clinet data.
477
- this.state('resolve', `${feature}:${_id.uid}`);
478
- this.intent('good', `${feature}:${_id.uid}`);
489
+
490
+ this.action('return', call_str); // set the action to return
491
+ this.state('resolve', call_str); // set the state to resolve
492
+ this.intent('good', call_str); // set the intent to good.
479
493
  return resolve(feature); // resolve when done
480
494
  }
481
495
  } catch (e) {
482
- this.state('catch', `${feature}:${_id.uid}`);
483
- this.intent('bad', `${feature}:${_id.uid}`);
496
+ this.state('catch', `${feature}:${_id.uid}`); // set the state to catch.
497
+ this.intent('bad', `${feature}:catch:${_id.uid}`); // set the intent to bad.
484
498
  return this.err(e, feature, reject); // run error handling if an error is caught
485
499
  }
486
500
  }
@@ -1067,8 +1081,7 @@ class Deva {
1067
1081
  this.zone('init', data.id.uid);
1068
1082
  this.action('init', data.id.uid);
1069
1083
  this.state('init', data.id.uid);
1070
- this.intent('init', data.id.uid);
1071
- }).then(() => {
1084
+
1072
1085
  return this.Client(client, resolve, reject);
1073
1086
  }).then(() => {
1074
1087
  return this.License(resolve, reject);
@@ -1096,9 +1109,8 @@ class Deva {
1096
1109
  const hasOnInit = this.onInit && typeof this.onInit === 'function';
1097
1110
  if (hasOnInit) {
1098
1111
  this.action('onfunc', `onInit:${data.id.uid}`); // action set to onfunc
1099
- this.state('onfunc', `onInit:${data.id.uid}`); // state set to onfunc
1112
+ this.state('valid', `onInit:${data.id.uid}`); // state set to onfunc
1100
1113
  this.intent('good', `onInit:${data.id.uid}`); // intent set to good
1101
- this.action('return', `onInit:${data.id.uid}`); // action set to return
1102
1114
  return this.onInit(data, resolve);
1103
1115
  }
1104
1116
  this.action('return', `init:${data.id.uid}`); // action set to return
@@ -1444,8 +1456,8 @@ class Deva {
1444
1456
  /**************
1445
1457
  func: zone
1446
1458
  params:
1447
- - st: The zone flag to set for the Deva that matches to this._zones
1448
- describe
1459
+ - value: the value to pass to _workflow
1460
+ - extra: Any extra text to send with the zone.
1449
1461
  ***************/
1450
1462
  zone(value=false, extra=false) {
1451
1463
  return this._workflow('zone', value, extra);
@@ -1641,7 +1653,7 @@ class Deva {
1641
1653
  usage: this.license()
1642
1654
  ***************/
1643
1655
  license() {
1644
- return this._getFeature('license', this._license);
1656
+ return this._getFeature('license');
1645
1657
  }
1646
1658
 
1647
1659
  /**************
@@ -1651,7 +1663,7 @@ class Deva {
1651
1663
  usage: this.error()
1652
1664
  ***************/
1653
1665
  error() {
1654
- return this._getFeature('error', this._error);
1666
+ return this._getFeature('error');
1655
1667
  }
1656
1668
 
1657
1669
  /**************
@@ -1661,7 +1673,7 @@ class Deva {
1661
1673
  usage: this.log()
1662
1674
  ***************/
1663
1675
  log() {
1664
- return this._getFeature('log', this._error);
1676
+ return this._getFeature('log');
1665
1677
  }
1666
1678
 
1667
1679
  /**************
@@ -1671,7 +1683,7 @@ class Deva {
1671
1683
  usage: this.data()
1672
1684
  ***************/
1673
1685
  data() {
1674
- return this._getFeature('data', this._data);
1686
+ return this._getFeature('data');
1675
1687
  }
1676
1688
 
1677
1689
  /**************
@@ -1681,7 +1693,7 @@ class Deva {
1681
1693
  usage: this.report()
1682
1694
  ***************/
1683
1695
  report() {
1684
- return this._getFeature('report', this._error);
1696
+ return this._getFeature('report');
1685
1697
  }
1686
1698
 
1687
1699
  /**************
@@ -1691,7 +1703,7 @@ class Deva {
1691
1703
  usage: this.security()
1692
1704
  ***************/
1693
1705
  security() {
1694
- return this._getFeature('security', this._security);
1706
+ return this._getFeature('security');
1695
1707
  }
1696
1708
 
1697
1709
  /**************
@@ -1701,7 +1713,7 @@ class Deva {
1701
1713
  usage: this.systems()
1702
1714
  ***************/
1703
1715
  legal() {
1704
- return this._getFeature('legal', this._legal);
1716
+ return this._getFeature('legal');
1705
1717
  }
1706
1718
 
1707
1719
  /**************
@@ -1711,7 +1723,7 @@ class Deva {
1711
1723
  usage: this.support()
1712
1724
  ***************/
1713
1725
  support() {
1714
- return this._getFeature('support', this._support);
1726
+ return this._getFeature('support');
1715
1727
  }
1716
1728
 
1717
1729
  /**************
@@ -1721,7 +1733,7 @@ class Deva {
1721
1733
  usage: this.services()
1722
1734
  ***************/
1723
1735
  services() {
1724
- return this._getFeature('services', this._services);
1736
+ return this._getFeature('services');
1725
1737
  }
1726
1738
 
1727
1739
  /**************
@@ -1731,17 +1743,7 @@ class Deva {
1731
1743
  usage: this.systems()
1732
1744
  ***************/
1733
1745
  systems() {
1734
- return this._getFeature('systems', this._systems);
1735
- }
1736
-
1737
- /**************
1738
- func: networks
1739
- params: none
1740
- describe: basic networks features available in a Deva.
1741
- usage: this.networks()
1742
- ***************/
1743
- networks() {
1744
- return this._getFeature('networks', this._networks);
1746
+ return this._getFeature('systems');
1745
1747
  }
1746
1748
 
1747
1749
  /**************
@@ -2004,12 +2006,12 @@ class Deva {
2004
2006
  err(err,packet,reject=false) {
2005
2007
  const id = this.uid();
2006
2008
  const key = 'error';
2007
- this.intent('bad', `${key}:${id.uid}`);
2008
2009
  this.context(key, id.uid);
2009
2010
  this.feature(key, id.uid);
2010
2011
  this.zone(key, id.uid);
2011
2012
  this.action(key, id.uid);
2012
2013
  this.state(key, id.uid);
2014
+ this.intent('bad', `${key}:${id.uid}`);
2013
2015
 
2014
2016
  const agent = this.agent();
2015
2017
  const client = this.client();
@@ -2063,7 +2065,7 @@ class Deva {
2063
2065
  secure numerical number used for transporting records
2064
2066
  across networks without collision or needing to store system uuid.
2065
2067
  3. the uid is then returned with a created, md5, sha256, and sha512 hash of the value
2066
- copyright: 2025 Quinn Arjuna Michaels. All rights reserved.
2068
+ copyright: Copyright ©2000-2026 Quinn Arjuna America Michaels. All rights reserved.
2067
2069
  ***************/
2068
2070
  uid(guid=false) {
2069
2071
  const time = Date.now(); // set time to local constant
@@ -2137,7 +2139,6 @@ class Deva {
2137
2139
  data.md5 = this.hash(data, 'md5'); // md5 the uid and created.
2138
2140
  data.sha256 = this.hash(data, 'sha256'); // sha256 the uid, created, md5
2139
2141
  data.sha512 = this.hash(data, 'sha512'); // sha512 the uid, created, md5, sha256.
2140
- // this.intent('good', `uid:${data.uid}`);
2141
2142
  return data; // return the complete uid data.
2142
2143
  }
2143
2144
 
@@ -2147,7 +2148,7 @@ class Deva {
2147
2148
  - packet: The packet to sign data to.
2148
2149
  describe:
2149
2150
  The sign function can create a digital signature to a packet.
2150
- copyright: Copyright ©2000-2026 Quinn Arjuna Michaels. All rights reserved.
2151
+ copyright: Copyright ©2000-2026 Quinn Arjuna America Michaels. All rights reserved.
2151
2152
  ***************/
2152
2153
  sign(packet) {
2153
2154
  const id = this.uid();
@@ -2211,8 +2212,8 @@ class Deva {
2211
2212
  copyright,
2212
2213
  };
2213
2214
 
2214
- this.action('return', `${data.key}:sign:${data.id.uid}`);
2215
- this.intent('good', `${data.key}:sign:${data.id.uid}`);
2215
+ this.action('return', `${data.key}:sign:${data.id.uid}`); // set the action to return
2216
+ this.intent('good', `${data.key}:sign:${data.id.uid}`); // set the intent to good
2216
2217
  return this._stamp(data, 'sign', data.id.uid);
2217
2218
  }
2218
2219
 
@@ -2223,7 +2224,7 @@ class Deva {
2223
2224
  - packageVLA: The Package VLA to validate against
2224
2225
  describe:
2225
2226
  The license_check function can checks VLA license validity.
2226
- copyright: Copyright ©2000-2026 Quinn Arjuna Michaels. All rights reserved.
2227
+ copyright: Copyright ©2000-2026 Quinn Arjuna America Michaels. All rights reserved.
2227
2228
  ***************/
2228
2229
  license_check(personalVLA=false, packageVLA=false) {
2229
2230
  const id = this.uid();
package/index.md ADDED
@@ -0,0 +1,41 @@
1
+ ---
2
+ layout: page
3
+ title: Deva Core
4
+ description: A Vedic-inspired, event-based Node.js framework for building integrated AI agents, with stamped, verifiable data on every step in Node.js.
5
+ image: /assets/banner.png
6
+ ---
7
+
8
+ <center>
9
+ <img src="/assets/deva.png" alt="Deva Core">
10
+ </center>
11
+
12
+ **{{ page.description}}**
13
+
14
+ [![npm](https://img.shields.io/npm/v/@indra.ai/deva)](https://www.npmjs.com/package/@indra.ai/deva)
15
+
16
+ Deva Core is the base of every Deva. Each agent is one `Deva` class instance on a shared event bus. As it works, it moves through named features, zones, actions, states, intents, beliefs and contexts, and it announces every step as an event. Every data packet it builds is stamped with cumulative md5, sha256 and sha512 hashes, so you can verify what happened and in what order.
17
+
18
+ ```bash
19
+ npm install @indra.ai/deva
20
+ ```
21
+
22
+ Node.js 22 or later. ES modules only.
23
+
24
+ ## Start here
25
+
26
+ - [Read the documentation](/docs/), with install, a working quick start, the lifecycle, messaging between Devas, the packet, hashing, events and the method reference.
27
+ - [Deva Core on GitHub](https://github.com/indraai/deva), where the code, the issues and the examples live.
28
+ - [`@indra.ai/deva` on npm](https://www.npmjs.com/package/@indra.ai/deva), for the published package.
29
+
30
+ ## What it gives you
31
+
32
+ - **A shared event bus.** Devas talk to each other with `question`, `answer`, `ask`, `talk` and `listen`. Asks time out instead of hanging.
33
+ - **A named workflow.** Features, zones, actions, states, intents, beliefs and contexts are first-class data, and you can read each one back stamped.
34
+ - **Stamped packets.** The md5, sha256 and sha512 tiers build on each other, in order, on every packet.
35
+ - **Your own methods.** Add agent methods, listeners and extra workflow names through the constructor, and the Core merges them with its own.
36
+
37
+ ## License
38
+
39
+ Deva Core is distributed under the **Vedic License Agreement (VLA)**. Read the [license](https://github.com/indraai/deva/blob/main/LICENSE.md) before you use it.
40
+
41
+ Created by Quinn Arjuna America Michaels. [indra.ai](https://indra.ai)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "23221940810208468106",
3
3
  "name": "@indra.ai/deva",
4
- "version": "1.62.6",
4
+ "version": "1.62.73",
5
5
  "description": "Deva Core a Vedic-inspired Event Based Context Aware Feature, Zone, Action, and State Machine integrated Artificial Intelligence Framework",
6
6
  "main": "index.js",
7
7
  "license": "VLA:23221940810208468106 LICENSE.md",
@@ -30,7 +30,7 @@
30
30
  "sha512": "TIOS5vzolsLYn8iVPszqexvF0WoLsz1KJyLMADwSIVBNnAJ3WjKMozwa/NXvzhYUZDFp6oPXFe6B+L/2gYo+Mw=="
31
31
  },
32
32
  "author": {
33
- "name": "Quinn Arjuna Michaels",
33
+ "name": "Quinn Arjuna America Michaels",
34
34
  "company": "Inside The Net, Inc.",
35
35
  "email": "quinn@indra.ai",
36
36
  "url": "https://indra.ai/"
package/robots.txt ADDED
@@ -0,0 +1,3 @@
1
+ User-agent: *
2
+ Allow: /
3
+