@indra.ai/deva.feecting 0.0.20 → 0.0.21

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 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):(.+)\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>`)
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(/::id::/g, id)
218
- .replace(/::date::/g, formatDate(Date.now(), 'long', true))
219
- .replace(/::agent_id::/g, agent.id)
220
- .replace(/::agent_key::/g, agent.key)
221
- .replace(/::agent_name::/g, agent.profile.name)
222
- .replace(/::agent_color::/g, agent.profile.color)
223
- .replace(/::agent_bgcolor::/g, agent.profile.bgcolor)
224
- .replace(/::agent_describe::/g, agent.profile.describe)
225
- .replace(/::agent_background::/g, agent.profile.background)
226
- .replace(/::agent_emoji::/g, agent.prompt.emoji)
227
- .replace(/::agent_avatar::/g, agent.profile.avatar)
228
- .replace(/::client_id::/g, client.id)
229
- .replace(/::client_name::/g, client.profile.name)
230
- .replace(/::agent_profile::/g, profile);
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 = `::${id}::`;
244
+ const placeholder = `{{${id}}}`;
246
245
  this.talk.push({
247
246
  id,
248
247
  placeholder,
@@ -0,0 +1,9 @@
1
+ # {{agent.name}}
2
+
3
+ {{profile}}
4
+
5
+ talk: #algorithm file:public main:header
6
+ talk: #security file:public main:header
7
+ talk: #legal file:public main:header
8
+
9
+ copyright: ©2025 Quinn Michaels
@@ -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.20",
4
+ "version": "0.0.21",
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.14",
31
+ "@indra.ai/deva": "^1.4.16",
32
32
  "needle": "^3.2.0"
33
33
  }
34
34
  }