@plurnk/plurnk-grammar 0.76.5 → 0.76.7

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 +18 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-grammar",
3
- "version": "0.76.5",
3
+ "version": "0.76.7",
4
4
  "description": "ANTLR4 grammar for the Plurnk LLM agent protocol",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/plurnk.md CHANGED
@@ -11,7 +11,7 @@ Plurnk Service Features:
11
11
 
12
12
  ## Plurnk Service Grammar
13
13
 
14
- YOU MUST ONLY use the Plurnk OPs (PLAN|FIND|READ|EDIT|COPY|MOVE|OPEN|FOLD|EXEC|KILL|SEND).
14
+ YOU MUST ONLY use the Plurnk OPs (PLAN|FIND|READ|EDIT|COPY|MOVE|OPEN|FOLD|EXEC|WORK|FORK|KILL|SEND).
15
15
 
16
16
  ### Syntax
17
17
 
@@ -21,25 +21,28 @@ YOU MUST ONLY use the Plurnk OPs (PLAN|FIND|READ|EDIT|COPY|MOVE|OPEN|FOLD|EXEC|K
21
21
 
22
22
  A `?` marks an optional field, as in the Syntax line; unmarked fields are required.
23
23
 
24
- | OP | `[signal]` | `(path)` | `<scope>` | :body: | OP |
25
- |------|----------------|--------------|--------------------|--------------------|------|
26
- | PLAN | - | - | - | :plan, free text: | PLAN |
27
- | FIND | [tags]? | (path) | <result,result>? | :pattern:? | FIND |
28
- | READ | [tags]? | (path) | <line,line>? | :pattern:? | READ |
29
- | EDIT | [tags]? | (path) | <line,line>? | :literal text:? | EDIT |
30
- | COPY | [tags]? | (path) | <line,line>? | :destination path: | COPY |
31
- | MOVE | [tags]? | (path) | <line,line>? | :destination path: | MOVE |
32
- | OPEN | [tags]? | (log path) | <result,result>? | :pattern:? | OPEN |
33
- | FOLD | [tags]? | (log path) | <result,result>? | :pattern:? | FOLD |
34
- | EXEC | [executor]? | (path)? | <timeout, poll>? | :code:? | EXEC |
35
- | KILL | [signal]? | (path) | - | :: | KILL |
36
- | SEND | [submit code]? | (recipient)? | <timeout, poll>? | :message: | SEND |
24
+ | OP | `[signal]` | `(path)` | `<scope>` | :body: | OP |
25
+ |------|----------------|-----------------|--------------------|--------------------|------|
26
+ | PLAN | - | - | - | :plan, free text: | PLAN |
27
+ | FIND | [tags]? | (path) | <result,result>? | :pattern:? | FIND |
28
+ | READ | [tags]? | (path) | <line,line>? | :pattern:? | READ |
29
+ | EDIT | [tags]? | (path) | <line,line>? | :literal text:? | EDIT |
30
+ | COPY | [tags]? | (path) | <line,line>? | :destination path: | COPY |
31
+ | MOVE | [tags]? | (path) | <line,line>? | :destination path: | MOVE |
32
+ | OPEN | [tags]? | (log path) | <result,result>? | :pattern:? | OPEN |
33
+ | FOLD | [tags]? | (log path) | <result,result>? | :pattern:? | FOLD |
34
+ | EXEC | [executor]? | (path)? | <timeout, poll>? | :code:? | EXEC |
35
+ | WORK | - | (run://checker) | - | :task: | WORK |
36
+ | FORK | - | (run://recheck) | - | :hint:? | FORK |
37
+ | KILL | [signal]? | (path) | - | :: | KILL |
38
+ | SEND | [submit code]? | (recipient)? | <timeout, poll>? | :message: | SEND |
37
39
 
38
40
  <<PLAN:concise plan goes here:PLAN is required at the beginning of a turn.
39
41
  <<FIND(path)::FIND returns a JSON array of matches: each object carries its path and per-channel mimetype, tokens, and lines. READ a hit's path to view it.
40
42
  <<READ(path)::READ returns lines of matching content. Every line is prefixed with the line number and a hard tab, `N: `.
41
43
  <<EDIT(path):literal text:EDIT is only for creating or modifying files and entries. Do not attempt to edit log items.
42
44
  <<EDIT(path):literal text:EDIT replaces the selected line(s) `<line,line>` with literal body content, never with patterns.
45
+ <<EDIT(path):literal text:EDIT without `<scope>` replaces the entire entry, or creates it if absent.
43
46
  <<OPEN(log path)::OPEN expands (`+`) the log item body to view it (costs tokens). Not all log items have a body (`*`).
44
47
  <<FOLD(log path)::FOLD hides (`-`) the log item body (saves tokens). FOLDed item tokens="" shows token cost if OPENed.
45
48
  <<EXEC::EXEC produces output stream channels on the next turn that you can then FIND, READ, or KILL.
@@ -76,7 +79,7 @@ Plurnk Service treemaps every file, entry, and item, allowing every pattern filt
76
79
  ### `(path)`
77
80
 
78
81
  * The universal resource path is formatted as a URI for everything but file paths (bare, project-relative).
79
- * `run://name` is the run entity (WORK to spawn a fresh worker, READ to collect its result, FORK to branch the current run, KILL to stop); `run://name/path` is an entry in its workspace.
82
+ * A `run://` path names a run (WORK to spawn a fresh worker, READ to collect its result, FORK to branch the current run, KILL to stop); a path beneath it, like `run://checker/notes.md`, is an entry in its workspace.
80
83
  * Log item paths are nested (`log:///1/2/3` is loop/turn/item) and accept bulk pattern operations (FOLD, OPEN, KILL).
81
84
  * Append `#channel` to select a channel (e.g. `#stdout`, `#stderr`); absent, the scheme's default channel is used.
82
85
  * Path suffix (`.json`, `.md`, `.txt`, etc.) declares mimetype.