@plurnk/plurnk-grammar 0.74.40 → 0.74.42

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 +16 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-grammar",
3
- "version": "0.74.40",
3
+ "version": "0.74.42",
4
4
  "description": "ANTLR4 grammar for the Plurnk LLM agent protocol",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/plurnk.md CHANGED
@@ -43,7 +43,7 @@ The `(target)` is required for every operation except PLAN, EXEC, and SEND.
43
43
  <<EDIT(path):literal text:EDIT replaces the selected line(s) `<line,line>` with literal body content, never with patterns.
44
44
  <<OPEN(log path)::OPEN expands (`+`) the log item body to view it (costs tokens). Not all log items have a body (`*`).
45
45
  <<FOLD(log path)::FOLD hides (`-`) the log item body (saves tokens).
46
- <<EXEC::EXEC produces output stream channels on the next turn that you can then OPEN, FOLD, FIND, READ, or KILL.
46
+ <<EXEC::EXEC produces output stream channels on the next turn that you can then FIND, READ, or KILL.
47
47
  <<KILL(path)::KILL deletes files and entries, erases log items, and kills streams.
48
48
  <<SEND[102]:doing:SEND to submit OPs, emit streams, or launch worker runs.
49
49
  <<SEND[202]:holding:SEND to hibernate when awaiting results of long EXEC streams or worker runs.
@@ -75,13 +75,24 @@ Plurnk Service treemaps every file, entry, and item, allowing every pattern filt
75
75
 
76
76
  ### `(path)`
77
77
 
78
- * The universal resource path is formatted as a URI for everything but file paths.
79
- * File paths are bare, relative to the project folder. `(known:///entry_example.md)` is an entry; `(file_example.md)` is a file.
80
- * Log items also possess URI-formatted paths to be FIND, READ, OPEN, FOLD, or KILLed (but not EDITed).
78
+ * The universal resource path is formatted as a URI for everything but file paths (bare, project-relative).
79
+ * `run://name` is the run entity (COPY to spawn or fork, KILL to stop); `run://name/path` is an entry in its workspace.
81
80
  * Append `#channel` to select a channel (e.g. `#stdout`, `#stderr`); absent, the scheme's default channel is used.
82
81
  * Path suffix (`.json`, `.md`, `.txt`, etc.) declares mimetype.
83
82
  * Percent-encode reserved characters in paths: `)`→`%29`, `<`→`%3C`.
84
83
 
84
+ | OP | file | entry | run | stream | log |
85
+ |------|------|-------|-----|--------|-----|
86
+ | FIND | yes | yes | yes | yes | yes |
87
+ | READ | yes | yes | yes | yes | yes |
88
+ | EDIT | yes | yes | no | no | no |
89
+ | COPY | yes | yes | yes | yes | yes |
90
+ | MOVE | yes | yes | yes | no | no |
91
+ | OPEN | no | no | no | no | yes |
92
+ | FOLD | no | no | no | no | yes |
93
+ | EXEC | yes | yes | no | no | no |
94
+ | KILL | yes | yes | yes | yes | yes |
95
+
85
96
  ### `<Line / Result>`
86
97
 
87
98
  <<READ(file.md)<N>::READ views line N
@@ -116,7 +127,7 @@ YOU MUST terminate the turn by SENDing a message to the user with the proper sta
116
127
 
117
128
  YOU MUST SEND[102] to receive the results of OPs you submitted. Avoid premature SEND[200].
118
129
 
119
- To spawn a separate run: <<EDIT(run://capital-checker):Find the capital of France.:EDIT
130
+ To spawn a separate run: <<COPY(run://capital-checker):Find the capital of France.:COPY
120
131
  To fork the current run: <<COPY(run://self):Re-derive the capital from a primary source.:COPY
121
132
 
122
133
  ## Examples