@indra.ai/deva.support 0.22.2 → 0.22.3

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 (3) hide show
  1. package/feature/methods.js +203 -203
  2. package/index.js +35 -35
  3. package/package.json +1 -1
@@ -5,213 +5,213 @@
5
5
  // Thursday, November 26, 2026 - 10:15:20 AM PST
6
6
 
7
7
  export default {
8
- /**************
9
- method: support
10
- params: packet
11
- describe: The global support feature that installs with every agent
12
- ***************/
13
- support(packet) {
14
- this.context('feature');
15
- return new Promise((resolve, reject) => {
16
- const support = this.support();
17
- const agent = this.agent();
18
- const global = [];
19
- support.global.forEach((item,index) => {
20
- global.push(`::begin:global:${item.key}:${item.id}`);
21
- for (let x in item) {
22
- global.push(`${x}: ${item[x]}`);
23
- }
24
- global.push(`::end:global:${item.key}:${this.lib.hash(item)}`);
25
- });
26
- const concerns = [];
27
- support.concerns.forEach((item, index) => {
28
- concerns.push(`${index + 1}. ${item}`);
29
- })
30
-
31
- const info = [
32
- '::BEGIN:SUPPORT',
33
- '### Client',
34
- `::begin:client:${support.client_id}`,
35
- `id: ${support.client_id}`,
36
- `client: ${support.client_name}`,
37
- '**concerns**',
38
- concerns.join('\n'),
39
- `::end:client:${this.lib.hash(support)}`,
40
- '### Global',
41
- global.join('\n'),
42
- '::END:SUPPORT',
43
- ].join('\n');
44
- this.question(`${this.askChr}feecting parse ${info}`).then(feecting => {
45
- return resolve({
46
- text: feecting.a.text,
47
- html: feecting.a.html,
48
- data: support.concerns,
49
- });
50
- }).catch(err => {
51
- return this.error(err, packet, reject);
52
- })
53
- });
54
- },
8
+ /**************
9
+ method: support
10
+ params: packet
11
+ describe: The global support feature that installs with every agent
12
+ ***************/
13
+ support(packet) {
14
+ this.context('feature');
15
+ return new Promise((resolve, reject) => {
16
+ const support = this.support();
17
+ const agent = this.agent();
18
+ const global = [];
19
+ support.global.forEach((item,index) => {
20
+ global.push(`::begin:global:${item.key}:${item.id}`);
21
+ for (let x in item) {
22
+ global.push(`${x}: ${item[x]}`);
23
+ }
24
+ global.push(`::end:global:${item.key}:${this.lib.hash(item)}`);
25
+ });
26
+ const concerns = [];
27
+ support.concerns.forEach((item, index) => {
28
+ concerns.push(`${index + 1}. ${item}`);
29
+ })
30
+
31
+ const info = [
32
+ '::BEGIN:SUPPORT',
33
+ '### Client',
34
+ `::begin:client:${support.client_id}`,
35
+ `id: ${support.client_id}`,
36
+ `client: ${support.client_name}`,
37
+ '**concerns**',
38
+ concerns.join('\n'),
39
+ `::end:client:${this.lib.hash(support)}`,
40
+ '### Global',
41
+ global.join('\n'),
42
+ '::END:SUPPORT',
43
+ ].join('\n');
44
+ this.question(`${this.askChr}feecting parse ${info}`).then(feecting => {
45
+ return resolve({
46
+ text: feecting.a.text,
47
+ html: feecting.a.html,
48
+ data: support.concerns,
49
+ });
50
+ }).catch(err => {
51
+ return this.err(err, packet, reject);
52
+ })
53
+ });
54
+ },
55
55
 
56
- /**************
57
- name: list
58
- describe: Get a listing of items from the Deva Core Contexts, Features, Actions, States.
59
- params: item
60
- **************/
61
- list(packet) {
62
- const {id, q} = packet;
63
- const {params} = q.meta;
64
- const item = params[1];
65
- const {key} = this.agent();
56
+ /**************
57
+ name: list
58
+ describe: Get a listing of items from the Deva Core Contexts, Features, Actions, States.
59
+ params: item
60
+ **************/
61
+ list(packet) {
62
+ const {id, q} = packet;
63
+ const {params} = q.meta;
64
+ const item = params[1];
65
+ const {key} = this.agent();
66
66
 
67
- this.context('features', `${key}:${item}:${id.uid}`);
68
- this.action('method', `${key}:features:${id.uid}`);
67
+ this.context('features', `${key}:${item}:${id.uid}`);
68
+ this.action('method', `${key}:features:${id.uid}`);
69
69
 
70
- return new Promise((resolve, reject) => {
71
- try {
72
- const items = this[item]();
73
-
74
- const _items = [
75
- '→',
76
- `::begin:${key}:${id.uid}`,
77
- ];
78
- for (let item in items.value) {
79
- _items.push(`• ${item}: ${items.value[item]}`);
80
- }
81
-
82
- _items.push(`::end:${key}:${item}:${id.uid}`);
83
-
84
- this.question(`${this.askChr}feecting parse ${_items.join('\n')}`).then(parsed => {
85
- return resolve({
86
- text:parsed.a.text,
87
- html:parsed.a.html,
88
- data:parsed.a.data,
89
- });
90
- }).catch(reject => {
91
- return this.err(e, packet, reject);
92
- })
93
- } catch (e) {
94
- return this.err(e, packet, reject);
95
- }
96
- });
97
- },
70
+ return new Promise((resolve, reject) => {
71
+ try {
72
+ const items = this[item]();
73
+
74
+ const _items = [
75
+ '→',
76
+ `::begin:${key}:${id.uid}`,
77
+ ];
78
+ for (let item in items.value) {
79
+ _items.push(`• ${item}: ${items.value[item]}`);
80
+ }
81
+
82
+ _items.push(`::end:${key}:${item}:${id.uid}`);
83
+
84
+ this.question(`${this.askChr}feecting parse ${_items.join('\n')}`).then(parsed => {
85
+ return resolve({
86
+ text:parsed.a.text,
87
+ html:parsed.a.html,
88
+ data:parsed.a.data,
89
+ });
90
+ }).catch(reject => {
91
+ return this.err(e, packet, reject);
92
+ })
93
+ } catch (e) {
94
+ return this.err(e, packet, reject);
95
+ }
96
+ });
97
+ },
98
98
 
99
- async features(packet) {
100
- const {key} = this.agent();
101
- this.context('features', `${key}:${packet.id.uid}`);
102
- this.action('method', `${key}:features:${packet.id.uid}`);
103
- return this.func.lists('features');
104
- },
105
-
106
- async zones(packet) {
107
- const {key} = this.agent();
108
- this.context('zones', `${key}:${packet.id.uid}`);
109
- this.action('method', `${key}:zones:${packet.id.uid}`);
110
- return this.func.lists('zones');
111
- },
99
+ async features(packet) {
100
+ const {key} = this.agent();
101
+ this.context('features', `${key}:${packet.id.uid}`);
102
+ this.action('method', `${key}:features:${packet.id.uid}`);
103
+ return this.func.lists('features');
104
+ },
105
+
106
+ async zones(packet) {
107
+ const {key} = this.agent();
108
+ this.context('zones', `${key}:${packet.id.uid}`);
109
+ this.action('method', `${key}:zones:${packet.id.uid}`);
110
+ return this.func.lists('zones');
111
+ },
112
112
 
113
- async actions(packet) {
114
- const {key} = this.agent();
115
- this.context('actions', `${key}:${packet.id.uid}`);
116
- this.action('method', `${key}:actions:${packet.id.uid}`);
117
- return this.func.lists('actions');
118
- },
113
+ async actions(packet) {
114
+ const {key} = this.agent();
115
+ this.context('actions', `${key}:${packet.id.uid}`);
116
+ this.action('method', `${key}:actions:${packet.id.uid}`);
117
+ return this.func.lists('actions');
118
+ },
119
119
 
120
- async contexts(packet) {
121
- const {key} = this.agent();
122
- this.context('contexts', `${key}:${packet.id.uid}`);
123
- this.action('method', `${key}:contexts:${packet.id.uid}`);
124
- return this.func.lists('contexts');
125
- },
126
-
127
- /**************
128
- method: status
129
- params: packet
130
- describe: Return the current status of the Log Buddy.
131
- ***************/
132
- status(packet) {
133
- this.zone('support');
134
- this.feature('status');
135
- this.action('status');
136
- this.state('resolve', 'status');
137
- this.context('status');
138
- return Promise.resolve(this.status());
139
- },
140
-
141
- /**************
142
- method: info
143
- params: packet
144
- describe: Return the current info for the deva.
145
- ***************/
146
- info(packet) {
147
- this.zone('support');
148
- this.feature('info');
149
- this.action('info');
150
- this.state('get', 'info');
151
- this.context('info');
152
- return Promise.resolve(this.info());
153
- },
154
-
155
- /**************
156
- method: devas
157
- params: packet
158
- describe: List the devas loaded for the current deva.
159
- ***************/
160
- devas(packet) {
161
- const agent = this.agent();
162
- return new Promise((resolve, reject) => {
163
- try {
164
- const devas = [
165
- `::BEGIN:DEVAS:${packet.id.uid}`,
166
- '::begin:menu'
167
- ];
168
- for (let deva in this.devas) {
169
- const d = this.devas[deva];
170
- const {prompt, key, profile} = d.agent();
171
- devas.push(`button[${prompt.emoji} ${profile.name}]:${this.askChr}${key} help`);
172
- }
173
- devas.push('::end:menu');
174
- devas.push('::begin:hidden');
175
- devas.push('#color = {{profile.color}}');
176
- devas.push('#bgcolor = {{profile.bgcolor}}');
177
- devas.push('#bg = {{profile.background}}');
178
- devas.push('copyright: {{profile.copyright}}');
179
- devas.push('::end:hidden');
180
- devas.push(`::END:DEVAS:${packet.id.uid}`);
181
-
182
- this.question(`${this.askChr}feecting parse ${devas.join('\n')}`).then(parsed => {
183
- return resolve({
184
- text:parsed.a.text,
185
- html:parsed.a.html,
186
- data:parsed.a.data,
187
- });
188
- }).catch(err => {
189
- return this.err(err, packet, reject);
190
- });
191
- } catch (e) {
192
- return this.error(e, packet, reject);
193
- }
194
- });
195
- },
196
-
197
- /**************
198
- method: help
199
- params: packet
200
- describe: The Help method returns the information on how to use the Log Buddy.
201
- ***************/
202
- help(packet) {
203
- const {dir} = this.info();
204
- return new Promise((resolve, reject) => {
205
- this.help(packet.q.text, dir).then(help => {
206
- return this.question(`${this.askChr}feecting parse ${help}`);
207
- }).then(parsed => {
208
- this.action('help');
209
- return resolve({
210
- text: parsed.a.text,
211
- html: parsed.a.html,
212
- data: parsed.a.data,
213
- });
214
- }).catch(reject);
215
- });
216
- }
120
+ async contexts(packet) {
121
+ const {key} = this.agent();
122
+ this.context('contexts', `${key}:${packet.id.uid}`);
123
+ this.action('method', `${key}:contexts:${packet.id.uid}`);
124
+ return this.func.lists('contexts');
125
+ },
126
+
127
+ /**************
128
+ method: status
129
+ params: packet
130
+ describe: Return the current status of the Log Buddy.
131
+ ***************/
132
+ status(packet) {
133
+ this.zone('support');
134
+ this.feature('status');
135
+ this.action('status');
136
+ this.state('resolve', 'status');
137
+ this.context('status');
138
+ return Promise.resolve(this.status());
139
+ },
140
+
141
+ /**************
142
+ method: info
143
+ params: packet
144
+ describe: Return the current info for the deva.
145
+ ***************/
146
+ info(packet) {
147
+ this.zone('support');
148
+ this.feature('info');
149
+ this.action('info');
150
+ this.state('get', 'info');
151
+ this.context('info');
152
+ return Promise.resolve(this.info());
153
+ },
154
+
155
+ /**************
156
+ method: devas
157
+ params: packet
158
+ describe: List the devas loaded for the current deva.
159
+ ***************/
160
+ devas(packet) {
161
+ const agent = this.agent();
162
+ return new Promise((resolve, reject) => {
163
+ try {
164
+ const devas = [
165
+ `::BEGIN:DEVAS:${packet.id.uid}`,
166
+ '::begin:menu'
167
+ ];
168
+ for (let deva in this.devas) {
169
+ const d = this.devas[deva];
170
+ const {prompt, key, profile} = d.agent();
171
+ devas.push(`button[${prompt.emoji} ${profile.name}]:${this.askChr}${key} help`);
172
+ }
173
+ devas.push('::end:menu');
174
+ devas.push('::begin:hidden');
175
+ devas.push('#color = {{profile.color}}');
176
+ devas.push('#bgcolor = {{profile.bgcolor}}');
177
+ devas.push('#bg = {{profile.background}}');
178
+ devas.push('copyright: {{profile.copyright}}');
179
+ devas.push('::end:hidden');
180
+ devas.push(`::END:DEVAS:${packet.id.uid}`);
181
+
182
+ this.question(`${this.askChr}feecting parse ${devas.join('\n')}`).then(parsed => {
183
+ return resolve({
184
+ text:parsed.a.text,
185
+ html:parsed.a.html,
186
+ data:parsed.a.data,
187
+ });
188
+ }).catch(err => {
189
+ return this.err(err, packet, reject);
190
+ });
191
+ } catch (e) {
192
+ return this.err(e, packet, reject);
193
+ }
194
+ });
195
+ },
196
+
197
+ /**************
198
+ method: help
199
+ params: packet
200
+ describe: The Help method returns the information on how to use the Log Buddy.
201
+ ***************/
202
+ help(packet) {
203
+ const {dir} = this.info();
204
+ return new Promise((resolve, reject) => {
205
+ this.help(packet.q.text, dir).then(help => {
206
+ return this.question(`${this.askChr}feecting parse ${help}`);
207
+ }).then(parsed => {
208
+ this.action('help');
209
+ return resolve({
210
+ text: parsed.a.text,
211
+ html: parsed.a.html,
212
+ data: parsed.a.data,
213
+ });
214
+ }).catch(reject);
215
+ });
216
+ }
217
217
  }
