@indra.ai/deva.wall 0.0.10 → 0.0.12
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 +7 -117
- package/package.json +2 -2
package/feature/methods.js
CHANGED
|
@@ -1,121 +1,11 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
/**************
|
|
3
|
+
method: wall
|
|
4
|
+
params: packet
|
|
5
|
+
describe: The global wall feature that installs with every agent
|
|
6
|
+
***************/
|
|
2
7
|
async wall(packet) {
|
|
3
|
-
this.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
this.zone('wall', transport); // set the current zone to wall
|
|
7
|
-
this.feature('wall', transport); // set the Wall feature.
|
|
8
|
-
this.context('wall', transport); // set context to shield
|
|
9
|
-
this.action('method', `wall:${transport}`); // action set to shield
|
|
10
|
-
|
|
11
|
-
this.state('set', `uid:${transport}`); //set the uid state for the proxy
|
|
12
|
-
const uid = this.lib.uid(true); // The UID for the proxy
|
|
13
|
-
this.state('set', `time:${transport}`); //set the time state for the proxy
|
|
14
|
-
const time = Date.now(); // current timestamp
|
|
15
|
-
this.state('created', `created:${transport}`); //set the uid state for the proxy
|
|
16
|
-
const created = this.lib.formatDate(time, 'long', true); // Formatted created date.
|
|
17
|
-
|
|
18
|
-
this.state('set', `wall:${transport}`); //set the wall state for the proxy
|
|
19
|
-
const guard = this.guard(); // load the Guard profile
|
|
20
|
-
const {concerns} = guard; // load concerns from client guard profile.
|
|
21
|
-
|
|
22
|
-
this.state('set', `agent:${transport}`); //set the agent state for the proxy
|
|
23
|
-
const agent = this.agent(); // the agent processing the proxy
|
|
24
|
-
|
|
25
|
-
this.state('set', `client:${transport}`); //set the client state for the proxy
|
|
26
|
-
const client = this.client(); // the client requesting the proxy
|
|
27
|
-
const {profile} = client; // set the client profile
|
|
28
|
-
|
|
29
|
-
this.state('set', `meta:${transport}`); //set the meta state for the proxy
|
|
30
|
-
const {meta} = packet.q; // set the meta information from the packet question.
|
|
31
|
-
const {params} = meta; // set params from the meta information.
|
|
32
|
-
|
|
33
|
-
this.state('set', `opts:${transport}`); //set the opts state for the proxy
|
|
34
|
-
const opts = this.lib.copy(params); // copy the params and set as opts.
|
|
35
|
-
|
|
36
|
-
this.state('set', `command:${transport}`); //set the opts state for the proxy
|
|
37
|
-
const command = opts.shift(); // extract the command first array item out of opts.
|
|
38
|
-
|
|
39
|
-
this.state('set', `message:${transport}`); //set the message state for the proxy
|
|
40
|
-
const message = packet.q.text; // set packet.q.text as the message of the proxy.
|
|
41
|
-
|
|
42
|
-
this.state('set', `profile:${transport}`); //set the profile constants state for the proxy
|
|
43
|
-
const {name, fullname, nickname, title, write, religion, companies, ssn, emojis, warning, computer, hardware, provision, network, caseid, token, copyright} = profile; // constants saved from profile.
|
|
44
|
-
|
|
45
|
-
this.state('set', `data:${transport}`); // set the state to set data
|
|
46
|
-
// data packet
|
|
47
|
-
const data = {
|
|
48
|
-
uid,
|
|
49
|
-
transport,
|
|
50
|
-
opts: opts.length? `:${opts.join(':')}` : '',
|
|
51
|
-
time,
|
|
52
|
-
agent,
|
|
53
|
-
client,
|
|
54
|
-
name,
|
|
55
|
-
fullname,
|
|
56
|
-
nickname,
|
|
57
|
-
title,
|
|
58
|
-
write,
|
|
59
|
-
emojis,
|
|
60
|
-
warning,
|
|
61
|
-
religion,
|
|
62
|
-
companies,
|
|
63
|
-
message,
|
|
64
|
-
ssn,
|
|
65
|
-
computer,
|
|
66
|
-
hardware,
|
|
67
|
-
provision,
|
|
68
|
-
network,
|
|
69
|
-
caseid,
|
|
70
|
-
concerns,
|
|
71
|
-
token,
|
|
72
|
-
copyright,
|
|
73
|
-
created,
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
this.state('hash', `md5:${transport}`); // set state to hash hashing
|
|
77
|
-
data.md5 = this.lib.hash(data, 'md5'); // hash data packet into md5 and inert into data.
|
|
78
|
-
|
|
79
|
-
this.state('hash', `sha256:${transport}`); // set state to hash hashing
|
|
80
|
-
data.sha256 = this.lib.hash(data, 'sha256'); // hash data into sha 256 then set in data.
|
|
81
|
-
|
|
82
|
-
this.state('hash', `sha512:${transport}`); // set state to hash hashing
|
|
83
|
-
data.sha512 = this.lib.hash(data, 'sha512'); // hash data into sha 512 then set in data.
|
|
84
|
-
|
|
85
|
-
this.state('set', `writestr:${transport}`);
|
|
86
|
-
const writestr = data.write.split(' ').join(':').toUpperCase();
|
|
87
|
-
|
|
88
|
-
const text = [
|
|
89
|
-
'::::',
|
|
90
|
-
`::BEGIN:${writestr}:WALL:${transport}:${data.emojis}`,
|
|
91
|
-
`#VectorGuardWall${data.opts} ${data.message}`,
|
|
92
|
-
`::begin:VectorGuardWall:${data.transport}`,
|
|
93
|
-
`transport: ${data.transport}`,
|
|
94
|
-
`agent: ${agent.profile.id}`,
|
|
95
|
-
`client: ${client.profile.id}`,
|
|
96
|
-
`name: ${data.name}`,
|
|
97
|
-
`fullname: ${data.fullname}`,
|
|
98
|
-
`nickname: ${data.nickname}`,
|
|
99
|
-
`title: ${data.title}`,
|
|
100
|
-
`token: ${data.token}`,
|
|
101
|
-
`case: ${data.caseid}`,
|
|
102
|
-
`time: ${data.time}`,
|
|
103
|
-
`created: ${data.created}`,
|
|
104
|
-
`copyright: ${data.copyright}`,
|
|
105
|
-
`md5: ${data.md5}`,
|
|
106
|
-
`sha256: ${data.sha256}`,
|
|
107
|
-
`sha512: ${data.sha512}`,
|
|
108
|
-
`::end:VectorGuardWall:${data.transport}`,
|
|
109
|
-
`::END:${writestr}:WALL:${transport}:${data.emojis}`,
|
|
110
|
-
].join('\n').trim();
|
|
111
|
-
|
|
112
|
-
// send the text data to #feecting to parse and return valid text, html, and data.
|
|
113
|
-
this.action('question', `feecting:parse:${transport}`); // action set to feecting parse
|
|
114
|
-
const feecting = await this.question(`${this.askChr}feecting parse ${text}`);
|
|
115
|
-
return {
|
|
116
|
-
text: feecting.a.text,
|
|
117
|
-
html: feecting.a.html,
|
|
118
|
-
data,
|
|
119
|
-
}
|
|
8
|
+
const wall = await this.methods.sign('wall', 'default', packet);
|
|
9
|
+
return wall;
|
|
120
10
|
},
|
|
121
11
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "b7b9269a-82be-4735-852c-a2bc08ca0629",
|
|
3
3
|
"name": "@indra.ai/deva.wall",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.12",
|
|
5
5
|
"author": "Quinn Michaels",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"copyright": "2025",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://deva.space/devas/wall",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@indra.ai/deva": "^1.5.
|
|
31
|
+
"@indra.ai/deva": "^1.5.48"
|
|
32
32
|
},
|
|
33
33
|
"data": {
|
|
34
34
|
"agent": {
|