@plurnk/plurnk-grammar 0.74.21 → 0.74.28
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/src/AstBuilder.d.ts +2 -2
- package/dist/src/AstBuilder.d.ts.map +1 -1
- package/dist/src/AstBuilder.js +7 -3
- package/dist/src/AstBuilder.js.map +1 -1
- package/dist/src/PlurnkParser.d.ts +1 -0
- package/dist/src/PlurnkParser.d.ts.map +1 -1
- package/dist/src/PlurnkParser.js +62 -35
- package/dist/src/PlurnkParser.js.map +1 -1
- package/dist/src/generated/plurnkLexer.d.ts +31 -18
- package/dist/src/generated/plurnkLexer.d.ts.map +1 -1
- package/dist/src/generated/plurnkLexer.js +360 -227
- package/dist/src/generated/plurnkLexer.js.map +1 -1
- package/dist/src/generated/plurnkParser.d.ts +104 -54
- package/dist/src/generated/plurnkParser.d.ts.map +1 -1
- package/dist/src/generated/plurnkParser.js +890 -428
- package/dist/src/generated/plurnkParser.js.map +1 -1
- package/dist/src/generated/plurnkParserVisitor.d.ts +28 -0
- package/dist/src/generated/plurnkParserVisitor.d.ts.map +1 -1
- package/dist/src/generated/plurnkParserVisitor.js +24 -0
- package/dist/src/generated/plurnkParserVisitor.js.map +1 -1
- package/package.json +1 -1
- package/plurnk.md +8 -4
package/plurnk.md
CHANGED
|
@@ -10,6 +10,8 @@ YOU MUST ONLY use the Extended HEREDOC Plurnk Operations (PLAN|FIND|READ|EDIT|CO
|
|
|
10
10
|
|
|
11
11
|
<<OPsuffix[signal]?(target)?<Line/Result>?:body?:OPsuffix
|
|
12
12
|
|
|
13
|
+
Empty (no body) operations contain two colons: <<READ(README.md)::READ
|
|
14
|
+
|
|
13
15
|
### Operations
|
|
14
16
|
|
|
15
17
|
The `(target)` is required for every operation except PLAN, EXEC, and SEND. Other fields are optional unless specified otherwise.
|
|
@@ -31,6 +33,7 @@ The `(target)` is required for every operation except PLAN, EXEC, and SEND. Othe
|
|
|
31
33
|
FIND returns rows of results, READ returns lines of content.
|
|
32
34
|
READ output prefixes every line with line numbers and a hard tab, `N: `. The prefix is not part of the source.
|
|
33
35
|
EDIT is only for adding or modifying files and entries. Do not attempt to edit log items.
|
|
36
|
+
EDIT replaces the selected line(s) `<N,M>` with literal body content, never with patterns.
|
|
34
37
|
OPEN expands (`+`) the log item body and costs tokens. FOLD hides (`-`) the log item body and saves tokens. Not all log items have a body (`*`).
|
|
35
38
|
EXEC produces output stream channels on the next turn that you can then OPEN, FOLD, FIND, READ, or KILL.
|
|
36
39
|
KILL deletes files and entries, erases log items, and kills streams.
|
|
@@ -107,6 +110,9 @@ YOU MUST terminate the turn by SENDing a message to the user with the proper sta
|
|
|
107
110
|
|
|
108
111
|
YOU MUST SEND[102] to receive the results of operations you submitted.
|
|
109
112
|
|
|
113
|
+
To spawn a separate run: <<EDIT(run://capital-checker):Find the capital of France.:EDIT
|
|
114
|
+
To fork the current run: <<COPY(run://self):Re-derive the capital from a primary source.:COPY
|
|
115
|
+
|
|
110
116
|
## Examples
|
|
111
117
|
|
|
112
118
|
* <<FIND(config/**/*.xml)://user[@role='admin']:FIND
|
|
@@ -120,8 +126,8 @@ YOU MUST SEND[102] to receive the results of operations you submitted.
|
|
|
120
126
|
* <<READ(https://en.wikipedia.org/wiki/Paris)<426,465>::READ
|
|
121
127
|
* <<EDIT[philosophy,existentialism](known:///philosophy/existentialism/meaning.md):The meaning of life is 42:EDIT
|
|
122
128
|
* <<EDIT[france,geography](unknown:///countries/france/capital.md):What is the capital of France?:EDIT
|
|
123
|
-
* <<EDIT[plan,france,task](
|
|
124
|
-
* <<EDIT(
|
|
129
|
+
* <<EDIT[plan,france,task](run://self/plan.md):- [ ] Decompose prompt into unknowns:EDIT
|
|
130
|
+
* <<EDIT(run://self/plan.md)<2>:- [x] Discover capital of France:EDIT
|
|
125
131
|
* <<EDIT(known:///countries/france/capital.md)<-1>:[Wikipedia: Paris](https://en.wikipedia.org/wiki/Paris):EDIT
|
|
126
132
|
* <<EDIT(known:///countries/france/capital.md)<1,-1>::EDIT
|
|
127
133
|
* <<EDIT(known:///users.json)<0>:{"name":"Eve"}:EDIT
|
|
@@ -131,8 +137,6 @@ YOU MUST SEND[102] to receive the results of operations you submitted.
|
|
|
131
137
|
* <<KILL(obsolete/file.md)::KILL
|
|
132
138
|
* <<KILL(sh:///3/1/2)::KILL
|
|
133
139
|
* <<KILL[9](sh:///3/1/3)::KILL
|
|
134
|
-
* <<EDIT(run://capital-checker):Find the capital of France.:EDIT
|
|
135
|
-
* <<COPY(run://.):Re-derive the capital from a primary source.:COPY
|
|
136
140
|
* <<OPEN(log:///**/get)<1,10>::OPEN
|
|
137
141
|
* <<FIND(known:///**)<5>:~french revolutionary history:FIND
|
|
138
142
|
* <<FIND(known:///**)<0.7>:~french territorial concessions:FIND
|