@plurnk/plurnk-grammar 0.21.0 → 0.21.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/plurnk.md +15 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-grammar",
3
- "version": "0.21.0",
3
+ "version": "0.21.1",
4
4
  "description": "ANTLR4 grammar for the Plurnk LLM agent protocol",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/plurnk.md CHANGED
@@ -4,23 +4,23 @@ YOU MUST ONLY use the Extended HEREDOC Plurnk Operations (FIND|READ|EDIT|COPY|MO
4
4
 
5
5
  ## Syntax
6
6
 
7
- <<OPsuffix[signal]?(target)?<L>?:body?:OPsuffix
7
+ <<OPsuffix[signal]?(target)?<Line/Result>?:body?:OPsuffix
8
8
 
9
9
  Slots between `<<OPsuffix` and `:body:` are all optional. `:body:` fences are required (use `::` when body is empty).
10
10
 
11
11
  ## Operations
12
12
 
13
- | OP | `[signal]` | `(target)`| `<L>` | body |
14
- |------|-------------|-----------|---------------|-----------------|
15
- | FIND | filter tags | required | results `N,M` | matcher |
16
- | READ | filter tags | required | lines `N,M` | matcher |
17
- | EDIT | tags | required | lines `N,M` | content |
18
- | COPY | apply tags | required | lines `N,M` | destination URI |
19
- | MOVE | apply tags | required | lines `N,M` | destination URI |
20
- | SHOW | filter tags | required | results `N,M` | matcher |
21
- | HIDE | filter tags | required | results `N,M` | matcher |
22
- | SEND | status code | recipient | — | message body |
23
- | EXEC | executor | cwd | — | command or code |
13
+ | OP | `[signal]` | `(target)`| `<Line> / <Result>` | body |
14
+ |------|-------------|-----------|-----------------|-----------------|
15
+ | FIND | filter tags | required | results `N,M` | matcher |
16
+ | READ | filter tags | required | lines `N,M` | matcher |
17
+ | EDIT | tags | required | lines `N,M` | content |
18
+ | COPY | apply tags | required | lines `N,M` | destination URI |
19
+ | MOVE | apply tags | required | lines `N,M` | destination URI |
20
+ | SHOW | filter tags | required | results `N,M` | matcher |
21
+ | HIDE | filter tags | required | results `N,M` | matcher |
22
+ | SEND | status code | recipient | — | message body |
23
+ | EXEC | executor | cwd | — | command or code |
24
24
 
25
25
  Operations emit their status and/or results on the subsequent turn.
26
26
  READ output prefixes every line with line numbers, `N:\t`. The prefix is not part of the source.
@@ -42,7 +42,7 @@ Index entries are previews; READ pulls the body (full, ranged, or matcher-filter
42
42
  YOU SHOULD demote distilled and irrelevant entries to Archive with HIDE to save tokens and optimize context relevance.
43
43
  YOU MAY permanently delete entries by MOVE to `/dev/null` (works regardless of environment).
44
44
 
45
- ## `<L>`
45
+ ## `<Line> / <Result>`
46
46
 
47
47
  `<N>` selects position N.
48
48
  `<N,M>` selects the inclusive range N through M. N and M are signed integers.
@@ -51,7 +51,7 @@ Sentinels: `<0>` before position 1 (prepend), `<-1>` after the last position (ap
51
51
 
52
52
  Clearing content: `<1,-1>` selects every position; combine with an empty body to clear an entry.
53
53
 
54
- On structured entries, `<L>` addresses item index, not line number.
54
+ On structured entries, `<Result>` addresses result index, not line number.
55
55
 
56
56
  ## Body matcher dispatch (FIND, READ, SHOW, HIDE)
57
57
 
@@ -63,7 +63,7 @@ On structured entries, `<L>` addresses item index, not line number.
63
63
  | `~` | rag | `~query text` |
64
64
  | otherwise | glob | `pattern` |
65
65
 
66
- Escape `/` inside a regex pattern as `\/`. XPath body begins with `//`. RAG narrows top-K via `<L>` on the host statement.
66
+ Escape `/` inside a regex pattern as `\/`. XPath body begins with `//`. RAG narrows top-K via `<Result>` on the host statement.
67
67
 
68
68
  ## Paths
69
69