package/index.js CHANGED
@@ -16,43 +16,43 @@ import {fileURLToPath} from 'node:url';
16
16
  const __dirname = dirname(fileURLToPath(import.meta.url));
17
17
 
18
18
  const info = {
19
- id: pkg.id,
20
- name: pkg.name,
21
- describe: pkg.description,
22
- version: pkg.version,
23
- url: pkg.homepage,
24
- dir: __dirname,
25
- git: pkg.repository.url,
26
- bugs: pkg.bugs.url,
27
- author: pkg.author,
28
- license: pkg.license,
29
- VLA: pkg.VLA,
30
- copyright: pkg.copyright,
19
+ id: pkg.id,
20
+ name: pkg.name,
21
+ describe: pkg.description,
22
+ version: pkg.version,
23
+ url: pkg.homepage,
24
+ dir: __dirname,
25
+ git: pkg.repository.url,
26
+ bugs: pkg.bugs.url,
27
+ author: pkg.author,
28
+ license: pkg.license,
29
+ VLA: pkg.VLA,
30
+ copyright: pkg.copyright,
31
31
  };
32
32
 
33
33
  const SupportDeva = new Deva({
34
- info,
35
- agent,
36
- vars,
37
- utils: {
38
- translate(input) {return input.trim();},
39
- parse(input, route=false) {return input.trim();},
40
- process(input) {return input.trim();}
41
- },
42
- listeners: {},
43
- modules: {},
44
- deva: {},
45
- func: {},
46
- methods: {},
47
- onReady(data, resolve) {
48
- const {VLA} = this.info();
49
- this.prompt(`${this.vars.messages.ready} > VLA:${VLA.uid}`);
50
- return resolve(data); // resolve data.
51
- },
52
- onError(err, data, reject) {
53
- this.prompt(this.vars.messages.error);
54
- console.log(err);
55
- return reject ? reject(err) : Promise.reject(err);
56
- },
34
+ info,
35
+ agent,
36
+ vars,
37
+ utils: {
38
+ translate(input) {return input.trim();},
39
+ parse(input, route=false) {return input.trim();},
40
+ process(input) {return input.trim();}
41
+ },
42
+ listeners: {},
43
+ modules: {},
44
+ deva: {},
45
+ func: {},
46
+ methods: {},
47
+ onReady(data, resolve) {
48
+ const {VLA} = this.info();
49
+ this.prompt(`${this.vars.messages.ready} > VLA:${VLA.uid}`);
50
+ return resolve(data); // resolve data.
51
+ },
52
+ onError(err, data, reject) {
53
+ this.prompt(this.vars.messages.error);
54
+ console.log(err);
55
+ return reject ? reject(err) : Promise.reject(err);
56
+ },
57
57
  });
58
58
  export default SupportDeva
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "45323842993175615300",
3
3
  "name": "@indra.ai/deva.support",
4
- "version": "0.22.2",
4
+ "version": "0.22.3",
5
5
  "license": "VLA:45323842993175615300 LICENSE.md",
6
6
  "VLA": {
7
7
  "uid": "45323842993175615300",