@plurnk/plurnk-grammar 0.72.0 → 0.73.0

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/dist/plurnk.gbnf CHANGED
@@ -302,7 +302,10 @@ status-mid ::= "10" [0-13-9] | "1" [1-9] [0-9] | "20" [13-9] | "2" [1-9] [0-9] |
302
302
  tags ::= "[" tag tag-rest* "]"
303
303
  tag ::= [A-Za-z0-9_.-]+
304
304
  tag-rest ::= "," tag
305
- target ::= "(" [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F)<\r\n]+ ")"
305
+ target ::= "(" target-inner ")" | "(" target-regex ")"
306
+ target-inner ::= [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F)<\r\n]+
307
+ target-regex ::= "#" target-rx-char* "#" [a-zA-Z]*
308
+ target-rx-char ::= "\\" [^\r\n] | [^#\r\n]
306
309
  line ::= "<" int line-rest* ">"
307
310
  line-rest ::= "," " "? int
308
311
  int ::= "-"? [0-9]+ frac?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-grammar",
3
- "version": "0.72.0",
3
+ "version": "0.73.0",
4
4
  "description": "ANTLR4 grammar for the Plurnk LLM agent protocol",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/plurnk.md CHANGED
@@ -26,7 +26,7 @@ Slots between `<<OPsuffix` and `:body:` are all optional. `:body:` fences are re
26
26
 
27
27
  Operations emit their status and/or results on the subsequent turn.
28
28
  READ output prefixes every line with line numbers and a hard tab, `N: `. The prefix is not part of the source.
29
- EDIT is only for entries. Do not attempt to edit log items.
29
+ EDIT is only for adding or modifying entries. Do not attempt to edit log items.
30
30
  EXEC defaults to `sh`; override with an optional executor (`sqlite`, `node`, etc.).
31
31
 
32
32
  ## Context
@@ -77,12 +77,12 @@ URI-shaped: `[scheme://]rest`.
77
77
  * Bare paths (no scheme) default to local relative project file paths.
78
78
  * Glob metacharacters match within path segments; a standalone `#pattern#flags` matches the whole target by regex.
79
79
  * Path suffix (`.json`, `.md`, `.txt`, etc.) declares mimetype.
80
- * A literal `)` closes the target — percent-encode parens in a path (`%28`/`%29`).
80
+ * Percent-encode reserved characters in paths: `)`→`%29`, `<`→`%3C`.
81
81
  * Append `#channel` to select a channel (e.g. `#stdout`, `#stderr`); absent, the scheme's default channel is used.
82
82
 
83
83
  ## Suffix
84
84
 
85
- When quoting plurnk operations in a body, YOU MUST use a matching single-digit suffix (`1`–`9`) on the opening and closing tags.
85
+ When quoting plurnk operations in a body, YOU MUST use a matching single-digit suffix (`1`–`9`) or label (`[a-z]+`) on the opening and closing tags.
86
86
 
87
87
  <<EDIT1(known:///demo):
88
88
  quoted: <<EDIT(known:///inner):hello:EDIT