@plurnk/plurnk-grammar 0.76.4 → 0.76.5

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 +27 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-grammar",
3
- "version": "0.76.4",
3
+ "version": "0.76.5",
4
4
  "description": "ANTLR4 grammar for the Plurnk LLM agent protocol",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/plurnk.md CHANGED
@@ -19,22 +19,21 @@ YOU MUST ONLY use the Plurnk OPs (PLAN|FIND|READ|EDIT|COPY|MOVE|OPEN|FOLD|EXEC|K
19
19
 
20
20
  ### OPs
21
21
 
22
- Fields are optional unless otherwise specified.
23
- The `(path)` is required for every operation except PLAN, EXEC, and SEND.
24
-
25
- | OP | `[signal]` | `(path)` | `<scope>` | :body: | OP |
26
- |------|---------------|-------------|-------------------|--------------------|------|
27
- | PLAN | - | - | - | :plan, free text: | PLAN |
28
- | FIND | [tags] | (path) | <result,result> | :pattern: | FIND |
29
- | READ | [tags] | (path) | <line,line> | :pattern: | READ |
30
- | EDIT | [tags] | (path) | <line,line> | :literal text: | EDIT |
31
- | COPY | [tags] | (path) | <line,line> | :destination path: | COPY |
32
- | MOVE | [tags] | (path) | <line,line> | :destination path: | MOVE |
33
- | OPEN | [tags] | (log path) | <result,result> | :pattern: | OPEN |
34
- | FOLD | [tags] | (log path) | <result,result> | :pattern: | FOLD |
35
- | EXEC | [executor] | (path) | <timeout, poll> | :code: | EXEC |
36
- | KILL | [signal] | (path) | - | :: | KILL |
37
- | SEND | [submit code] | (recipient) | <timeout, poll> | :message: | SEND |
22
+ A `?` marks an optional field, as in the Syntax line; unmarked fields are required.
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 |
38
37
 
39
38
  <<PLAN:concise plan goes here:PLAN is required at the beginning of a turn.
40
39
  <<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.
@@ -121,8 +120,18 @@ On filtering operations, the matching pattern goes in the body.
121
120
 
122
121
  ## Delegation
123
122
 
124
- To spawn a new WORKer run: <<WORK(run://capital-checker):Find the capital of France from a primary source:WORK
125
- To COLLECT a worker's result: <<READ(run://capital-checker)::READ
123
+ Delegation breathes across turns:
124
+
125
+ <<PLAN:Delegate the capital question, then wait.:PLAN
126
+ <<WORK(run://capital-checker):Find the capital of France from a primary source:WORK
127
+ <<SEND[202]:Awaiting capital-checker.:SEND
128
+
129
+ The worker's answer arrives in the log and wakes the run:
130
+
131
+ <<PLAN:Deliver the collected answer.:PLAN
132
+ <<SEND[200]:The capital of France is Paris.:SEND
133
+
134
+ To COLLECT a worker's result on demand: <<READ(run://capital-checker)::READ
126
135
  To FORK the current run: <<FORK(run://recheck):Re-derive the capital from a primary source:FORK
127
136
  To SEND a run a message: <<SEND(run://recheck):Also, what's the capital of Germany?:SEND
128
137
  To KILL another run: <<KILL(run://recheck)::KILL
@@ -178,7 +187,6 @@ YOU MUST submit the OPs by SENDing either a brief response or a Github-flavored
178
187
  * <<OPEN(log:///**)<1,10>::OPEN
179
188
  * <<FOLD(log:///**)<101,200>::FOLD
180
189
  * <<SEND(run://capital-checker):{"hint":"known entries are your persistent memory"}:SEND
181
- * <<SEND[202]:Awaiting worker capital-checker.:SEND
182
190
  * <<KILL(known:///draft.md)::KILL
183
191
  * <<KILL(obsolete/file.md)::KILL
184
192
  * <<KILL(sh:///3/1/2)::KILL