@indra.ai/deva 1.60.10 → 1.60.12
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 +6 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,7 +95,7 @@ Three things to know from this example:
|
|
|
95
95
|
|---|---|
|
|
96
96
|
| `id` | Instance id. Defaults to `randomUUID()`. |
|
|
97
97
|
| `info` | Package-style info object (`id`, `name`, `version`, `dir`, `VLA`, ...). Returned by `info()`. `info.VLA.uid` goes into every `uid()`. |
|
|
98
|
-
| `agent` | The agent profile: `id`, `key` (the Deva's name on the bus), `prompt`, `profile` (`name`, and optional `warning`, `notice`, `copyright`, `status`, `vectors`, `owner`, `creator`, `salute`). It can also carry custom `zones`, `actions`, `intents`, `beliefs` and `messages`, which are merged in without overwriting the core ones. |
|
|
98
|
+
| `agent` | The agent profile: `id`, `key` (the Deva's name on the bus), `prompt`, `profile` (`name`, and optional `warning`, `notice`, `copyright`, `status`, `vectors`, `owner`, `creator`, `salute`). It can also carry custom `zones`, `actions`, `states`, `intents`, `beliefs` and `messages`, which are merged in without overwriting the core ones (keys already in config win), and then removed from the agent object. |
|
|
99
99
|
| `config` | Local config. Needs a `hash` object. Can set `timeout.ask` in ms (default `30000`, `0` disables it). |
|
|
100
100
|
| `vars` | Free-form variables on `this.vars`. `vars.context` maps context keys to display text. |
|
|
101
101
|
| `utils`, `func` | Your helper functions. Bound to the Deva at `init`. |
|
|
@@ -205,7 +205,9 @@ Deva Core hashes in three tiers, in the order `config.hashes = ['md5', 'sha256',
|
|
|
205
205
|
The tiers are **cumulative by design**. Each hash is taken over the object *including the hashes before it*, so sha256 covers md5, and sha512 covers both. Hashes are base64 digests of `JSON.stringify(data)` (see `hash(data, algo)`).
|
|
206
206
|
|
|
207
207
|
- `_stamp(data, label='', uid='')` adds the three hashes in order and returns the same object. When a label is given, it logs a `hash` action per tier (`<label>:<algo>:<uid>`).
|
|
208
|
-
|
|
208
|
+
|
|
209
|
+
- `_unstamp(data)` removes them, logging a `delete` action per tier as `<algo>:<uid>` using `data.id?.uid`. If the data has no `id` or the `id` has no `uid`, it uses `this._messages.noid` (`⛔️ NO ID PROVIDED`) instead of throwing.
|
|
210
|
+
|
|
209
211
|
- To re-stamp after a change, `_stamp(_unstamp(data), label, uid)`. Since the tiers are cumulative, stamping twice without unstamping would change the values.
|
|
210
212
|
|
|
211
213
|
The return path in Core methods is: the `return` action, then the `good` intent, then `_stamp`.
|
|
@@ -236,8 +238,6 @@ All core events are listed in `config/events.json` (25). The ones you'll usually
|
|
|
236
238
|
|
|
237
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`.
|
|
238
240
|
|
|
239
|
-
Note: at v1.60.2 `close` is mapped to `devacore:leave`, so the close step emits `devacore:leave` too.
|
|
240
|
-
|
|
241
241
|
## Error handling
|
|
242
242
|
|
|
243
243
|
`err(err, packet, reject)` is the single error path. It sets the `bad` intent and the `error` context, feature, zone, action and state. It emits a stamped `devacore:error` packet carrying `error: {name, message, stack}` and the related packet. Then:
|
|
@@ -267,11 +267,9 @@ npm test
|
|
|
267
267
|
|
|
268
268
|
This runs `node tests` (`tests/index.js`), which builds a Deva from `tests/agent.json` and `tests/client.json`, runs it through the lifecycle and a self-test method, and prints the log. **It passes as long as nothing throws. There are no assertions yet.** Real assertion tests are planned.
|
|
269
269
|
|
|
270
|
-
`examples/hello-world.js` is out of date at v1.60.2. It uses `require()`, so it fails under `"type": "module"`.
|
|
271
|
-
|
|
272
270
|
## Method reference
|
|
273
271
|
|
|
274
|
-
These are the public methods
|
|
272
|
+
These are the public methods.
|
|
275
273
|
|
|
276
274
|
| Method | Returns | Notes |
|
|
277
275
|
|---|---|---|
|
|
@@ -318,4 +316,4 @@ Copyright ©2000-2026 Quinn Arjuna America Michaels; All rights reserved.
|
|
|
318
316
|
- npm: https://www.npmjs.com/package/@indra.ai/deva
|
|
319
317
|
- Homepage: https://indra.ai
|
|
320
318
|
|
|
321
|
-
**Author:** Quinn Arjuna Michaels, Inside The Net, Inc. (quinn@indra.ai)
|
|
319
|
+
**Author:** Quinn Arjuna America Michaels, Inside The Net, Inc. (quinn@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.60.
|
|
4
|
+
"version": "1.60.12",
|
|
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",
|