@indra.ai/deva 1.60.9 → 1.60.11

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/README.md +8 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Deva Core
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/@indra.ai/deva)](https://www.npmjs.com/package/@indra.ai/deva)
4
+
3
5
  **`@indra.ai/deva`**
4
6
 
5
7
  Deva Core is a Vedic-inspired, event-based, context-aware Feature, Zone, Action and State machine framework for building integrated artificial intelligence agents ("Devas") in Node.js. Every Deva 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 broadcasts each step as an event. Every packet it builds is stamped with cumulative md5, sha256 and sha512 hashes.
@@ -203,7 +205,9 @@ Deva Core hashes in three tiers, in the order `config.hashes = ['md5', 'sha256',
203
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)`).
204
206
 
205
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>`).
206
- - `_unstamp(data)` removes them, logging a `delete` action per tier with `data.id.uid`, or `⛔️ NO ID PROVIDED` if there is none.
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
+
207
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.
208
212
 
209
213
  The return path in Core methods is: the `return` action, then the `good` intent, then `_stamp`.
@@ -214,7 +218,7 @@ A few spots (`init`, `_workflow`, `client()`, `agent()`, `machine()`, `uid()`) h
214
218
 
215
219
  Each call to `feature()`, `zone()`, `action()`, `state()`, `intent()` or `belief()` takes `(value, extra)`. If `value` exists in the matching list, it sets the current value, emits a hashed `devacore:<key>` event with `text` = the list's label plus `extra`, and returns that data. Unknown values are ignored silently. `context(value, extra)` does the same, using `vars.context` for the label, and accepts any value.
216
220
 
217
- The plural methods return a stamped object whose `value` is the full list. Counts at v1.60.2, with no agent additions:
221
+ The plural methods return a stamped object whose `value` is the full list:
218
222
 
219
223
  | List | Method | Default | Count | Source |
220
224
  |---|---|---|---|---|
@@ -234,8 +238,6 @@ All core events are listed in `config/events.json` (25). The ones you'll usually
234
238
 
235
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`.
236
240
 
237
- Note: at v1.60.2 `close` is mapped to `devacore:leave`, so the close step emits `devacore:leave` too.
238
-
239
241
  ## Error handling
240
242
 
241
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:
@@ -265,11 +267,9 @@ npm test
265
267
 
266
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.
267
269
 
268
- `examples/hello-world.js` is out of date at v1.60.2. It uses `require()`, so it fails under `"type": "module"`.
269
-
270
270
  ## Method reference
271
271
 
272
- These are the public methods whose behavior was checked against v1.60.2.
272
+ These are the public methods.
273
273
 
274
274
  | Method | Returns | Notes |
275
275
  |---|---|---|
@@ -316,4 +316,4 @@ Copyright ©2000-2026 Quinn Arjuna America Michaels; All rights reserved.
316
316
  - npm: https://www.npmjs.com/package/@indra.ai/deva
317
317
  - Homepage: https://indra.ai
318
318
 
319
- **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.9",
4
+ "version": "1.60.11",
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",