@indra.ai/deva.feecting 0.0.20 → 0.0.22
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 +16 -17
- package/help/corpus.feecting +9 -0
- package/help/main.feecting +1 -8
- package/package.json +2 -2
package/_parse.js
CHANGED
|
@@ -102,7 +102,7 @@ class Parser {
|
|
|
102
102
|
.replace(/(\n\s*)(button)\[(.+)\]:\s(.+)/g, '$1<button class="btn $2" title="$3" data-button="$4">$3</button>')
|
|
103
103
|
|
|
104
104
|
// cmd/tty tag parser
|
|
105
|
-
.replace(/(\n\s*)(cmd|tty)
|
|
105
|
+
.replace(/(\n\s*)(cmd|tty):\s?(.+)\r?/g, `$1<div class="item $2"><span class="label">$2</span><span class="value"><button class="btn $2" alt="$2" data-$2="$3"></button>$3</span></div>`)
|
|
106
106
|
|
|
107
107
|
.replace(/(\s\n*)(cmd|tty)\[(.+)\]:(.+)\r?/g, `$1<div class="item $2"><span class="label">$2</span><span class="value"><button class="btn $2" alt="$2 $4" data-$2="$4">$3</button></span></div>`)
|
|
108
108
|
|
|
@@ -214,21 +214,20 @@ class Parser {
|
|
|
214
214
|
const profile = _profile.join('\n');
|
|
215
215
|
|
|
216
216
|
|
|
217
|
-
this.text = this.text.replace(
|
|
218
|
-
.replace(
|
|
219
|
-
|
|
220
|
-
.replace(
|
|
221
|
-
|
|
222
|
-
.replace(
|
|
223
|
-
|
|
224
|
-
.replace(
|
|
225
|
-
|
|
226
|
-
.replace(
|
|
227
|
-
|
|
228
|
-
.replace(
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
217
|
+
this.text = this.text.replace(/\{\{id\}\}/g, id)
|
|
218
|
+
.replace(/\{\{today\}\}/g, formatDate(Date.now(), 'long', true))
|
|
219
|
+
|
|
220
|
+
.replace(/\{\{client\.(\w+)\}\}/g, (match,token) => {
|
|
221
|
+
return client[token] || false;
|
|
222
|
+
}).replace(/\{\{agent\.(\w+)\}\}/g, (match,token) => {
|
|
223
|
+
return agent[token] || false;
|
|
224
|
+
}).replace(/\{\{profile\.(\w+)\}\}/g, (match,token) => {
|
|
225
|
+
return agent.profile[token] || false;
|
|
226
|
+
}).replace(/\{\{prompt\.(\w+)\}\}/g, (match,token) => {
|
|
227
|
+
return agent.prompt[token] || false;
|
|
228
|
+
}).replace(/\{\{profile\}\}/g, (match,token) => {
|
|
229
|
+
return profile || false;
|
|
230
|
+
});
|
|
232
231
|
return this._extractVars();
|
|
233
232
|
}
|
|
234
233
|
|
|
@@ -242,7 +241,7 @@ class Parser {
|
|
|
242
241
|
const id = this.uid();
|
|
243
242
|
const reggie = (/(\n\s*)talk:\s?(.+)/i).exec(this.text);
|
|
244
243
|
if (!reggie) return;
|
|
245
|
-
const placeholder =
|
|
244
|
+
const placeholder = `{{${id}}}`;
|
|
246
245
|
this.talk.push({
|
|
247
246
|
id,
|
|
248
247
|
placeholder,
|
package/help/main.feecting
CHANGED
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
::agent_profile::
|
|
4
4
|
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
talk: #docs file:private:header main
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
5
|
## Methods
|
|
12
6
|
p: These methods are available from ::agent_name::
|
|
13
7
|
|
|
@@ -19,10 +13,9 @@ example: #feecting parse [feecting code]
|
|
|
19
13
|
|
|
20
14
|
---
|
|
21
15
|
|
|
22
|
-
copyright: (c)2025 Quinn Michaels
|
|
23
|
-
|
|
24
16
|
::begin:hidden
|
|
25
17
|
#color = ::agent_color::
|
|
26
18
|
#bgcolor = ::agent_bgcolor::
|
|
27
19
|
#bg = ::agent_background::
|
|
28
20
|
::end:hidden
|
|
21
|
+
copyright: (c)2025 Quinn Michaels
|
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.22",
|
|
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.4.
|
|
31
|
+
"@indra.ai/deva": "^1.4.16",
|
|
32
32
|
"needle": "^3.2.0"
|
|
33
33
|
}
|
|
34
34
|
}
|