@indra.ai/deva 1.64.1 → 1.64.2

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "31711622713594414221",
3
3
  "name": "@indra.ai/deva",
4
- "version": "1.64.1",
4
+ "version": "1.64.2",
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",
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ // Deva Core Test Suite: step 2, feature getters
3
+ // Copyright ©2000-2026 Quinn Michaels; All rights reserved.
4
+ // Owner Signature Required For Lawful Use.
5
+ // Distributed under VLA:31711622713594414221 LICENSE.md
6
+
7
+ import test from 'node:test';
8
+ import assert from 'node:assert/strict';
9
+ import {build, client} from './_deva.js';
10
+
11
+ const GETTERS = ['license', 'error', 'log', 'data', 'report', 'legal', 'security', 'support', 'services', 'systems'];
12
+
13
+ const deva = build();
14
+ test.before(async () => { await deva.init(structuredClone(client)); });
15
+
16
+ for (const key of GETTERS) {
17
+ test(`${key}() returns exactly its own _${key} data`, () => {
18
+ const got = deva[key]();
19
+ // the getter returns a JSON copy, so compare against the same form
20
+ assert.deepEqual(got, JSON.parse(JSON.stringify(deva[`_${key}`])));
21
+ });
22
+
23
+ test(`${key}() returns a copy, so changing it leaves _${key} alone`, () => {
24
+ const got = deva[key]();
25
+ assert.notEqual(got, deva[`_${key}`]);
26
+ got.client_id = 'changed';
27
+ assert.notEqual(deva[`_${key}`].client_id, 'changed');
28
+ });
29
+
30
+ test(`${key}() carries the client and its concerns`, () => {
31
+ const got = deva[key]();
32
+ assert.equal(got.client_id, client.id);
33
+ assert.equal(got.client_name, client.profile.name);
34
+ assert.deepEqual(got.concerns, client.features[key].concerns);
35
+ });
36
+ }
37
+
38
+ test('getters answer offline after stop()', async () => {
39
+ await deva.stop();
40
+ for (const key of GETTERS) assert.equal(deva[key](), deva._messages.offline, key);
41
+ });