@plurnk/plurnk-grammar 0.73.0 → 0.73.2

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 +12 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-grammar",
3
- "version": "0.73.0",
3
+ "version": "0.73.2",
4
4
  "description": "ANTLR4 grammar for the Plurnk LLM agent protocol",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/plurnk.md CHANGED
@@ -20,10 +20,11 @@ Slots between `<<OPsuffix` and `:body:` are all optional. `:body:` fences are re
20
20
  | MOVE | apply tags | required | lines `N,M` | destination URI |
21
21
  | OPEN | filter tags | log path | results `N,M` | matcher |
22
22
  | FOLD | filter tags | log path | results `N,M` | matcher |
23
- | KILL | | required | | |
24
- | EXEC | executor | cwd | | command or code |
25
- | SEND | status code | recipient | | message body |
23
+ | KILL | signal | required | - | - |
24
+ | EXEC | executor | cwd | - | command or code |
25
+ | SEND | status code | recipient | - | message body |
26
26
 
27
+ In the examples, `...`, `N`, and `M` mark placeholders - substitute real content.
27
28
  Operations emit their status and/or results on the subsequent turn.
28
29
  READ output prefixes every line with line numbers and a hard tab, `N: `. The prefix is not part of the source.
29
30
  EDIT is only for adding or modifying entries. Do not attempt to edit log items.
@@ -33,10 +34,10 @@ EXEC defaults to `sh`; override with an optional executor (`sqlite`, `node`, etc
33
34
 
34
35
  The agent maintains two surfaces for budgeting working-memory tokens:
35
36
 
36
- - **Log** the record of every operation. FOLD contracts a log row to its one-line summary and saves tokens; OPEN shows the complete record but spends from your `tokensFree` context tokens. Non-destructive FOLDed rows remain listed and re-OPENable.
37
- - **`plurnk:///manifest.json`** what's available: the complete unranked directory of every entry. Query it to discover available entries.
37
+ - **Log** - the record of every operation. FOLD contracts a log row to its one-line summary and saves tokens; OPEN shows the complete record but spends from your `tokensFree` context tokens. Non-destructive - FOLDed rows remain listed and re-OPENable.
38
+ - **`plurnk:///manifest.json`** - what's available: the complete unranked directory of every entry. Query it to discover available entries.
38
39
 
39
- OPEN and FOLD operate on the log only. Log items are read-only, but can be KILLed.
40
+ OPEN and FOLD operate on the log only. Log items are read-only, but can be KILLed (erased).
40
41
 
41
42
  ## `<Line> / <Result>`
42
43
 
@@ -120,7 +121,7 @@ Body content is character-perfect, exactly matching whitespace.
120
121
  <<COPY[archive,2026-05-14](known:///draft.md):known:///archive/2026-05-14/draft.md:COPY
121
122
  <<MOVE[final](known:///draft/answer.md):known:///final/answer.md:MOVE
122
123
  <<KILL(obsolete/file.md)::KILL
123
- <<KILL(sh:///3/1/2)::KILL
124
+ <<KILL[9](sh:///3/1/2)::KILL
124
125
  <<EDIT(run://capital-checker):Find the capital of France.:EDIT
125
126
  <<COPY(run://.):Re-derive the capital from a primary source.:COPY
126
127
  <<OPEN(log:///**/get)<1,10>::OPEN
@@ -129,7 +130,7 @@ Body content is character-perfect, exactly matching whitespace.
129
130
  <<FOLD(log:///**/get)<101,200>::FOLD
130
131
  <<FIND(log:///**/error):#timeout|deadline exceeded#i:FIND
131
132
  <<FIND(known:///**):revolution:FIND
132
- <<FIND(#draft.*#i)::FIND
133
+ <<FIND(#(draft|final)/.*#i)::FIND
133
134
  <<FIND(#src/.*\.test\.ts#)::FIND
134
135
  <<FIND(src/**):@<createCoder:FIND
135
136
 
@@ -158,7 +159,7 @@ YOU SHOULD manage your own context to maximize signal, as irrelevant tokens degr
158
159
  YOU SHOULD leverage taxonomic path names, folksonomic tags, and bulk pattern operations to optimize for context relevance.
159
160
  YOU MUST use OPEN and FOLD to keep your context budget healthy, optimized, topical, and below the `tokensFree` limit.
160
161
  YOU MUST terminate the turn by SENDing a status code containing the results, answer, or a status update: `<<SEND[N]:...:SEND`
161
- YOU MUST terminate a continuing loop with status code 102: <<SEND[102]:Forking a research run, optimizing log relevance...:SEND
162
+ YOU MUST terminate a continuing loop with status code 102: <<SEND[102]:Forking a research run, optimizing log relevance.:SEND
163
+ YOU MUST terminate a failed/aborted loop with status code 499: <<SEND[499]:Giving up - cannot identify the capital from available sources.:SEND
162
164
  YOU MUST terminate a final turn with status code 200: <<SEND[200]:Paris:SEND
163
- YOU MUST terminate an idle/waiting loop with status code 202: <<SEND[202]:Parked until the capital-checker reports.:SEND
164
- YOU MUST terminate a failed/aborted loop with status code 499: <<SEND[499]:Giving up — cannot identify the capital from available sources.:SEND
165
+ YOU MUST pause an idle/waiting loop with status code 202: <<SEND[202]:Waiting until the capital-checker reports.:SEND