@plurnk/plurnk-contracts 1.19.1 → 1.19.3
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/SPEC.md +30 -16
- package/package.json +1 -1
- package/plurnk.md +19 -6
package/SPEC.md
CHANGED
|
@@ -343,9 +343,11 @@ own lines' indentation. An OPENER is different: an operation's backticks follow
|
|
|
343
343
|
directly (operator, 2026-09-18), so an indented fence opens a quotation, never an operation —
|
|
344
344
|
CommonMark reads an indented block as code, and `plurnk.md` shows its own examples that way. This
|
|
345
345
|
reverses the 2026-09-12 tolerance (then measured at five to ten percent of emissions on
|
|
346
|
-
GLM-5.3-flash; 2.8% of that lane's emissions today).
|
|
347
|
-
|
|
348
|
-
|
|
346
|
+
GLM-5.3-flash; 2.8% of that lane's emissions today). An offset fence is prose and draws nothing:
|
|
347
|
+
`plurnk.md` instructs the model to offset any example it does not intend to execute, so the form
|
|
348
|
+
is correct by construction and there is no mistake to report (operator, 2026-09-21). The parser
|
|
349
|
+
presumes nothing about why a fence is offset, and {§prose-conclusion} judges the reply on its own
|
|
350
|
+
terms.
|
|
349
351
|
|
|
350
352
|
§inline-chain A closer on a heading line, or on a body's closing line, may be
|
|
351
353
|
followed on that same line by the next opener; the closer still closes, and the
|
|
@@ -447,9 +449,13 @@ diagnostic, notice or teaching mentions the reading (#760).
|
|
|
447
449
|
as the model's answer, or an operation attempt. `PlurnkParser.operationAttempt(input,
|
|
448
450
|
executors)` names the attempt: a line opening a four-backtick fence, a heading outside
|
|
449
451
|
any fence ({§bare-heading-advisory}; a known executor's name is a heading only when a
|
|
450
|
-
slot follows it),
|
|
451
|
-
|
|
452
|
-
|
|
452
|
+
slot follows it), a three-backtick fence naming an operation — a miscounted heading is a
|
|
453
|
+
typo, not an answer, so the loop continues and the next packet carries `needs four
|
|
454
|
+
backticks to run` (#801) — native tool-call markup that {§native-tool-calls} did not
|
|
455
|
+
read, or echoed packet rows (`### log://…`). The three-backtick rule reads the raw text,
|
|
456
|
+
since such a fence quotes itself, and it takes the executor rule with it: ```` ```sh ````
|
|
457
|
+
is an ordinary code block, ```` ```sh (x) ```` is a miscounted heading. Anything else,
|
|
458
|
+
code blocks under a bare language tag included, is prose (#761).
|
|
453
459
|
|
|
454
460
|
§bare-heading-advisory An operation name that opens a line outside any block in the
|
|
455
461
|
shape of a heading (`READ (…)`, `NOTE`, …) is prose and runs nothing. The parser
|
|
@@ -475,7 +481,7 @@ beside owner metadata, not only a matcher carried inside its `pattern` option.
|
|
|
475
481
|
|---|---|
|
|
476
482
|
| Fence name | Reserved native OP, otherwise a registered executor or attached MCP service |
|
|
477
483
|
| `(path)` | Target/program/tool slot; COPY and MOVE each have two resource operands |
|
|
478
|
-
| `[metadata]` | One
|
|
484
|
+
| `[metadata]` | One owner-interpreted block; options, never the op's input |
|
|
479
485
|
| `<scope>` | Operation-specific numeric or anchored coordinates |
|
|
480
486
|
| `<!-- … -->` | Optional final, single-line aside |
|
|
481
487
|
| Body | Literal content between framing newlines |
|
|
@@ -505,15 +511,23 @@ for the narrowly owned {§misplaced-aside-advisory}.
|
|
|
505
511
|
|
|
506
512
|
§scheme-metadata-modifier A target may carry one single-line `[metadata]`
|
|
507
513
|
block after its scope; executor and SEND fences also admit it without a target.
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
glob characters. A block that is not valid JSON, or a second block on one
|
|
514
|
+
The block belongs to the selected scheme or executor, which owns its shape,
|
|
515
|
+
interpretation, validation and authority. The language assigns no meaning to
|
|
516
|
+
the content and stores each block's exact inner text: balanced brackets inside
|
|
517
|
+
the block are retained, and double-quoted strings protect their brackets.
|
|
518
|
+
Brackets inside `(path)` remain ordinary path and
|
|
519
|
+
glob characters. A block the owner cannot read, or a second block on one
|
|
515
520
|
operand, is the owner's `400`, never a parser diagnostic. An unfinished block
|
|
516
|
-
or multiline metadata loses its boundary.
|
|
521
|
+
or multiline metadata loses its boundary.
|
|
522
|
+
|
|
523
|
+
**House policy, not a language rule:** every first-party scheme and executor
|
|
524
|
+
reads its block through the shared `MetadataOptions` reader, which takes the
|
|
525
|
+
block with its brackets as a JSON array of option objects, merged left to
|
|
526
|
+
right with later keys winning. A third-party owner may read its block any way
|
|
527
|
+
it likes — the language guarantees only the exact inner text. Documentation
|
|
528
|
+
for a first-party owner therefore shows the bracketed array form.
|
|
529
|
+
|
|
530
|
+
Two keys never reach an owner:
|
|
517
531
|
`pattern`, the language's own ({§matcher-option}), and `env`, reserved for the
|
|
518
532
|
service's environment option on the operations that open a process or a
|
|
519
533
|
Worker; the shared reader withholds both from the owner's options.
|
|
@@ -550,7 +564,7 @@ whose block left no metadata back bare when the bare form reads back identically
|
|
|
550
564
|
| Executor name | Letters, digits, `_`, `.`, `+`, or `-`; reserved OPs win |
|
|
551
565
|
| Fence | Three or more backticks, matched by exact count |
|
|
552
566
|
| `(path)` | Local path, URI, program or tool name; §5 |
|
|
553
|
-
| `[metadata]` | One
|
|
567
|
+
| `[metadata]` | One owner-interpreted block of owner-defined options |
|
|
554
568
|
| `<scope>` | Numeric or anchored coordinates; §7 |
|
|
555
569
|
| Body | Literal text; never recursively interpreted as operations |
|
|
556
570
|
|
package/package.json
CHANGED
package/plurnk.md
CHANGED
|
@@ -9,9 +9,12 @@ Pattern Lookup Universal Resource NetworK: find anything by pattern, read it by
|
|
|
9
9
|
````
|
|
10
10
|
|
|
11
11
|
> [!IMPORTANT]
|
|
12
|
-
> YOU MUST ONLY respond with
|
|
12
|
+
> YOU MUST ONLY respond with valid Operation Syntax OPs, responding with only fenced markdown if concluding.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
> [!WARNING]
|
|
15
|
+
> YOU MUST offset any example OP you do not intend to execute with a hard or soft tab.
|
|
16
|
+
|
|
17
|
+
* `[metadata]`: optional one-line special configuration.
|
|
15
18
|
* `<!-- aside -->`: optional terse note.
|
|
16
19
|
* All parameters and the aside must appear on the same line as OP.
|
|
17
20
|
* OP may be either a Plurnk Operation or one of the tools.
|
|
@@ -29,10 +32,19 @@ Pattern Lookup Universal Resource NetworK: find anything by pattern, read it by
|
|
|
29
32
|
* WORK: Deploy a child worker (fresh log).
|
|
30
33
|
* FORK: Deploy a forked worker (forked log).
|
|
31
34
|
* BARE: Deploy an isolated inference query (no log or tools).
|
|
32
|
-
* WAIT: Yield until the next wake: a child's result, a message, a stream's end.
|
|
35
|
+
* WAIT: Yield until the next wake: a child worker's result, a message, a stream's end.
|
|
36
|
+
|
|
37
|
+
* markdown: Final response alone, concluding the entire loop. All other OPs, child workers, or streams are finished.
|
|
33
38
|
|
|
34
39
|
## Workflow Management
|
|
35
40
|
|
|
41
|
+
> [!IMPORTANT]
|
|
42
|
+
> The markdown response must be the only OP emitted in the final turn.
|
|
43
|
+
|
|
44
|
+
````markdown
|
|
45
|
+
The answer is 42.
|
|
46
|
+
````
|
|
47
|
+
|
|
36
48
|
> [!INFO]
|
|
37
49
|
> To cancel all unfinished work in your worker and its descendants, KILL your own worker address.
|
|
38
50
|
|
|
@@ -48,7 +60,6 @@ Pattern Lookup Universal Resource NetworK: find anything by pattern, read it by
|
|
|
48
60
|
* Log item paths nest: `log:///1/2/3/READ` is loop/turn/item/operation.
|
|
49
61
|
* FIND results hold one inner array per path: its channels, default first; append `#channel` to select another.
|
|
50
62
|
* Percent-encode `(` as `%28` and `)` as `%29`.
|
|
51
|
-
* Creating a file creates missing parent directories.
|
|
52
63
|
|
|
53
64
|
## File Editing
|
|
54
65
|
|
|
@@ -68,6 +79,9 @@ Pattern Lookup Universal Resource NetworK: find anything by pattern, read it by
|
|
|
68
79
|
> [!TIP]
|
|
69
80
|
> The EDIT body is literal text. YOU SHOULD address lines by `<@hash>` or `<@start,@end>`; stale targets are rejected.
|
|
70
81
|
|
|
82
|
+
> [!TIP]
|
|
83
|
+
> Creating a file creates missing parent directories.
|
|
84
|
+
|
|
71
85
|
## Delegation
|
|
72
86
|
|
|
73
87
|
````WORK (worker://reviewer) [{"env": {"NODE_ENV": "test"}}] <!-- the child's result lands in your log -->
|
|
@@ -115,9 +129,8 @@ All member files and entries are mapped, indexed, and universally pattern search
|
|
|
115
129
|
| prefix | dialect | example |
|
|
116
130
|
|--------|-----------------------------|---------------------------------|
|
|
117
131
|
| `/` | regex (ECMAScript) | `/\btimeout\b/i` |
|
|
118
|
-
| `^` | regex anchored to a line | `^ERROR:.*` |
|
|
119
132
|
| `//` | xpath (1.0) | `//dependencies/*` |
|
|
120
133
|
| `$` | jsonpath (RFC 9535) | `$.items[?(@.price>500)]` |
|
|
121
134
|
| `~` | full-text (SQLite FTS5) | `~retry` |
|
|
122
|
-
| `&` | graph
|
|
135
|
+
| `&` | graph (treesitter symbols) | `&sym`, `&<sym`, `&>sym` |
|
|
123
136
|
| none | literal or extglob | `?(export )?(async )function *` |
|