@indra.ai/deva 1.64.9 → 1.64.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.
@@ -0,0 +1,76 @@
1
+ {
2
+ "id": "41985016213321096966",
3
+ "title": "Deva Core Tests",
4
+ "copyright": "Copyright ©2000-2026 Quinn Michaels; All rights reserved.",
5
+ "VLA": "31711622713594414221",
6
+ "DATA": {
7
+ "runner": "node:test",
8
+ "assert": "node:assert/strict",
9
+ "node": "24",
10
+ "command": "npm test",
11
+ "suites": [
12
+ {
13
+ "file": "00-build.test.js",
14
+ "title": "Build",
15
+ "describe": "build() makes a Deva that reaches ready.",
16
+ "count": 1
17
+ },
18
+ {
19
+ "file": "01-init.test.js",
20
+ "title": "Init",
21
+ "describe": "init() resolves with the ready data, waits for onReady, and a failing step or onError reject stops the chain.",
22
+ "count": 5
23
+ },
24
+ {
25
+ "file": "02-getters.test.js",
26
+ "title": "Feature Getters",
27
+ "describe": "Each feature getter returns exactly its own _key data as a copy, carries the client and its concerns, and answers offline after stop().",
28
+ "count": 31
29
+ },
30
+ {
31
+ "file": "03-hash.test.js",
32
+ "title": "Hash",
33
+ "describe": "The md5, sha256 and sha512 tiers match node:crypto, every hashing site carries all three, the uid fingerprint holds, and one changed field breaks every tier.",
34
+ "count": 6
35
+ },
36
+ {
37
+ "file": "04-license.test.js",
38
+ "title": "License",
39
+ "describe": "A matching VLA activates the Deva with stamped hashes; a changed, missing or absent VLA answers its message and stays inactive.",
40
+ "count": 6
41
+ },
42
+ {
43
+ "file": "05-messaging.test.js",
44
+ "title": "Messaging",
45
+ "describe": "question() runs local /commands and #ask calls to child Devas, child errors reach the asker right away, and missing or silent targets answer not found or timeout.",
46
+ "count": 12
47
+ },
48
+ {
49
+ "file": "06-shutdown.test.js",
50
+ "title": "Shutdown",
51
+ "describe": "stop() stops child Devas first, runs the full chain in order to onShutdown, clears features, answers pending asks offline and leaves nothing on the event bus.",
52
+ "count": 8
53
+ }
54
+ ],
55
+ "edgecases": [
56
+ {
57
+ "title": "Child errors reach the asker",
58
+ "describe": "A failing or throwing child Deva method now rejects the asker right away instead of waiting for the ask timeout.",
59
+ "suite": "05-messaging.test.js",
60
+ "fixed": "1.64.7"
61
+ },
62
+ {
63
+ "title": "Pending asks at shutdown",
64
+ "describe": "A question still waiting on an answer when the Deva stops now resolves offline instead of hanging.",
65
+ "suite": "06-shutdown.test.js",
66
+ "fixed": "1.64.8"
67
+ },
68
+ {
69
+ "title": "Parent stop reaches its children",
70
+ "describe": "A parent's stop() now stops each child Deva through its full chain before the parent closes.",
71
+ "suite": "06-shutdown.test.js",
72
+ "fixed": "1.64.9"
73
+ }
74
+ ]
75
+ }
76
+ }
@@ -15,6 +15,7 @@
15
15
  <a class="page-link" href="/vibe/">Vibe</a>
16
16
  <a class="page-link" href="/core/">Core</a>
17
17
  <a class="page-link" href="/docs/">Docs</a>
18
+ <a class="page-link" href="/tests/">Tests</a>
18
19
  <a class="page-link" href="/about/">About</a>
19
20
  </nav></div>
20
21
  </header>
package/index.js CHANGED
@@ -1307,7 +1307,7 @@ class Deva {
1307
1307
  client, // set the client
1308
1308
  stop: Date.now(), // set the created date
1309
1309
  }
1310
-
1310
+
1311
1311
  this.action('return', `${key}:invoke:${data.id.uid}`);
1312
1312
  this.state('valid', `${key}:invoke:${data.id.uid}`);
1313
1313
  this.intent('good', `${key}:invoke:${data.id.uid}`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "31711622713594414221",
3
3
  "name": "@indra.ai/deva",
4
- "version": "1.64.9",
4
+ "version": "1.64.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:31711622713594414221 LICENSE.md",
package/test.md ADDED
@@ -0,0 +1,52 @@
1
+ Here's `tests.md`. It uses the same front matter as `about.md` and the core pages, and it builds everything from `site.data.tests.DATA`, the same way `core/actions.md` loops over its data. The page also adds up the suite counts itself, so the total of 69 isn't written into the page by hand. It's saved at `/workspace/drafts/tests.md`:
2
+
3
+ ```markdown
4
+ ---
5
+ layout: page
6
+ title: Tests
7
+ permalink: /tests/
8
+ description: How the Deva Core is tested, what each test suite proves, and the edge cases the suite found and fixed.
9
+ image: /assets/banner.png
10
+ ---
11
+
12
+ {{ page.description }}
13
+
14
+ {% assign tests = site.data.tests.DATA %}
15
+ {% assign total = 0 %}
16
+ {% for suite in tests.suites %}{% assign total = total | plus: suite.count %}{% endfor %}
17
+
18
+ The Deva Core test suite has {{ tests.suites | size }} suites and {{ total }} tests. It uses Node's built-in `{{ tests.runner }}` runner with `{{ tests.assert }}`, so it adds no dependencies.
19
+
20
+ ## How to run it
21
+
22
+ Run the tests on Node.js {{ tests.node }} or later:
23
+
24
+ ```bash
25
+ {{ tests.command }}
26
+ ```
27
+
28
+ ## The suites
29
+
30
+ Each suite builds on the one before it, from building a Deva through to shutting it down.
31
+
32
+ | Suite | Tests | What it proves |
33
+ |---|---|---|
34
+ {% for suite in tests.suites %}| **{{ suite.title }}**<br>`{{ suite.file }}` | {{ suite.count }} | {{ suite.describe }} |
35
+ {% endfor %}
36
+
37
+ ## Edge cases found and fixed
38
+
39
+ The suite found {{ tests.edgecases | size }} edge cases. Each looks small on its own, but in a system of thousands of Devas any one of them becomes a real problem. All of them are fixed and covered by the tests.
40
+
41
+ {% for edge in tests.edgecases %}
42
+ ### {{ edge.title }}
43
+
44
+ {{ edge.describe }} Fixed in version {{ edge.fixed }}, tested in `{{ edge.suite }}`.
45
+ {% endfor %}
46
+ ```
47
+
48
+ **Where it goes:** put it at the repo root next to `about.md` and `docs.md`, so it lives at `/tests/`. To show it in the menu, add `- tests.md` under `header_pages` in `_config.yml`.
49
+
50
+ I don't have Jekyll on my computer, so I haven't built the page or seen it rendered. One part is worth checking on your first build: the table rows come out of a Liquid loop. Each row has to land directly under the `|---|` line with no blank line in between, or kramdown will cut the table short.
51
+
52
+ **One mismatch to fix:** `index.md` says Node.js 22 or later, but the tests run on Node 24, which is what I put in the data file. It would be better to make the two agree, or to say the core needs 22 and the tests were run on 24.