@indra.ai/deva.feecting 0.0.38 → 0.0.39
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/_parse.js +21 -20
- package/help/main.feecting +9 -10
- package/package.json +2 -2
package/_parse.js
CHANGED
|
@@ -72,14 +72,14 @@ class Parser {
|
|
|
72
72
|
.replace(/(\n\s*)##\s(.+)/g, `$1<h2>$2</h2>`)
|
|
73
73
|
.replace(/(\n\s*)#\s(.+)/g, `$1<h1>$2</h1>`)
|
|
74
74
|
|
|
75
|
-
.replace(/(\n\s*)={4,}\n/g, `$1<hr class="double xsmall"
|
|
76
|
-
.replace(/(\n\s*)={3}\n/g, `$1<hr class="double small"
|
|
77
|
-
.replace(/(\n\s*)={2}\n/g, `$1<hr class="double medium"
|
|
78
|
-
.replace(/(\n\s*)={1}\n/g, `$1<hr class="double large"
|
|
79
|
-
.replace(/(\n\s*)-{4,}\n/g, `$1<hr class="single xsmall"
|
|
80
|
-
.replace(/(\n\s*)-{3}\n/g, `$1<hr class="single small"
|
|
81
|
-
.replace(/(\n\s*)-{2}\n/g, `$1<hr class="single medium"
|
|
82
|
-
.replace(/(\n\s*)-{1}\n/g, `$1<hr class="single large"
|
|
75
|
+
.replace(/(\n\s*)={4,}(\n)/g, `$1<hr class="double xsmall" />$2`)
|
|
76
|
+
.replace(/(\n\s*)={3}(\n)/g, `$1<hr class="double small" />$2`)
|
|
77
|
+
.replace(/(\n\s*)={2}(\n)/g, `$1<hr class="double medium" />$2`)
|
|
78
|
+
.replace(/(\n\s*)={1}(\n)/g, `$1<hr class="double large" />$2`)
|
|
79
|
+
.replace(/(\n\s*)-{4,}(\n)/g, `$1<hr class="single xsmall"/>$2`)
|
|
80
|
+
.replace(/(\n\s*)-{3}(\n)/g, `$1<hr class="single small"/>$2`)
|
|
81
|
+
.replace(/(\n\s*)-{2}(\n)/g, `$1<hr class="single medium"/>$2`)
|
|
82
|
+
.replace(/(\n\s*)-{1}(\n)/g, `$1<hr class="single large"/>$2`)
|
|
83
83
|
|
|
84
84
|
.replace(/(\*\*|__)(?=(?:(?:[^`]*`[^`\r\n]*`)*[^`]*$))(?![^\/<]*>.*<\/.+>)(.*?)\1/gi, `<strong>$2</strong>`)
|
|
85
85
|
.replace(/```(.*?)```/sg, '\n<pre><code>$1</code></pre>\n')
|
|
@@ -95,6 +95,7 @@ class Parser {
|
|
|
95
95
|
|
|
96
96
|
// image processing regex
|
|
97
97
|
.replace(/(\n\s*)img:\s?(.+)/g, `$1<div class="image"><img src="$2" /></div>`)
|
|
98
|
+
.replace(/(\n\s*)thumb:\s?(.+)/g, `$1<div class="thumbnail"><img src="$2" /></div>`)
|
|
98
99
|
.replace(/(\n\s*)(button)\[(.+)\]:\s?(.+)/g, '$1<button class="btn $2" title="$3" data-button="$4">$3</button>')
|
|
99
100
|
|
|
100
101
|
// cmd/tty tag parser
|
|
@@ -211,19 +212,19 @@ class Parser {
|
|
|
211
212
|
|
|
212
213
|
|
|
213
214
|
this.text = this.text.replace(/\{\{id\}\}/g, id)
|
|
214
|
-
|
|
215
|
+
.replace(/\{\{today\}\}/g, formatDate(Date.now(), 'long', true))
|
|
215
216
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
217
|
+
.replace(/\{\{client\.(\w+)\}\}/g, (match,token) => {
|
|
218
|
+
return client[token] || false;
|
|
219
|
+
}).replace(/\{\{agent\.(\w+)\}\}/g, (match,token) => {
|
|
220
|
+
return agent[token] || false;
|
|
221
|
+
}).replace(/\{\{profile\.(\w+)\}\}/g, (match,token) => {
|
|
222
|
+
return agent.profile[token] || false;
|
|
223
|
+
}).replace(/\{\{prompt\.(\w+)\}\}/g, (match,token) => {
|
|
224
|
+
return agent.prompt[token] || false;
|
|
225
|
+
}).replace(/\{\{profile\}\}/g, (match,token) => {
|
|
226
|
+
return profile || false;
|
|
227
|
+
});
|
|
227
228
|
return this._extractVars();
|
|
228
229
|
}
|
|
229
230
|
|
package/help/main.feecting
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
|
|
4
4
|
{{profile}}
|
|
5
5
|
|
|
6
|
-
---
|
|
7
|
-
|
|
8
6
|
const: #feecting = Functional Expressive Emergent Cognitive Technical Intelligent Neural Generator is the programming language of Indra.ai and the Deva.world platform.
|
|
9
7
|
|
|
10
8
|
describe: #feecting is a key value pair line label procedural dynamic programming language used in the development of Indra.ai, Deva.world, and all of our algorithms. Every project starts with a #feecting program then is extrapolated into other languages like HTML, Javascript, Python, C, C++, Swift, and Go.
|
|
11
9
|
|
|
12
10
|
### Examples
|
|
13
|
-
|
|
11
|
+
|
|
12
|
+
p: Below are a few examples of the #feecting language to work from.
|
|
14
13
|
|
|
15
14
|
#### Variables
|
|
16
|
-
|
|
15
|
+
|
|
16
|
+
var: test = memory variables are with "var"
|
|
17
17
|
set: test = temporary variables are with "set"
|
|
18
18
|
const: test = constant variables are done with "const"
|
|
19
19
|
|
|
@@ -30,9 +30,10 @@ object: theObject {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
#### Control Logic
|
|
33
|
+
|
|
33
34
|
if: condition (==|!=|<<|>>) expectation
|
|
34
|
-
|
|
35
|
-
else:
|
|
35
|
+
elseif: secondary (is|not|equals) expectation
|
|
36
|
+
else: conditional
|
|
36
37
|
finally: when everything is done.
|
|
37
38
|
|
|
38
39
|
switch: condition
|
|
@@ -40,9 +41,8 @@ switch: condition
|
|
|
40
41
|
case: value
|
|
41
42
|
default: value
|
|
42
43
|
|
|
43
|
-
---
|
|
44
|
-
|
|
45
44
|
#### Iteration
|
|
45
|
+
|
|
46
46
|
// for iteration loop arrays and lists
|
|
47
47
|
for: x in [array|list]
|
|
48
48
|
|
|
@@ -55,12 +55,11 @@ while: x
|
|
|
55
55
|
set: x = false
|
|
56
56
|
|
|
57
57
|
#### Error Control
|
|
58
|
+
|
|
58
59
|
try: a block of code to execute
|
|
59
60
|
catch: type of exception to catch. ie: Any, Socket, Etc.
|
|
60
61
|
finally: after try/catch completes
|
|
61
62
|
|
|
62
|
-
---
|
|
63
|
-
|
|
64
63
|
::begin:hidden
|
|
65
64
|
#color = {{profile.color}}
|
|
66
65
|
#bgcolor = {{profile.bgcolor}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": 5461868899003,
|
|
3
3
|
"name": "@indra.ai/deva.feecting",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.39",
|
|
5
5
|
"author": "Quinn Michaels",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"description": "The Feecting Deva manages all the parsing of feecting language in deva.world.",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://deva.space/devas/feecting",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@indra.ai/deva": "^1.5.
|
|
31
|
+
"@indra.ai/deva": "^1.5.36",
|
|
32
32
|
"needle": "^3.2.0"
|
|
33
33
|
},
|
|
34
34
|
"data": {
|