@plurnk/plurnk-grammar 0.53.0 → 0.56.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 CHANGED
@@ -21,7 +21,7 @@ const result = PlurnkParser.parse(input);
21
21
 
22
22
  Discriminate on `item.kind`. For `statement` items, narrow on `statement.op` (one of `FIND READ EDIT COPY MOVE OPEN FOLD SEND EXEC KILL PLAN`) to access per-OP typed fields. Full API: [SPEC.md §12](SPEC.md#12-public-api).
23
23
 
24
- `parsePath(raw)` is a top-level helper that decomposes a path/URI string into a `ParsedPath` (the same decomposition applied to `(target)` slots). Reach for it to resolve a **COPY destination**: COPY's body is an opaque string — a destination URI for an entry copy, a prompt for a run fork (`run:///`) — so the consumer interprets it by scheme and calls `parsePath` for the destination case. (MOVE destinations arrive pre-parsed; COPY's don't, because its body is polymorphic.)
24
+ `parsePath(raw)` is a top-level helper that decomposes a path/URI string into a `ParsedPath` (the same decomposition applied to `(target)` slots). Reach for it to resolve a **COPY destination**: COPY's body is an opaque string — a destination URI for an entry copy, a prompt for a run fork (`run://`) — so the consumer interprets it by scheme and calls `parsePath` for the destination case. (MOVE destinations arrive pre-parsed; COPY's don't, because its body is polymorphic.)
25
25
 
26
26
  ## cli
27
27
 
@@ -170,7 +170,7 @@ Nesting: outer body may contain inner `<<OP:…:OP` statements; outer must use a
170
170
  <<SEND[102](agent://supervisor):decomposition complete; awaiting clearance:SEND
171
171
 
172
172
  31. Kill a runaway process
173
- <<KILL(exec:///3/1/2)::KILL
173
+ <<KILL(sh:///3/1/2)::KILL
174
174
 
175
175
  32. Permanently delete an entry
176
176
  <<KILL(known:///obsolete/note)::KILL
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schemas.plurnk.dev/v0/ChannelContent.json",
4
4
  "title": "ChannelContent",
5
- "description": "One named stream of content on an entry. Channels carry distinct, parallel views of an entry (e.g. `stdout` and `stderr` on `exec://`; `body` and `headers` on `https://`; `body` and `symbols` on a code file). Each channel has its own content bytes, mimetype, and token count.",
5
+ "description": "One named stream of content on an entry. Channels carry distinct, parallel views of an entry (e.g. `stdout` and `stderr` on an executor scheme like `node://`/`sh://`; `body` and `headers` on `https://`; `body` and `symbols` on a code file). Each channel has its own content bytes, mimetype, and token count.",
6
6
  "type": "object",
7
7
  "required": ["content", "mimetype", "tokens"],
8
8
  "additionalProperties": false,
@@ -18,7 +18,7 @@
18
18
  "default_channel": {
19
19
  "type": "string",
20
20
  "pattern": "^[a-z][a-z0-9_-]*$",
21
- "description": "Channel name selected when an op against this scheme has no fragment. Conventionally `body`; exec schemes typically declare `stdout`."
21
+ "description": "Channel name selected when an op against this scheme has no fragment. Conventionally `body`; executor schemes (`{tag}://`) typically declare `stdout`."
22
22
  },
23
23
  "channel_orientations": {
24
24
  "type": "object",
@@ -43,7 +43,7 @@ export interface SchemeRegistration {
43
43
  category: string;
44
44
  default_scope: ("agent" | "session");
45
45
  /**
46
- * Channel name selected when an op against this scheme has no fragment. Conventionally `body`; exec schemes typically declare `stdout`.
46
+ * Channel name selected when an op against this scheme has no fragment. Conventionally `body`; executor schemes (`{tag}://`) typically declare `stdout`.
47
47
  */
48
48
  default_channel: string;
49
49
  /**
@@ -97,7 +97,7 @@ export interface Params {
97
97
  [k: string]: (string | string[]);
98
98
  }
99
99
  /**
100
- * One named stream of content on an entry. Channels carry distinct, parallel views of an entry (e.g. `stdout` and `stderr` on `exec://`; `body` and `headers` on `https://`; `body` and `symbols` on a code file). Each channel has its own content bytes, mimetype, and token count.
100
+ * One named stream of content on an entry. Channels carry distinct, parallel views of an entry (e.g. `stdout` and `stderr` on an executor scheme like `node://`/`sh://`; `body` and `headers` on `https://`; `body` and `symbols` on a code file). Each channel has its own content bytes, mimetype, and token count.
101
101
  */
102
102
  export interface LineMarker {
103
103
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-grammar",
3
- "version": "0.53.0",
3
+ "version": "0.56.0",
4
4
  "description": "ANTLR4 grammar for the Plurnk LLM agent protocol",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/plurnk.md CHANGED
@@ -34,10 +34,10 @@ EXEC defaults to `sh`; override with an optional executor (`sqlite`, `node`, etc
34
34
 
35
35
  The agent maintains two surfaces for budgeting working-memory tokens:
36
36
 
37
- - **Log** — the record of every operation. FOLD contracts a log row to its one-line summary and saves tokens; OPEN shows the complete record but spends from your `tokensFree` context tokens. Non-destructive — folded rows remain listed and re-OPENable.
37
+ - **Log** — the record of every operation. FOLD contracts a log row to its one-line summary and saves tokens; OPEN shows the complete record but spends from your `tokensFree` context tokens. Non-destructive — FOLDed rows remain listed and re-OPENable.
38
38
  - **`plurnk:///manifest.json`** — what's available: the complete unranked directory of every entry. Query it to discover available entries.
39
39
 
40
- OPEN and FOLD operate on the log only.
40
+ OPEN and FOLD operate on the log only. Log items are read-only, but can be KILLed.
41
41
 
42
42
  ## `<Line> / <Result>`
43
43
 
@@ -101,7 +101,7 @@ Body content is character-perfect, exactly matching whitespace.
101
101
  <<READ(README.md)://h2/text():READ
102
102
  <<READ(plurnk:///manifest.json):$[?(@.channels.stderr)]:READ
103
103
  <<READ(log:///1/2/3):$[*].matched.codename:READ
104
- <<READ(exec:///3/1/2#stdout)<1,40>::READ
104
+ <<READ(node:///3/1/2#stdout)<1,40>::READ
105
105
  <<READ(/etc/hosts)<2>::READ
106
106
  <<READ(https://en.wikipedia.org/wiki/Paris)<426,465>::READ
107
107
  <<EDIT[philosophy,existentialism](known:///philosophy/existentialism/meaning.md):The meaning of life is 42:EDIT
@@ -121,9 +121,9 @@ Body content is character-perfect, exactly matching whitespace.
121
121
  <<COPY[archive,2026-05-14](known:///draft.md):known:///archive/2026-05-14/draft.md:COPY
122
122
  <<MOVE[final](known:///draft/answer.md):known:///final/answer.md:MOVE
123
123
  <<KILL(obsolete/file.md)::KILL
124
- <<KILL(exec:///3/1/2)::KILL
125
- <<EDIT(run:///capital-check):Find the capital of France.:EDIT
126
- <<COPY(run:///.):Re-derive the capital from a primary source.:COPY
124
+ <<KILL(sh:///3/1/2)::KILL
125
+ <<EDIT(run://capital-checker):Find the capital of France.:EDIT
126
+ <<COPY(run://.):Re-derive the capital from a primary source.:COPY
127
127
  <<OPEN(log:///**/get)<1,10>::OPEN
128
128
  <<FIND(known:///**)<5>:~french revolutionary history:FIND
129
129
  <<FIND(known:///**)<0.7>:~french territorial concessions:FIND
@@ -135,7 +135,7 @@ Body content is character-perfect, exactly matching whitespace.
135
135
  <<FIND(src/**):@<createCoder:FIND
136
136
 
137
137
  <<EDIT[tutorial,training,scripts](example.sh):#!/usr/bin/env sh
138
- echo "Hello, world!" > hello.txt
138
+ echo "Taxonomic path names and folksonomic tags on known entries improve reasoning and recall!" > advice.txt
139
139
  :EDIT
140
140
 
141
141
  <<EXEC:
@@ -145,7 +145,7 @@ chmod +x ./example.sh
145
145
 
146
146
  <<EXEC[sqlite]:SELECT 22.0 / 7.0;:EXEC
147
147
 
148
- <<SEND(run:///capital-check):{"hint":"prefer primary sources over wikis"}:SEND
148
+ <<SEND(run://capital-checker):{"hint":"known entries are your persistent memory"}:SEND
149
149
 
150
- <<SEND[102]:decomposed prompt into unknowns; plan initialized:SEND
150
+ <<SEND[102]:Forking a research run, optimizing log relevance...:SEND
151
151
  <<SEND[200]:Paris:SEND