@indra.ai/deva.support 0.0.88 → 0.0.90

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/feature/methods.js +71 -0
  2. package/package.json +2 -2
@@ -47,6 +47,77 @@ export default {
47
47
  });
48
48
  },
49
49
 
50
+ /**************
51
+ name: list
52
+ describe: Get a listing of items from the Deva Core Contexts, Features, Actions, States.
53
+ params: item
54
+ **************/
55
+ list(packet) {
56
+ const {id, q} = packet;
57
+ const {params} = q.meta;
58
+ const item = params[1];
59
+ const {key} = this.agent();
60
+
61
+ this.context('features', `${key}:${item}:${id.uid}`);
62
+ this.action('method', `${key}:features:${id.uid}`);
63
+
64
+ return new Promise((resolve, reject) => {
65
+ try {
66
+ const items = this[item]();
67
+
68
+ const _items = [
69
+ '→',
70
+ `::begin:${key}:${id.uid}`,
71
+ ];
72
+ for (let item in items.value) {
73
+ _items.push(`• ${item}: ${items.value[item]}`);
74
+ }
75
+
76
+ _items.push(`::end:${key}:${item}:${id.uid}`);
77
+
78
+ this.question(`${this.askChr}feecting parse ${_items.join('\n')}`).then(parsed => {
79
+ return resolve({
80
+ text:parsed.a.text,
81
+ html:parsed.a.html,
82
+ data:parsed.a.data,
83
+ });
84
+ }).catch(reject => {
85
+ return this.err(e, packet, reject);
86
+ })
87
+ } catch (e) {
88
+ return this.err(e, packet, reject);
89
+ }
90
+ });
91
+ },
92
+
93
+ async features(packet) {
94
+ const {key} = this.agent();
95
+ this.context('features', `${key}:${packet.id.uid}`);
96
+ this.action('method', `${key}:features:${packet.id.uid}`);
97
+ return this.func.lists('features');
98
+ },
99
+
100
+ async zones(packet) {
101
+ const {key} = this.agent();
102
+ this.context('zones', `${key}:${packet.id.uid}`);
103
+ this.action('method', `${key}:zones:${packet.id.uid}`);
104
+ return this.func.lists('zones');
105
+ },
106
+
107
+ async actions(packet) {
108
+ const {key} = this.agent();
109
+ this.context('actions', `${key}:${packet.id.uid}`);
110
+ this.action('method', `${key}:actions:${packet.id.uid}`);
111
+ return this.func.lists('actions');
112
+ },
113
+
114
+ async contexts(packet) {
115
+ const {key} = this.agent();
116
+ this.context('contexts', `${key}:${packet.id.uid}`);
117
+ this.action('method', `${key}:contexts:${packet.id.uid}`);
118
+ return this.func.lists('contexts');
119
+ },
120
+
50
121
  /**************
51
122
  method: status
52
123
  params: packet
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": 4077391632050,
3
3
  "name": "@indra.ai/deva.support",
4
- "version": "0.0.88",
4
+ "version": "0.0.90",
5
5
  "author": "Quinn Michaels",
6
6
  "license": "MIT",
7
7
  "copyright": "(c) 2025 Quinn Michaels",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "homepage": "https://deva.space/devas/support",
30
30
  "devDependencies": {
31
- "@indra.ai/deva": "^1.6.82"
31
+ "@indra.ai/deva": "^1.6.84"
32
32
  },
33
33
  "data": {
34
34
  "agent": {