@indra.ai/deva.systems 0.15.9 → 0.15.10
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/feature/methods.js +1 -61
- package/package.json +1 -1
package/feature/methods.js
CHANGED
|
@@ -5,64 +5,4 @@
|
|
|
5
5
|
// Distributed under VLA:24296120490769123430 LICENSE.md
|
|
6
6
|
// Saturday, November 28, 2026 - 6:15:10 AM PST
|
|
7
7
|
|
|
8
|
-
export default {
|
|
9
|
-
/**************
|
|
10
|
-
method: systems
|
|
11
|
-
params: packet
|
|
12
|
-
describe: The global systems feature that installs with every agent
|
|
13
|
-
***************/
|
|
14
|
-
systems(packet) {
|
|
15
|
-
return new Promise((resolve, reject) => {
|
|
16
|
-
const systems = this.systems();
|
|
17
|
-
const agent = this.agent();
|
|
18
|
-
const global = [];
|
|
19
|
-
|
|
20
|
-
const {restricted} = systems.global
|
|
21
|
-
for (let key in systems.global) {
|
|
22
|
-
if (key === 'restricted') continue; // continue if key restricted.
|
|
23
|
-
|
|
24
|
-
const item = systems.global[key];
|
|
25
|
-
if (item && typeof item === 'object') {
|
|
26
|
-
const blockId = item.id || key;
|
|
27
|
-
global.push(`::begin:global:${key}:${blockId}`);
|
|
28
|
-
for (let x in item) {
|
|
29
|
-
const val = restricted.find(r => r === x.toLowerCase()) ? '*******' : item[x];
|
|
30
|
-
global.push(`${x}: ${val}`);
|
|
31
|
-
}
|
|
32
|
-
global.push(`::end:global:${key}:${blockId}`);
|
|
33
|
-
} else {
|
|
34
|
-
const val = restricted.find(r => r === key.toLowerCase()) ? '*******' : item;
|
|
35
|
-
global.push(`${key}: ${val}`);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const concerns = [];
|
|
40
|
-
systems.concerns.forEach((item, index) => {
|
|
41
|
-
concerns.push(`${index + 1}. ${item}`);
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
const info = [
|
|
45
|
-
'::BEGIN:SYSTEMS',
|
|
46
|
-
'### Client',
|
|
47
|
-
`::begin:client:${systems.client_id}`,
|
|
48
|
-
`id: ${systems.client_id}`,
|
|
49
|
-
`client: ${systems.client_name}`,
|
|
50
|
-
'**concerns**',
|
|
51
|
-
concerns.join('\n'),
|
|
52
|
-
`::end:client:${systems.client_id}`,
|
|
53
|
-
'### Global',
|
|
54
|
-
global.join('\n'),
|
|
55
|
-
'::END:SYSTEMS',
|
|
56
|
-
].join('\n');
|
|
57
|
-
this.question(`${this.askChr}feecting parse ${info}`).then(feecting => {
|
|
58
|
-
return resolve({
|
|
59
|
-
text: feecting.a.text,
|
|
60
|
-
html: feecting.a.html,
|
|
61
|
-
data: systems.concerns,
|
|
62
|
-
});
|
|
63
|
-
}).catch(err => {
|
|
64
|
-
return this.err(err, packet, reject);
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
},
|
|
68
|
-
};
|
|
8
|
+
export default {};
|