@indra.ai/deva 1.62.83 → 1.62.86
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/README.md +14 -14
- package/core/beliefs.md +2 -2
- package/core/index.md +1 -1
- package/core/msgs.md +5 -1
- package/core/states.md +1 -1
- package/index.js +2 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -220,21 +220,21 @@ Each call to `feature()`, `zone()`, `action()`, `state()`, `intent()` or `belief
|
|
|
220
220
|
|
|
221
221
|
The plural methods return a stamped object whose `value` is the full list:
|
|
222
222
|
|
|
223
|
-
| List | Method | Default |
|
|
223
|
+
| List | Method | Default | Source |
|
|
224
224
|
|---|---|---|---|---|
|
|
225
|
-
| features | `features()` | — |
|
|
226
|
-
| zones | `zones()` | — |
|
|
227
|
-
| actions | `actions()` | — |
|
|
228
|
-
| states | `states()` | `offline` |
|
|
229
|
-
| intents | `intents()` | `neutral` |
|
|
230
|
-
| beliefs | `beliefs()` | `vedic` |
|
|
231
|
-
| contexts | `contexts()` | —
|
|
225
|
+
| features | `features()` | — | `_data/features.json` |
|
|
226
|
+
| zones | `zones()` | — | `_data/zones.json` |
|
|
227
|
+
| actions | `actions()` | — | `_data/actions.json` |
|
|
228
|
+
| states | `states()` | `offline` | `_data/states.json` |
|
|
229
|
+
| intents | `intents()` | `neutral` | `_data/intents.json` |
|
|
230
|
+
| beliefs | `beliefs()` | `vedic` | `_data/beliefs.json` |
|
|
231
|
+
| contexts | `contexts()` | — | your agent |
|
|
232
232
|
|
|
233
233
|
The 21 features are `init, agent, client, license, error, log, data, report, communication, treasury, justice, authority, security, medical, legal, owner, support, services, systems, networks, veda`. Each client feature has a getter of the same name (`security()`, `veda()`, ...) that returns a copy of what the client supplied for it.
|
|
234
234
|
|
|
235
235
|
## Events
|
|
236
236
|
|
|
237
|
-
All core events are listed in `
|
|
237
|
+
All core events are listed in `_data_/events.json` (25). The ones you'll usually listen to:
|
|
238
238
|
|
|
239
239
|
`devacore:prompt`, `devacore:error`, `devacore:question`, `devacore:answer`, `devacore:ask`, `devacore:start`, `devacore:enter`, `devacore:done`, `devacore:ready`, `devacore:finish`, `devacore:complete`, `devacore:stop`, `devacore:exit`, `devacore:shutdown`, `devacore:context`, `devacore:feature`, `devacore:zone`, `devacore:action`, `devacore:state`, `devacore:intent`, `devacore:belief`, `devacore:load`, `devacore:unload`.
|
|
240
240
|
|
|
@@ -251,11 +251,11 @@ A method that rejects or throws ends up here. Most calls made while the Deva is
|
|
|
251
251
|
|
|
252
252
|
| File | Contents |
|
|
253
253
|
|---|---|
|
|
254
|
-
| `
|
|
255
|
-
| `
|
|
256
|
-
| `
|
|
257
|
-
| `
|
|
258
|
-
| `
|
|
254
|
+
| `_data/_index.js` | Command char `/`, ask char `#`, `timeout.ask: 30000`, `hashes`, container markers (`::BEGIN`/`::END`), uid salt range, inherit/bind lists, the invoke chain table, defaults |
|
|
255
|
+
| `_data/_events.json` | Event names |
|
|
256
|
+
| `_data/_features.json` | Feature labels |
|
|
257
|
+
| `_data/_zones.json`, `actions.json`, `states.json`, `intents.json`, `beliefs.json` | Workflow labels |
|
|
258
|
+
| `_data/_msgs.json` | System messages such as `offline`, `noid`, `asktimeout`, `noask`, `method_not_found`, plus default `warning`, `notice` and `copyright` text |
|
|
259
259
|
|
|
260
260
|
Each JSON file has `id`, `title`, `copyright`, `VLA` and `DATA`, and the values are in `DATA`.
|
|
261
261
|
|
package/core/beliefs.md
CHANGED
|
@@ -10,7 +10,7 @@ permalink: /core/beliefs/
|
|
|
10
10
|
|
|
11
11
|
## What a belief is
|
|
12
12
|
|
|
13
|
-
A belief records **the outlook a Deva is working under** while it does a piece of work, such as
|
|
13
|
+
A belief records **the outlook a Deva is working under** while it does a piece of work, such as vedic, american, or other. Each time you set one, the Core records it and broadcasts a `devacore:belief` event. Actions say what is being done, states say what condition it is in, intents say why, and beliefs say from which frame of reference. Together they give a full record of an operation.
|
|
14
14
|
|
|
15
15
|
## How to use it
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ A belief records **the outlook a Deva is working under** while it does a piece o
|
|
|
18
18
|
this.belief(<belief>, <emit_value>)
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
- `<belief>` is a key from the list below, such as `'vedic'` or `'
|
|
21
|
+
- `<belief>` is a key from the list below, such as `'vedic'` or `'american'`.
|
|
22
22
|
- `<emit_value>` is optional extra text added to the record. Use it to say what the belief applies to, such as an id.
|
|
23
23
|
|
|
24
24
|
```js
|
package/core/index.md
CHANGED
|
@@ -19,7 +19,7 @@ This reference is generated from the live data files shipped with the Core.
|
|
|
19
19
|
- **[Actions]({{ "/core/actions/" | relative_url }})** ({{ site.data.actions.DATA | size }}): what was done, such as consent, encrypt, decrypt, return.
|
|
20
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
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
|
|
22
|
+
- **[Beliefs]({{ "/core/beliefs/" | relative_url }})** ({{ site.data.beliefs.DATA | size }}): the stance recorded for the work, such as vedic, american, or other.
|
|
23
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
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
25
|
|
package/core/msgs.md
CHANGED
|
@@ -46,11 +46,15 @@ if (result === this._messages.offline) {
|
|
|
46
46
|
|
|
47
47
|
| Message | When |
|
|
48
48
|
| --- | --- |
|
|
49
|
+
| `personalVLA` | `license_check()` is called without a personal VLA, which is the client's license. |
|
|
50
|
+
| `packageVLA` | `license_check()` is called without a package VLA, which is the Core's own license. |
|
|
51
|
+
| `checkVLA` | Both VLAs are present, but their sha256 hashes don't match, so the license is invalid. |
|
|
49
52
|
| `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
53
|
| `invalid_agent`, `invalid_client` | A hash check on the agent or client fails. |
|
|
52
54
|
| `init` | The text of the init data packet. |
|
|
53
55
|
|
|
56
|
+
The three VLA messages are what `init()` resolves with when the client's license check fails. Startup stops there and the Deva is not activated. A valid license returns a stamped approval record, and `init()` continues.
|
|
57
|
+
|
|
54
58
|
**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
59
|
|
|
56
60
|
## Available messages
|
package/core/states.md
CHANGED
|
@@ -10,7 +10,7 @@ permalink: /core/states/
|
|
|
10
10
|
|
|
11
11
|
## What a state is
|
|
12
12
|
|
|
13
|
-
A state records **the condition a Deva or a piece of work is in right now**: online, idle,
|
|
13
|
+
A state records **the condition a Deva or a piece of work is in right now**: online, idle, wait, 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
14
|
|
|
15
15
|
## Setting a state: this.state()
|
|
16
16
|
|
package/index.js
CHANGED
|
@@ -307,10 +307,8 @@ class Deva {
|
|
|
307
307
|
if (!this._features[key]) return this._messages.invalidfeature; // return no key if doesn't match.
|
|
308
308
|
|
|
309
309
|
this.feature(key); // set the security state
|
|
310
|
-
this.zone(key);
|
|
311
|
-
this.
|
|
312
|
-
this.state(key);
|
|
313
|
-
this.state('try', key);
|
|
310
|
+
this.zone(key); // set the zone to the key.
|
|
311
|
+
this.state('try', key); // set the state to try.
|
|
314
312
|
try {
|
|
315
313
|
const data = this.lib.copy(this[`_${key}`]);
|
|
316
314
|
this.action('return', `_getFeature:${key}`); // set the return action
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "23221940810208468106",
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.62.
|
|
4
|
+
"version": "1.62.86",
|
|
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",
|