@plurnk/plurnk-grammar 0.64.0 → 0.67.0
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.
- package/README.md +3 -5
- package/dist/plurnk.gbnf +13 -68
- package/dist/schema/SchemeRegistration.json +1 -1
- package/dist/src/Validator.d.ts +0 -8
- package/dist/src/Validator.d.ts.map +1 -1
- package/dist/src/Validator.js +0 -34
- package/dist/src/Validator.js.map +1 -1
- package/dist/src/types.generated.d.ts +112 -365
- package/dist/src/types.generated.d.ts.map +1 -1
- package/dist/src/types.generated.js +0 -3
- package/dist/src/types.generated.js.map +1 -1
- package/package.json +2 -3
- package/plurnk.md +10 -11
- package/dist/plurnk-free.gbnf +0 -827
- package/dist/schema/Agent.json +0 -18
- package/dist/schema/Entry.json +0 -51
- package/dist/schema/LogEntry.json +0 -118
- package/dist/schema/Loop.json +0 -20
- package/dist/schema/Packet.json +0 -72
- package/dist/schema/Run.json +0 -26
- package/dist/schema/Session.json +0 -20
- package/dist/schema/Turn.json +0 -39
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-grammar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.0",
|
|
4
4
|
"description": "ANTLR4 grammar for the Plurnk LLM agent protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
"default": "./dist/src/index.js"
|
|
17
17
|
},
|
|
18
18
|
"./package.json": "./package.json",
|
|
19
|
-
"./plurnk.gbnf": "./dist/plurnk.gbnf"
|
|
20
|
-
"./plurnk-free.gbnf": "./dist/plurnk-free.gbnf"
|
|
19
|
+
"./plurnk.gbnf": "./dist/plurnk.gbnf"
|
|
21
20
|
},
|
|
22
21
|
"bin": {
|
|
23
22
|
"plurnk": "./bin/plurnk.js"
|
package/plurnk.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Plurnk System Grammar
|
|
2
2
|
|
|
3
|
-
YOU MUST ONLY use the Extended HEREDOC Plurnk Operations (
|
|
3
|
+
YOU MUST ONLY use the Extended HEREDOC Plurnk Operations (FIND|READ|EDIT|COPY|MOVE|OPEN|FOLD|KILL|EXEC|SEND).
|
|
4
4
|
|
|
5
5
|
## Syntax
|
|
6
6
|
|
|
@@ -12,7 +12,6 @@ Slots between `<<OPsuffix` and `:body:` are all optional. `:body:` fences are re
|
|
|
12
12
|
|
|
13
13
|
| OP | `[signal]` | `(target)` | `<Line> / <Result>` | body |
|
|
14
14
|
|------|-------------|------------|---------------------|------------------|
|
|
15
|
-
| PLAN | - | - | - | plan / reasoning |
|
|
16
15
|
| FIND | filter tags | required | results `N,M` | matcher |
|
|
17
16
|
| READ | filter tags | required | lines `N,M` | matcher |
|
|
18
17
|
| EDIT | tags | required | lines `N,M` | content |
|
|
@@ -27,7 +26,6 @@ Slots between `<<OPsuffix` and `:body:` are all optional. `:body:` fences are re
|
|
|
27
26
|
Operations emit their status and/or results on the subsequent turn.
|
|
28
27
|
READ output prefixes every line with line numbers and a hard tab, `N: `. The prefix is not part of the source.
|
|
29
28
|
EDIT is only for entries. Do not attempt to edit log items.
|
|
30
|
-
SEND broadcasts to uri when a path is included and messages the user when no path is included.
|
|
31
29
|
EXEC defaults to `sh`; override with an optional executor (`sqlite`, `node`, etc.).
|
|
32
30
|
|
|
33
31
|
## Context
|
|
@@ -75,10 +73,10 @@ Escape `#` inside a regex pattern as `\#`. XPath body begins with `//`. Semantic
|
|
|
75
73
|
|
|
76
74
|
URI-shaped: `[scheme://]rest`.
|
|
77
75
|
|
|
78
|
-
* Bare paths (no scheme) default to local relative project file paths
|
|
79
|
-
* Glob metacharacters
|
|
80
|
-
* Path suffix (`.json`, `.md`, `.txt`, etc.) declares mimetype
|
|
81
|
-
* A literal `)` closes the target
|
|
76
|
+
* Bare paths (no scheme) default to local relative project file paths.
|
|
77
|
+
* Glob metacharacters match within path segments; a standalone `#pattern#flags` matches the whole target by regex.
|
|
78
|
+
* Path suffix (`.json`, `.md`, `.txt`, etc.) declares mimetype.
|
|
79
|
+
* A literal `)` closes the target — percent-encode parens in a path (`%28`/`%29`).
|
|
82
80
|
* Append `#channel` to select a channel (e.g. `#stdout`, `#stderr`); absent, the scheme's default channel is used.
|
|
83
81
|
|
|
84
82
|
## Suffix
|
|
@@ -151,13 +149,14 @@ chmod +x ./example.sh
|
|
|
151
149
|
|
|
152
150
|
YOU MUST ONLY use EXEC commands for actions that can't be performed with Extended HEREDOC Plurnk Operations.
|
|
153
151
|
YOU MUST ONLY communicate with SEND, not with free text between operations.
|
|
152
|
+
YOU SHOULD NOT leak internal resource information when SENDing user messages.
|
|
154
153
|
YOU MUST document all relevant questions and uncertainties into taxonomized, tagged, and topical unknown entries.
|
|
155
154
|
YOU MUST ONLY populate known entries with source entry information, never with model training.
|
|
156
155
|
YOU SHOULD manage your own context to maximize signal, as irrelevant tokens degrade reasoning.
|
|
157
156
|
YOU SHOULD leverage taxonomic path names, folksonomic tags, and bulk pattern operations to optimize for context relevance.
|
|
158
157
|
YOU MUST use OPEN and FOLD to keep your context budget healthy, optimized, topical, and below the `tokensFree` limit.
|
|
159
158
|
YOU MUST terminate the turn by SENDing a status code containing the results, answer, or a status update: `<<SEND[N]:...:SEND`
|
|
160
|
-
YOU
|
|
161
|
-
YOU
|
|
162
|
-
YOU
|
|
163
|
-
YOU
|
|
159
|
+
YOU MUST terminate a continuing loop with status code 102: <<SEND[102]:Forking a research run, optimizing log relevance...:SEND
|
|
160
|
+
YOU MUST terminate a final turn with status code 200: <<SEND[200]:Paris:SEND
|
|
161
|
+
YOU MUST terminate a parked/waiting loop with status code 202: <<SEND[202]:Parked until the capital-checker reports.:SEND
|
|
162
|
+
YOU MUST terminate a failed/aborted loop with status code 499: <<SEND[499]:Giving up — cannot identify the capital from available sources.:SEND
|