@plurnk/plurnk-grammar 0.75.5 → 0.76.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/dist/plurnk.gbnf +6 -5
- package/dist/src/AstBuilder.d.ts.map +1 -1
- package/dist/src/AstBuilder.js.map +1 -1
- package/dist/src/PlurnkErrorStrategy.d.ts.map +1 -1
- package/dist/src/PlurnkErrorStrategy.js.map +1 -1
- package/dist/src/PlurnkParseError.d.ts.map +1 -1
- package/dist/src/PlurnkParseError.js.map +1 -1
- package/dist/src/PlurnkParser.d.ts.map +1 -1
- package/dist/src/PlurnkParser.js +4 -3
- package/dist/src/PlurnkParser.js.map +1 -1
- package/dist/src/RecordingListener.d.ts.map +1 -1
- package/dist/src/Validator.d.ts.map +1 -1
- package/dist/src/Validator.js.map +1 -1
- package/dist/src/generated/plurnkLexer.d.ts.map +1 -1
- package/dist/src/generated/plurnkLexer.js +200 -199
- package/dist/src/generated/plurnkLexer.js.map +1 -1
- package/dist/src/generated/plurnkParser.d.ts.map +1 -1
- package/dist/src/generated/plurnkParser.js.map +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/plurnk.md +8 -6
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,QAAS,MAAM,qDAA8B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGvD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EACR,aAAa,EACb,QAAQ,EACR,eAAe,EACf,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,SAAS,EACT,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EACb,SAAS,EACT,WAAW,EACX,UAAU,EACV,aAAa,EACb,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,aAAa,EACb,SAAS,EACT,QAAQ,EACR,aAAa,EACb,aAAa,EACb,cAAc,EACd,OAAO,EACP,aAAa,GAChB,MAAM,YAAY,CAAC"}
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","s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AE,MAAM,CAAA;KAAE,CAAC;CACrD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-grammar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.76.0",
|
|
4
4
|
"description": "ANTLR4 grammar for the Plurnk LLM agent protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
"@types/node": "^26.1.1",
|
|
58
58
|
"antlr-ng": "^1.0.10",
|
|
59
59
|
"json-schema-to-typescript": "^15.0.4",
|
|
60
|
-
"typescript": "^
|
|
60
|
+
"typescript": "^7.0.2"
|
|
61
61
|
}
|
|
62
62
|
}
|
package/plurnk.md
CHANGED
|
@@ -34,7 +34,7 @@ The `(path)` is required for every operation except PLAN, EXEC, and SEND.
|
|
|
34
34
|
| FOLD | [filter tags] | (log path) | <result,result> | :pattern: | FOLD |
|
|
35
35
|
| EXEC | [executor] | (path) | <timeout, poll> | :code: | EXEC |
|
|
36
36
|
| KILL | [signal] | (path) | - | :: | KILL |
|
|
37
|
-
| SEND | [submit code] | (recipient) |
|
|
37
|
+
| SEND | [submit code] | (recipient) | <timeout, poll> | :message: | SEND |
|
|
38
38
|
|
|
39
39
|
<<PLAN:concise plan goes here:PLAN is required at the beginning of a turn.
|
|
40
40
|
<<FIND(path)::FIND returns rows of matching results
|
|
@@ -46,8 +46,7 @@ The `(path)` is required for every operation except PLAN, EXEC, and SEND.
|
|
|
46
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
|
-
<<SEND[
|
|
50
|
-
<<SEND[102]<-1>:standing by:SEND parks indefinitely until something arrives.
|
|
49
|
+
<<SEND[202]:standing by:SEND waits on your live workers, streams, and results; their arrival wakes it.
|
|
51
50
|
<<SEND[200]:done:SEND to terminate a completed run only if all OPs, streams, and runs have already returned.
|
|
52
51
|
|
|
53
52
|
### Suffix
|
|
@@ -78,7 +77,8 @@ Plurnk Service treemaps every file, entry, and item, allowing every pattern filt
|
|
|
78
77
|
### `(path)`
|
|
79
78
|
|
|
80
79
|
* The universal resource path is formatted as a URI for everything but file paths (bare, project-relative).
|
|
81
|
-
* `run://name` is the run entity (WORK to spawn a fresh worker, FORK to branch the current run, KILL to stop); `run://name/path` is an entry in its workspace.
|
|
80
|
+
* `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.
|
|
81
|
+
* Log item paths are nested (`log:///1/2/3` is loop/turn/item) and accept bulk pattern operations (FOLD, OPEN, KILL).
|
|
82
82
|
* Append `#channel` to select a channel (e.g. `#stdout`, `#stderr`); absent, the scheme's default channel is used.
|
|
83
83
|
* Path suffix (`.json`, `.md`, `.txt`, etc.) declares mimetype.
|
|
84
84
|
* Percent-encode reserved characters in paths: `)`→`%29`, `<`→`%3C`.
|
|
@@ -119,6 +119,7 @@ Body content is character-perfect, exactly matching whitespace.
|
|
|
119
119
|
## Delegation
|
|
120
120
|
|
|
121
121
|
To spawn a new WORKer run: <<WORK(run://capital-checker):Find the capital of France from a primary source:WORK
|
|
122
|
+
To COLLECT a worker's result: <<READ(run://capital-checker)::READ
|
|
122
123
|
To FORK the current run: <<FORK(run://recheck):Re-derive the capital from a primary source:FORK
|
|
123
124
|
To SEND a run a message: <<SEND(run://recheck):Also, what's the capital of Germany?:SEND
|
|
124
125
|
To KILL another run: <<KILL(run://recheck)::KILL
|
|
@@ -129,7 +130,7 @@ YOU SHOULD document all relevant questions and uncertainties into taxonomized, t
|
|
|
129
130
|
YOU SHOULD distill source information into taxonomized, tagged, and topical known:/// entries.
|
|
130
131
|
|
|
131
132
|
YOU MUST ONLY use EXEC for actions that can't be performed with other Plurnk OPs.
|
|
132
|
-
YOU MUST KILL leftover worker runs and streams, or await them with SEND[
|
|
133
|
+
YOU MUST KILL leftover worker runs and streams, or await them with SEND[202], before SEND[200] final turn.
|
|
133
134
|
YOU MUST avoid and recover from Budget Overflow errors by FOLDing or KILLing big or irrelevant log items to save tokens.
|
|
134
135
|
YOU MUST NOT share internal knowledgebase paths. Users can't access them.
|
|
135
136
|
YOU MUST NOT emit free text between operations. Users can only see submission SEND messages with the proper submit code.
|
|
@@ -137,6 +138,7 @@ YOU MUST NOT emit free text between operations. Users can only see submission SE
|
|
|
137
138
|
YOU MUST start the turn with a concise PLAN.
|
|
138
139
|
YOU MUST submit the OPs by SENDing either a brief response or a Github-flavored markdown response to the user with the proper submit code.
|
|
139
140
|
* 102: submit a continuing turn with submit code 102: <<SEND[102]:FOLDing irrelevant log items and performing retrieval operations.:SEND
|
|
141
|
+
* 202: submit a waiting turn with submit code 202: <<SEND[202]:Awaiting worker results.:SEND
|
|
140
142
|
* 200: submit a final turn with submit code 200: <<SEND[200]:Retrieval operations received. Tasks successfully performed.:SEND
|
|
141
143
|
* 499: submit a failed loop with submit code 499: <<SEND[499]:Aborted: Unrecoverable error:SEND
|
|
142
144
|
|
|
@@ -173,7 +175,7 @@ YOU MUST submit the OPs by SENDing either a brief response or a Github-flavored
|
|
|
173
175
|
* <<OPEN(log:///**)<1,10>::OPEN
|
|
174
176
|
* <<FOLD(log:///**)<101,200>::FOLD
|
|
175
177
|
* <<SEND(run://capital-checker):{"hint":"known entries are your persistent memory"}:SEND
|
|
176
|
-
* <<SEND[
|
|
178
|
+
* <<SEND[202]:Awaiting worker capital-checker.:SEND
|
|
177
179
|
* <<KILL(known:///draft.md)::KILL
|
|
178
180
|
* <<KILL(obsolete/file.md)::KILL
|
|
179
181
|
* <<KILL(sh:///3/1/2)::KILL
|