@plurnk/plurnk-contracts 1.14.2 → 1.15.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.
Files changed (46) hide show
  1. package/SPEC.md +90 -106
  2. package/dist/plurnk.gemma.gbnf +41 -67
  3. package/dist/plurnk.qwen.gbnf +41 -67
  4. package/dist/schema/ClientStatement.json +114 -40
  5. package/dist/schema/PlurnkStatement.json +29 -199
  6. package/dist/schema/RangeExtent.json +1 -1
  7. package/dist/src/AstBuilder.d.ts +2 -2
  8. package/dist/src/AstBuilder.d.ts.map +1 -1
  9. package/dist/src/AstBuilder.js +56 -144
  10. package/dist/src/AstBuilder.js.map +1 -1
  11. package/dist/src/PlurnkErrorStrategy.d.ts +0 -1
  12. package/dist/src/PlurnkErrorStrategy.d.ts.map +1 -1
  13. package/dist/src/PlurnkErrorStrategy.js +57 -46
  14. package/dist/src/PlurnkErrorStrategy.js.map +1 -1
  15. package/dist/src/PlurnkParser.d.ts +1 -2
  16. package/dist/src/PlurnkParser.d.ts.map +1 -1
  17. package/dist/src/PlurnkParser.js +13 -102
  18. package/dist/src/PlurnkParser.js.map +1 -1
  19. package/dist/src/generated/plurnkLexer.d.ts +42 -69
  20. package/dist/src/generated/plurnkLexer.d.ts.map +1 -1
  21. package/dist/src/generated/plurnkLexer.js +485 -642
  22. package/dist/src/generated/plurnkLexer.js.map +1 -1
  23. package/dist/src/generated/plurnkParser.d.ts +75 -215
  24. package/dist/src/generated/plurnkParser.d.ts.map +1 -1
  25. package/dist/src/generated/plurnkParser.js +631 -1833
  26. package/dist/src/generated/plurnkParser.js.map +1 -1
  27. package/dist/src/generated/plurnkParserVisitor.d.ts +3 -87
  28. package/dist/src/generated/plurnkParserVisitor.d.ts.map +1 -1
  29. package/dist/src/generated/plurnkParserVisitor.js +2 -74
  30. package/dist/src/generated/plurnkParserVisitor.js.map +1 -1
  31. package/dist/src/index.d.ts +0 -2
  32. package/dist/src/index.d.ts.map +1 -1
  33. package/dist/src/index.js +0 -1
  34. package/dist/src/index.js.map +1 -1
  35. package/dist/src/types.d.ts +1 -1
  36. package/dist/src/types.d.ts.map +1 -1
  37. package/dist/src/types.generated.d.ts +18 -50
  38. package/dist/src/types.generated.d.ts.map +1 -1
  39. package/dist/src/types.js +1 -1
  40. package/dist/src/types.js.map +1 -1
  41. package/package.json +1 -1
  42. package/plurnk.md +51 -57
  43. package/dist/src/TagSignal.d.ts +0 -15
  44. package/dist/src/TagSignal.d.ts.map +0 -1
  45. package/dist/src/TagSignal.js +0 -53
  46. package/dist/src/TagSignal.js.map +0 -1
package/SPEC.md CHANGED
@@ -147,7 +147,7 @@ order-independent: a descriptor is admitted only when every layer admits it.
147
147
  No Worker or loop can restore service, workspace, or parent authority. A
148
148
  composed operation is admitted only when every routed demand survives. These
149
149
  descriptors govern routed external authority, not every grammar statement:
150
- log/program control such as PLAN, OPEN, FOLD, log KILL, and targetless SEND
150
+ log/program control such as PLAN, log KILL, and label or targetless SEND
151
151
  creates no capability demand. A known interactive runtime is represented by
152
152
  access class `interact`; scheme and runtime manifests contribute traits rather
153
153
  than hidden policy behavior.
@@ -303,11 +303,10 @@ lane. This makes both the canonical delimiter and section boundary structurally
303
303
  available during constrained generation; ANTLR remains the wider language and
304
304
  accepts intentional alternate-lane literals during ingestion.
305
305
 
306
- §gbnf-curation-shaping The rail admits OPEN/FOLD curation terms, a canonical
307
- `log:` target, an optional log-body line scope, and a matcher independently. It accepts any ordered mixture of
308
- unsigned, `+`, and `-` terms without proving that the combination selects a log
309
- item; ANTLR and AstBuilder own that condition, while runtime owns wider ingested
310
- target resolution.
306
+ §gbnf-kill-shaping The rail shapes KILL as one required target, an optional
307
+ text-coordinate scope (numeric or anchored), and an optional one-line matcher body,
308
+ without proving that the selection resolves; ANTLR and AstBuilder own the statement's
309
+ shape, and runtime owns target resolution ({§kill-scope}).
311
310
 
312
311
  ## §canonical-statement 2. Canonical statement form
313
312
 
@@ -315,7 +314,7 @@ target resolution.
315
314
  # PLANdelimiter
316
315
  body
317
316
 
318
- ## OPdelimiter [signal]? (path)? <scope>? <!-- annotation -->?
317
+ ## OPdelimiter (path)? {metadata}* <scope>? <!-- annotation -->?
319
318
  body?
320
319
  ```
321
320
 
@@ -337,7 +336,6 @@ under {§plan-value}.
337
336
  | `# PLAN` | Required level-one turn anchor |
338
337
  | `## OP` | Level-two protocol operation |
339
338
  | `delimiter` | Heading lane, joined directly to PLAN or OP |
340
- | `[signal]` | Optional operation-specific signal, preceded by one space |
341
339
  | `(path)` | Optional target slot, preceded by one space |
342
340
  | `{metadata}` | Optional repeatable scheme-metadata modifier after a target |
343
341
  | `<scope>` | Optional numeric scope, preceded by one space |
@@ -413,9 +411,8 @@ or safely execute understandable input:
413
411
 
414
412
  | Element | Accepted shape or role |
415
413
  |-------------|--------------------------------------------------------------------|
416
- | `OP` | `FIND READ EDIT COPY MOVE OPEN FOLD SEND EXEC BARE WORK FORK KILL PLAN` |
414
+ | `OP` | `FIND READ EDIT COPY MOVE SEND EXEC BARE WORK FORK KILL PLAN` |
417
415
  | `delimiter` | `[A-Za-z0-9_]*`, adjacent to PLAN or OP |
418
- | `[signal]` | Operation-specific tags, identifier, branch, or integer |
419
416
  | `(path)` | Local path or scheme URL target; detailed in §5 |
420
417
  | `{metadata}` | Repeatable opaque scheme modifier attached after a target |
421
418
  | `<scope>` | One or more signed integers or decimals; detailed in §7 |
@@ -427,22 +424,20 @@ or safely execute understandable input:
427
424
  The model-facing forms below are the canonical projection. Parser tolerance is
428
425
  governed by {§canonical-statement}; runtime conditions remain explicit below.
429
426
 
430
- | OP | `[signal]` | `(path)` | `<scope>` | `body` |
431
- |------|-------------------------------|----------------------------------------------|---------------------------------|--------------------------------|
432
- | PLAN | none | none | none | required Plurnk Plan JSON array |
433
- | FIND | optional add log tags | required target or glob | optional result range | optional matcher |
434
- | READ | optional add log tags | required target | optional text region | empty |
435
- | EDIT | optional add log tags | required file or entry | required for an existing target | literal text |
436
- | COPY | optional add log tags | required source and destination | optional region after each path | empty |
437
- | MOVE | optional add log tags | required source and destination | optional region after each path | empty |
438
- | FOLD | optional filter/change tags | optional log selection | optional log-body line scope | optional matcher |
439
- | OPEN | optional filter/change tags | optional log selection | optional log-body line scope | optional matcher |
440
- | EXEC | optional executor | optional local working path | optional timeout, poll | optional executor input |
441
- | BARE | optional add log tags | none | none | required prompt |
442
- | WORK | optional Git branch (refused unless the service enables branch delegation) | required fresh `worker://name` | none | required prompt |
443
- | FORK | optional Git branch (refused unless the service enables branch delegation) | required context-inheriting `worker://name` | none | required prompt |
444
- | KILL | optional target-specific code | required target, including a log item | none | empty |
445
- | SEND | optional target-specific code | optional recipient | optional timeout, poll | message; terminal is nonempty |
427
+ | OP | `(path)` | `<scope>` | `body` |
428
+ |------|----------------------------------------------|---------------------------------|--------------------------------|
429
+ | PLAN | none | none | required Plurnk Plan JSON array |
430
+ | FIND | required target or glob | optional result range | optional matcher |
431
+ | READ | required target | optional text region | empty |
432
+ | EDIT | required file or entry | required for an existing target | literal text |
433
+ | COPY | required source and destination | optional region after each path | empty |
434
+ | MOVE | required source and destination | optional region after each path | empty |
435
+ | EXEC | optional `[executor]`, optional program path ({§exec-executor-slot}) | optional timeout, poll | optional program input |
436
+ | BARE | none | none | required prompt |
437
+ | WORK | required fresh `worker://name` | none | required prompt |
438
+ | FORK | required context-inheriting `worker://name` | none | required prompt |
439
+ | KILL | required target, including a log item | optional text region ({§kill-scope}) | optional matcher |
440
+ | SEND | a label `(NEXT\|WAIT\|TERM\|FAIL)` or an optional recipient ({§send-label}) | optional timeout, poll on WAIT | message; terminal is nonempty |
446
441
 
447
442
  §operation-code-polymorphism SEND and KILL share a numeric wire slot, not one universal numeric vocabulary.
448
443
  For pathless terminal SEND, the code is the loop disposition defined in §9.
@@ -481,26 +476,35 @@ to ACP v1
481
476
  [`schema-v1.21.0`](https://github.com/agentclientprotocol/agent-client-protocol/tree/schema-v1.21.0)
482
477
  commit `272bf799f35a258c6a4107a0410ed361e83683d3`.
483
478
 
484
- §exec-tag-signal EXEC's bracket slot names its runtime. A bracket whose first character is
485
- a sign is a tag signal instead — a runtime never starts with `+` or `-` — so
486
- `## EXEC0 [+fetch]` and `## EXEC0 [crm] [+schema] (crm_describe)` admit: the tags
487
- classify the log row exactly as on FIND or READ, the runtime is the explicit one or the
488
- default shell, and each slot appears at most once.
489
-
490
- §log-tag-signal FIND, READ, EDIT, COPY, MOVE, and BARE canonically express additions
491
- as `+tag`. Because those operations have no tag-selection semantics, ANTLR also
492
- tolerates unsigned `tag` as an equivalent addition; `-tag` is invalid. Core
493
- strips any `+`; the signal neither filters nor modifies resources. OPEN and
494
- FOLD treat every unsigned `tag` as an ALL-tags selector, then add each `+tag`
495
- and remove each `-tag` from the selected log items. Signed terms never select,
496
- so either a target, matcher, or unsigned tag is required. Adding and removing
497
- the same tag conflicts. An optional OPEN/FOLD line scope changes visibility
498
- inside every selected canonical log body; it does not participate in row selection.
479
+ §exec-executor-slot An EXEC heading takes an optional `[executor]` slot before its path: `## EXEC0 [python3] (tools/report.py)`. The bracket names the registered executor that runs the program — a tool family, a language runtime, or the shell — and lexes as one `EXECUTOR` token only on an EXEC heading. The path names the program: a registered tool of that family, or a script file or entry. A bare `## EXEC0` is the shell running its body; with a path the body is the program's input. The AST carries `executor` (null for the shell) and `target` separately; the path is never split. Each of the executor, the path, and the `<timeout,poll>` scope appears at most once. Tool teaching, not the grammar, spells the registered executors; a `{cwd=…}` metadata block, interpreted by the executor, names the working directory.
480
+
481
+ §send-label SEND's path slot carries either a turn label or a recipient. The four
482
+ labels `(NEXT)`, `(WAIT)`, `(TERM)`, and `(FAIL)` lex as one `SEND_LABEL` token
483
+ and make the SEND terminal: the AST `status` is 102, 202, 200, or 499 and `target`
484
+ is null. A label SEND names no recipient; a label beside a recipient path is one
485
+ error at the heading naming that rule. A SEND whose path is a recipient
486
+ (`## SEND0 (worker://recheck)`, `(https://…)`, `(a2a://…)`), or whose path slot is
487
+ empty (the user), is a mid-turn message with `status` null. The GBNF rail spells a
488
+ mid-turn recipient as a URL, so a constrained turn can never place a label mid-turn.
489
+
490
+ §send-wait-scope A `(WAIT)` SEND keeps its numeric `<scope>` the park interval
491
+ and poll ({§park-202-only}); the dispatcher owns what it accepts. Every other label
492
+ takes no scope.
493
+
494
+ §kill-scope KILL takes an optional text-coordinate scope beside its target, numeric or
495
+ anchored (`## KILL0 (log:///**/READ) <17,-1>`, `## KILL0 (worker:///notes.md)
496
+ <@aB3dE,@0Aa9Z>`), and an optional one-line matcher body that selects rows. The AST
497
+ is `{ op: "KILL", target, lineMarker: TextLineMarker | null, body: MatcherBody | null }`.
498
+ Without a scope, KILL retires or deletes the whole target; with one, it removes exactly
499
+ that span — of a log body's packet projection or of an entry's content. Core owns the
500
+ one-way semantics: there is no operation that restores a scoped-away log body.
501
+
502
+ §legacy-bracket-slot The bracket slot carries no signal, tag, code, or status on any heading; EXEC alone takes `[executor]` ({§exec-executor-slot}). A `[` on any other heading is one bounded lexer diagnostic that names that rule and the OP's own `(path)` slot, and after PLAN states that PLAN takes no modifiers. The statement drops and its siblings run.
499
503
 
500
504
  The `<scope>` slot is optional where admitted and its domain is OP-specific. FIND
501
- scopes ordered results. EXEC and SEND scope timing. READ, EDIT, COPY, and
502
- MOVE use one universal text algebra independent of mimetype; OPEN/FOLD admit
503
- only its one- and two-line forms for canonical log-body visibility:
505
+ scopes ordered results. EXEC and a WAIT SEND scope timing. READ, EDIT, COPY,
506
+ MOVE, and KILL use one universal text algebra independent of mimetype; a log
507
+ KILL admits only its one- and two-line forms for canonical log-body visibility:
504
508
 
505
509
  | Arity | Surface meaning | Endpoint rule |
506
510
  |---------------|---------------------------------------------------------------------|------------------------------------------------------|
@@ -560,8 +564,6 @@ Mutation semantics:
560
564
  | EDIT | Status plus a bounded receipt for the effect that landed |
561
565
  | COPY | Source and destination selections plus ordered destination effects |
562
566
  | MOVE | Source and destination selections plus ordered destination and source effects |
563
- | OPEN | Status and matched log-item count |
564
- | FOLD | Status and matched log-item count |
565
567
  | SEND | Status and recipient acknowledgement when applicable |
566
568
  | EXEC | Spawn acknowledgement; output arrives through named stream channels |
567
569
  | BARE | The one-shot model response |
@@ -652,7 +654,7 @@ ingestion restriction: the parser decomposes arbitrary URL authorities.
652
654
 
653
655
  ## §matcher-prefix-claims 6. Bulk pattern matching
654
656
 
655
- FIND, authored READ, OPEN, FOLD, LOOK, and BUFF accept an optional body matcher.
657
+ FIND, authored READ, KILL, LOOK, and BUFF accept an optional body matcher.
656
658
  The lexer preserves the body opaquely; AstBuilder assigns the dialect from its
657
659
  leading characters, then normalizes matcher-bearing READ to FIND under
658
660
  {§read-find-normalization}.
@@ -671,12 +673,9 @@ visitor error and never falls back to glob matching.
671
673
  the same way — and the slip is one warning-severity advisory at the `<`, placed right after its
672
674
  statement, stating the `(path) <scope>` form that was used. The statement runs; a warning is
673
675
  never a strike. A `<` anywhere else in the slot remains the lexer's refusal.
674
- - §tag-slot-tolerance A tag written as a path ahead of the real path (`## READ0 (+diff) (a.ts)`)
675
- is read as `[+diff] (a.ts)` the rewrite keeps the heading's length, so every later position
676
- stays true — and the slip is one error-severity diagnostic at the first paren, placed right
677
- after its statement, stating the `[+diff]` correction and that it was used. The statement
678
- runs with the tag. A heading that already carries a signal is not rewritten: its second path
679
- slot is blamed at the first paren and the statement is dropped.
676
+ - §second-path-slot A second `(path)` on a heading that already closed one is a parser
677
+ error at the second paren stating the one-slot rule and that a pattern belongs in the body;
678
+ the statement is dropped and its siblings run.
680
679
 
681
680
  | Prefix | Dialect | Canonical body | Typed admission | Runtime owner |
682
681
  |-----------|----------|--------------------------------------|-----------------------------------|---------------------|
@@ -727,16 +726,16 @@ The operation column names the canonical AST operation after
727
726
  | EDIT | 0/1/2/4 text coordinates | Text replacement, deletion, prepend, or append |
728
727
  | COPY/MOVE source | 0/1/2/4 text coordinates | Region copied or moved from the selected source |
729
728
  | COPY/MOVE destination | 0/1/2/4 text coordinates after target | Region replaced or insertion point at the destination |
730
- | OPEN / FOLD | 0/1/2 body-relative line coordinates | Whole log body when absent; one physical line or inclusive range when present |
729
+ | KILL | 0/1/2 text coordinates | Whole target when absent; one physical line or inclusive range when present ({§kill-scope}) |
731
730
  | EXEC | `timeout[,poll]` | Spawn lifetime bound and poll cadence in minutes |
732
- | Terminal SEND `[202]` | `timeout[,poll]` | Bounded or indefinite wait and optional poll cadence |
731
+ | `## SEND0 (WAIT)` | `timeout[,poll]` | Bounded or indefinite wait and optional poll cadence ({§send-wait-scope}) |
733
732
 
734
733
  Text coordinates use the algebra in {§text-scope-semantics}: one integer is a
735
734
  whole line, two integers are an inclusive whole-line range, and four integers
736
735
  are an exact start-inclusive/end-exclusive region. Mutation scopes additionally
737
736
  admit `0` as prepend and `-1` as append. A leading decimal on semantic FIND
738
737
  is a similarity threshold; any remaining integers select result positions. READ
739
- does not admit decimal scope components. OPEN/FOLD intersect a valid body-relative line
738
+ does not admit decimal scope components. A log KILL intersects a valid body-relative line
740
739
  scope with each selected body; an absent line is a successful no-op for that
741
740
  body, while unsupported arity is a runtime failure.
742
741
 
@@ -744,7 +743,7 @@ body, while unsupported arity is a runtime failure.
744
743
  spelled `@` followed by exactly five Base62 characters (`0-9A-Za-z`) wherever
745
744
  its `L`, `SL`, or `EL` position denotes a line. Columns, prepend `0`, and append
746
745
  `-1` remain numeric. Exact READ, EDIT, COPY/MOVE source and destination,
747
- OPEN/FOLD, and client LOOK preserve these positions in `TextLineMarker`; core resolves them
746
+ KILL, and client LOOK preserve these positions in `TextLineMarker`; core resolves them
748
747
  against the addressed current text before operation-specific numeric scope
749
748
  semantics run. A matcher-bearing or path-glob READ normalizes to FIND, whose
750
749
  result positions remain numeric and reject anchors. Numeric text scopes remain
@@ -759,7 +758,7 @@ shapes for runtime validation. An anchor-bearing text scope uses commas; ANTLR
759
758
  tolerates one space after each comma.
760
759
 
761
760
  Apart from the unadvertised three-coordinate text-scope tolerance in
762
- {§text-scope-semantics} and OPEN/FOLD's per-body empty intersection, the runtime rejects invalid arity, out-of-range or
761
+ {§text-scope-semantics} and a log KILL's per-body empty intersection, the runtime rejects invalid arity, out-of-range or
763
762
  inverted positions, and decimal text coordinates rather than rounding or
764
763
  reinterpreting them. FIND owns a deterministic result order so the same
765
764
  inclusive range selects the same positions from unchanged state. The parser
@@ -787,7 +786,7 @@ Delimiter rules:
787
786
 
788
787
  Example — a lane-0 turn stored inside a lane-2 EDIT body:
789
788
 
790
- ```plurnk
789
+ ```example
791
790
  # PLAN2
792
791
  [{"content":"Store the quoted turn.","status":"in_progress"}]
793
792
 
@@ -795,10 +794,10 @@ Example — a lane-0 turn stored inside a lane-2 EDIT body:
795
794
  # PLAN0
796
795
  [{"content":"Answer from memory.","status":"in_progress"}]
797
796
 
798
- ## SEND0 [200]
797
+ ## SEND0 (TERM)
799
798
  Paris.
800
799
 
801
- ## SEND2 [200]
800
+ ## SEND2 (TERM)
802
801
  Stored the quoted turn.
803
802
  ```
804
803
 
@@ -827,27 +826,26 @@ streams, pending retrievals); the grammar polices *shape* only. Asking
827
826
  the human is the native `question` EXEC tool ({§question-tool}), not a
828
827
  disposition. The shape rules ARE structural:
829
828
 
830
- - §send-mid-reservation The four disposition codes `{102, 200, 202, 499}` lex as a
831
- distinct `DISPOSITION` token, making a disposition-coded SEND
832
- **structurally terminal**: a statement after it is a parse error
833
- (the mid-termination rule), and the GBNF reserves the four from
834
- mid-position SENDs (`status-mid` is their complement over `DDD`).
829
+ - §send-mid-reservation The four labels lex as one `SEND_LABEL` token
830
+ ({§send-label}), making a label SEND **structurally terminal**: a
831
+ statement after it is a parse error (the mid-termination rule), and the
832
+ GBNF spells mid-position SEND recipients as URLs, which no label is.
835
833
  This keeps the grammar's last-SEND model and the dispatcher's
836
- first-disposition model coincident.
837
- - A **mid** SEND (before the terminal) is comms: statusless, or any
838
- non-disposition code, targeted or pathless, empty body allowed.
834
+ first-label model coincident.
835
+ - A **mid** SEND (before the terminal) is comms: a recipient path or
836
+ none, no label, empty body allowed.
839
837
  - §terminal-body-nonempty The GBNF rail requires a non-empty terminal SEND body — a constrained
840
838
  turn cannot end empty-handed. ANTLR remains tolerant during ingestion.
841
- - §park-202-only The **park** rides `[202]` only: `<T>` (wait up to T minutes),
839
+ - §park-202-only The **park** rides `(WAIT)` only: `<T>` (wait up to T minutes),
842
840
  `<T,P>` (adds a poll cadence, mirroring EXEC's slot), `<-1>`
843
841
  (indefinite; the join's own liveness bounds it). See §7 for the
844
842
  GBNF-strict / ANTLR-tolerant split.
845
- - §no-idle-102 A **zero-statement turn may not conclude `[102]`** — "continue"
843
+ - §no-idle-102 A **zero-statement turn may not conclude `(NEXT)`** — "continue"
846
844
  with nothing submitted is a spin. The GBNF's `tail-0` exits through
847
- a terminal trie without the `[102]` tail, so the idle turn (`PLAN`
848
- straight into `## SEND0 [102]`) is unemittable; one statement restores
849
- the full disposition set. The other four stay legal bare (a zero-op
850
- `[202]` is the engine's obligation check). ANTLR stays tolerant
845
+ a terminal trie without the `(NEXT)` tail, so the idle turn (`PLAN`
846
+ straight into `## SEND0 (NEXT)`) is unemittable; one statement restores
847
+ the full label set. The other three stay legal bare (a zero-op
848
+ `(WAIT)` is the engine's obligation check). ANTLR stays tolerant
851
849
  (ingest side). A dispatch-emptied turn — ops emitted but failing
852
850
  downstream validation — survives the rail by nature; the engine's
853
851
  idle-turn 409 backstops that class.
@@ -947,13 +945,13 @@ types cover ordered parse items and `PlurnkParseError`, which JSON Schema cannot
947
945
  express. Consumers never receive ANTLR parse-tree or token types.
948
946
 
949
947
  §turn-shape `PlurnkParser.parse` accepts exactly one model turn containing at
950
- least one parsed source operation. Canonical generation begins with H1 PLAN,
951
- ends with a disposition-coded H2 SEND, and never repeats PLAN mid-turn. When no
952
- valid leading PLAN was parsed, the parser prepends an empty PLAN; when no valid
953
- terminal SEND was parsed, it appends a bodyless `SEND [102]`. Either default
954
- carries {§parser-position} `UNKNOWN_POSITION` and one exact hard diagnostic
948
+ least one parsed source operation. Canonical generation may begin with H1 PLAN
949
+ (a SHOULD, never repeated mid-turn) and ends with a label H2 SEND. A turn without
950
+ a PLAN stands as written no PLAN is synthesized and nothing is diagnosed. When
951
+ no valid terminal SEND was parsed, the parser appends a bodyless `## SEND0 (NEXT)`
952
+ carrying {§parser-position} `UNKNOWN_POSITION` and one exact hard diagnostic
955
953
  stating the observed boundary failure and applied default. The source text
956
- remains unchanged.
954
+ remains unchanged. The GBNF rail takes the same optional PLAN.
957
955
  An authored terminal SEND still ends the source turn: a same-lane operation or
958
956
  other hard error after it is outside the trustworthy boundary. Tolerated TEXT
959
957
  may appear only before the first operation; after that point, nonstructural text
@@ -961,7 +959,7 @@ is section body content. `parseLog` remains strict canonical PLAN-through-SEND
961
959
  input, and GBNF remains strict canonical generation.
962
960
 
963
961
  §document-fence `PlurnkParser.parse` additionally admits one outer Markdown code
964
- fence whose opening line is exactly ```` ```plurnk ```` and whose closing line,
962
+ fence whose opening line is exactly ```` ```example ```` (or the earlier ```` ```plurnk ````) and whose closing line,
965
963
  when present, is ```` ``` ````. The fence encloses the complete
966
964
  model turn and projects neither text nor body content into the AST. Its opener
967
965
  commits the document to either that closer or EOF immediately after the turn.
@@ -972,7 +970,7 @@ no other parser tier admits it. GBNF continues to shape the paired form.
972
970
 
973
971
  | Entry point | Accepted document | Result statement type |
974
972
  |--------------------------------|----------------------------------------------------------------|-----------------------|
975
- | `PlurnkParser.parse` | One operation-bearing model turn, bare with optional TEXT or inside one outer `plurnk` fence; omitted PLAN/SEND recover to defaults | `PlurnkStatement` |
973
+ | `PlurnkParser.parse` | One operation-bearing model turn, bare with optional TEXT or inside one outer `example` (or `plurnk`) fence; omitted PLAN/SEND recover to defaults | `PlurnkStatement` |
976
974
  | `PlurnkParser.parseStatements` | Zero or more protocol statements and hidden whitespace | `PlurnkStatement` |
977
975
  | `PlurnkParser.parseLog` | One or more consecutive same-lane PLAN-anchored turns | `PlurnkStatement` |
978
976
  | `PlurnkParser.parseClient` | H2 protocol statements plus read-shaped LOOK/BUFF commands | `ClientStatement` |
@@ -1062,7 +1060,10 @@ and no greater than `total`.
1062
1060
  The transparent coordinates make completion and continuation derivable. The
1063
1061
  shape has no separate `complete`, `next`, or all-results instruction. Exact
1064
1062
  text-coordinate selections use {§text-region} instead. `Validator.assertRangeExtent`
1065
- enforces both the schema and the relational endpoint invariants.
1063
+ enforces both the schema and the relational endpoint invariants. `unit: "byte"`
1064
+ names a selection of a binary resource's bytes, positions being 1-based byte
1065
+ offsets; the byte view is one octet per line, so the same positional algebra
1066
+ applies ({§read-bytes} in the core specification).
1066
1067
 
1067
1068
  ### §entry-read-result 13.3 Client entry reads
1068
1069
 
@@ -1308,16 +1309,10 @@ parse state, lexer mode, and expected-token set that no consumer has. It
1308
1309
  produces the final diagnostic message, deduplicated expected-token lists, and
1309
1310
  turn-shape diagnostics. No valid leading PLAN yields ``No valid leading PLAN
1310
1311
  was parsed; an empty `# PLAN0` was used.``; no valid terminal SEND yields ``No
1311
- valid terminal SEND was parsed; `## SEND0 [102]` was used.``; source with no
1312
+ valid terminal SEND was parsed; `## SEND0 (NEXT)` was used.``; source with no
1312
1313
  parsed operation yields `no valid Plurnk operation was found.` Targeted
1313
1314
  diagnostics are:
1314
1315
 
1315
- - §signal-scope-redirect **EXEC scope in the signal slot.** When EXEC's
1316
- `[signal]` slot (executor-ident mode) hits a leading `-` or digit —
1317
- mark-shaped `<timeout, poll>` scope content mistyped into the brackets — the
1318
- lexer message becomes “timeout/poll ride the `<scope>` slot; try
1319
- `## EXEC0 <-1,300>`” instead of a raw `unrecognized character`. The redirect is
1320
- EXEC-scoped because its signal mode is exclusive; SEND/KILL are untouched.
1321
1316
  - §matcher-body-redirect **Matcher body in the slot region.** When the
1322
1317
  post-target modifier region begins with `$`, `~`, or `@` with no whitespace
1323
1318
  before it, the lexer redirects the unambiguous matcher to body content below the
@@ -1334,21 +1329,10 @@ diagnostics are:
1334
1329
  error: `a scope position accepts one line coordinate; use the \`@hash\` anchor
1335
1330
  without its displayed line number`. A malformed header scope is consumed as
1336
1331
  one token at either COPY/MOVE operand; neither produces a punctuation cascade.
1337
- - §misplaced-target-advisory **Mutation target in the signal slot.** When a
1338
- mutating op (EDIT/COPY/MOVE) parses with a null `(target)` and a path-shaped
1339
- `[signal]` element (a `/` or a dotted extension), the message redirects the
1340
- path into `(…)` (`\`## EDIT0\` has no \`(target)\` - that path sits in the
1341
- \`[…]\` tag slot; a target goes in \`(…)\`. Try \`## EDIT0 (path)\``). It is
1342
- gated on a path-shaped signal so a genuine additive-tag signal is not mis-steered
1343
- toward a path it lacks.
1344
- - §matcher-in-signal-slot **Matcher in the signal slot.** A tag term whose name
1345
- begins with a matcher prefix (`/`, `$`, `~`, `&`) is never a tag: `## FIND0
1346
- [/require/] (**.go)` used to apply a folksonomic tag named `/require/` and
1347
- return unsearched rows. The canonicalizer refuses the term, so the builder
1348
- raises one heading-positioned error naming the body rule (`` `[/require/]` is not
1349
- a tag - a matcher belongs in the body beneath the heading; `[+tag]` adds,
1350
- `[tag]` filters ``); the statement drops and its siblings run. Matcher
1351
- characters inside a name (`slash/inside`) stay legal.
1332
+ - §label-recipient-redirect **A label beside a recipient.** `## SEND0 (TERM)
1333
+ (worker://parent)` and `## SEND0 (worker://parent) (TERM)` are one parser error at
1334
+ the heading: `a (NEXT|WAIT|TERM|FAIL) SEND names no recipient; message a recipient
1335
+ with its own SEND first` ({§send-label}).
1352
1336
  - §misplaced-annotation-advisory **Annotation in the body.** A READ or FIND whose
1353
1337
  body is solely an HTML comment (`<!-- … -->`) can never carry a matcher: it is
1354
1338
  the annotation the model put on the line below the heading. The builder takes
@@ -8,14 +8,14 @@ section-body-b3 ::= ("#" section-body-b1 | [ PANFIDRETCOYMVSXBWK] section-body-b
8
8
  section-body-b4 ::= ("#" section-body-b1 | [ PLNFIDRETCOYMVSXBWK] section-body-b0 | "A" section-body-b5 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
9
9
  section-body-b5 ::= ("#" section-body-b1 | [ PLAFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
10
10
  section-body-b6 ::= ("#" section-body-b6 | " " section-body-b7 | [PLANFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
11
- section-body-b7 ::= ("#" section-body-b1 | [ LANIDTYVX] section-body-b0 | "P" section-body-b3 | "F" section-body-b8 | "R" section-body-b11 | "E" section-body-b14 | "C" section-body-b17 | "O" section-body-b23 | "M" section-body-b20 | "S" section-body-b28 | "B" section-body-b33 | "W" section-body-b36 | "K" section-body-b40 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
12
- section-body-b8 ::= ("#" section-body-b1 | [ PLANFDRETCYMVSXBWK] section-body-b0 | "I" section-body-b9 | "O" section-body-b26 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
11
+ section-body-b7 ::= ("#" section-body-b1 | [ LANIDTOYVX] section-body-b0 | "P" section-body-b3 | "F" section-body-b8 | "R" section-body-b11 | "E" section-body-b14 | "C" section-body-b17 | "M" section-body-b20 | "S" section-body-b23 | "B" section-body-b28 | "W" section-body-b31 | "K" section-body-b36 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
12
+ section-body-b8 ::= ("#" section-body-b1 | [ PLANFDRETCYMVSXBWK] section-body-b0 | "I" section-body-b9 | "O" section-body-b34 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
13
13
  section-body-b9 ::= ("#" section-body-b1 | [ PLAFIDRETCOYMVSXBWK] section-body-b0 | "N" section-body-b10 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
14
14
  section-body-b10 ::= ("#" section-body-b1 | [ PLANFIRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
15
15
  section-body-b11 ::= ("#" section-body-b1 | [ PLANFIDRTCOYMVSXBWK] section-body-b0 | "E" section-body-b12 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
16
16
  section-body-b12 ::= ("#" section-body-b1 | [ PLNFIDRETCOYMVSXBWK] section-body-b0 | "A" section-body-b13 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
17
17
  section-body-b13 ::= ("#" section-body-b1 | [ PLANFIRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
18
- section-body-b14 ::= ("#" section-body-b1 | [ PLANFIRETCOYMVSBWK] section-body-b0 | "D" section-body-b15 | "X" section-body-b31 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
18
+ section-body-b14 ::= ("#" section-body-b1 | [ PLANFIRETCOYMVSBWK] section-body-b0 | "D" section-body-b15 | "X" section-body-b26 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
19
19
  section-body-b15 ::= ("#" section-body-b1 | [ PLANFDRETCOYMVSXBWK] section-body-b0 | "I" section-body-b16 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
20
20
  section-body-b16 ::= ("#" section-body-b1 | [ PLANFIDRECOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
21
21
  section-body-b17 ::= ("#" section-body-b1 | [ PLANFIDRETCYMVSXBWK] section-body-b0 | "O" section-body-b18 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
@@ -24,54 +24,47 @@ section-body-b19 ::= ("#" section-body-b1 | [ PLANFIDRETCOMVSXBWK] section-body-
24
24
  section-body-b20 ::= ("#" section-body-b1 | [ PLANFIDRETCYMVSXBWK] section-body-b0 | "O" section-body-b21 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
25
25
  section-body-b21 ::= ("#" section-body-b1 | [ PLANFIDRETCOYMSXBWK] section-body-b0 | "V" section-body-b22 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
26
26
  section-body-b22 ::= ("#" section-body-b1 | [ PLANFIDRTCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
27
- section-body-b23 ::= ("#" section-body-b1 | [ LANFIDRETCOYMVSXBWK] section-body-b0 | "P" section-body-b24 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
28
- section-body-b24 ::= ("#" section-body-b1 | [ PLANFIDRTCOYMVSXBWK] section-body-b0 | "E" section-body-b25 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
29
- section-body-b25 ::= ("#" section-body-b1 | [ PLAFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
30
- section-body-b26 ::= ("#" section-body-b1 | [ PANFIDETCOYMVSXBWK] section-body-b0 | "L" section-body-b27 | "R" section-body-b39 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
31
- section-body-b27 ::= ("#" section-body-b1 | [ PLANFIRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
32
- section-body-b28 ::= ("#" section-body-b1 | [ PLANFIDRTCOYMVSXBWK] section-body-b0 | "E" section-body-b29 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
33
- section-body-b29 ::= ("#" section-body-b1 | [ PLAFIDRETCOYMVSXBWK] section-body-b0 | "N" section-body-b30 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
34
- section-body-b30 ::= ("#" section-body-b1 | [ PLANFIRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
35
- section-body-b31 ::= ("#" section-body-b1 | [ PLANFIDRTCOYMVSXBWK] section-body-b0 | "E" section-body-b32 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
36
- section-body-b32 ::= ("#" section-body-b1 | [ PLANFIDRETOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
37
- section-body-b33 ::= ("#" section-body-b1 | [ PLNFIDRETCOYMVSXBWK] section-body-b0 | "A" section-body-b34 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
27
+ section-body-b23 ::= ("#" section-body-b1 | [ PLANFIDRTCOYMVSXBWK] section-body-b0 | "E" section-body-b24 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
28
+ section-body-b24 ::= ("#" section-body-b1 | [ PLAFIDRETCOYMVSXBWK] section-body-b0 | "N" section-body-b25 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
29
+ section-body-b25 ::= ("#" section-body-b1 | [ PLANFIRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
30
+ section-body-b26 ::= ("#" section-body-b1 | [ PLANFIDRTCOYMVSXBWK] section-body-b0 | "E" section-body-b27 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
31
+ section-body-b27 ::= ("#" section-body-b1 | [ PLANFIDRETOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
32
+ section-body-b28 ::= ("#" section-body-b1 | [ PLNFIDRETCOYMVSXBWK] section-body-b0 | "A" section-body-b29 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
33
+ section-body-b29 ::= ("#" section-body-b1 | [ PLANFIDETCOYMVSXBWK] section-body-b0 | "R" section-body-b30 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
34
+ section-body-b30 ::= ("#" section-body-b1 | [ PLANFIDRTCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
35
+ section-body-b31 ::= ("#" section-body-b1 | [ PLANFIDRETCYMVSXBWK] section-body-b0 | "O" section-body-b32 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
36
+ section-body-b32 ::= ("#" section-body-b1 | [ PLANFIDETCOYMVSXBWK] section-body-b0 | "R" section-body-b33 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
37
+ section-body-b33 ::= ("#" section-body-b1 | [ PLANFIDRETCOYMVSXBW] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
38
38
  section-body-b34 ::= ("#" section-body-b1 | [ PLANFIDETCOYMVSXBWK] section-body-b0 | "R" section-body-b35 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
39
- section-body-b35 ::= ("#" section-body-b1 | [ PLANFIDRTCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
40
- section-body-b36 ::= ("#" section-body-b1 | [ PLANFIDRETCYMVSXBWK] section-body-b0 | "O" section-body-b37 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
41
- section-body-b37 ::= ("#" section-body-b1 | [ PLANFIDETCOYMVSXBWK] section-body-b0 | "R" section-body-b38 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
42
- section-body-b38 ::= ("#" section-body-b1 | [ PLANFIDRETCOYMVSXBW] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
43
- section-body-b39 ::= ("#" section-body-b1 | [ PLANFIDRETCOYMVSXBW] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
44
- section-body-b40 ::= ("#" section-body-b1 | [ PLANFDRETCOYMVSXBWK] section-body-b0 | "I" section-body-b41 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
45
- section-body-b41 ::= ("#" section-body-b1 | [ PANFIDRETCOYMVSXBWK] section-body-b0 | "L" section-body-b42 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
46
- section-body-b42 ::= ("#" section-body-b1 | [ PANFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
39
+ section-body-b35 ::= ("#" section-body-b1 | [ PLANFIDRETCOYMVSXBW] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
40
+ section-body-b36 ::= ("#" section-body-b1 | [ PLANFDRETCOYMVSXBWK] section-body-b0 | "I" section-body-b37 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
41
+ section-body-b37 ::= ("#" section-body-b1 | [ PANFIDRETCOYMVSXBWK] section-body-b0 | "L" section-body-b38 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
42
+ section-body-b38 ::= ("#" section-body-b1 | [ PANFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
47
43
  section-body-ne ::= "#" section-body-b1 | [ PLANFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0
48
44
  annotation-body-b0 ::= ("-" annotation-body-b1 | ">" annotation-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r>-] annotation-body-b0)?
49
45
  annotation-body-b1 ::= ("-" annotation-body-b2 | ">" annotation-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r>-] annotation-body-b0)?
50
46
  annotation-body-b2 ::= ("-" annotation-body-b2 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r>-] annotation-body-b0)?
51
47
  annotation-body-ne ::= "-" annotation-body-b1 | ">" annotation-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r>-] annotation-body-b0
52
48
  pattern-body-ne ::= [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r:#] [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r]*
53
- log-selection ::= (curation-tags-slot log-target-slot? | log-target-slot)?
54
49
  plan ::= "# PLAN0" annotation-slot? "\n" section-body-ne "\n"
55
- find ::= "## FIND0" add-tags-slot? target-slot line-slot? annotation-slot? "\n" | "## FIND0" add-tags-slot? target-slot line-slot? annotation-slot? "\n" pattern-body-ne "\n"
56
- read ::= "## READ0" add-tags-slot? target-slot text-line-slot? annotation-slot? "\n" | "## READ0" add-tags-slot? target-slot text-line-slot? annotation-slot? "\n" pattern-body-ne "\n"
57
- edit ::= "## EDIT0" add-tags-slot? target-slot text-line-slot? annotation-slot? "\n" | "## EDIT0" add-tags-slot? target-slot text-line-slot? annotation-slot? "\n" section-body-ne "\n"
58
- copy ::= "## COPY0" add-tags-slot? target-slot text-line-slot? target-slot text-line-slot? annotation-slot? "\n"
59
- move ::= "## MOVE0" add-tags-slot? target-slot text-line-slot? target-slot text-line-slot? annotation-slot? "\n"
60
- open ::= "## OPEN0" log-selection text-line-slot? annotation-slot? "\n" | "## OPEN0" log-selection text-line-slot? annotation-slot? "\n" pattern-body-ne "\n"
61
- fold ::= "## FOLD0" log-selection text-line-slot? annotation-slot? "\n" | "## FOLD0" log-selection text-line-slot? annotation-slot? "\n" pattern-body-ne "\n"
62
- exec ::= "## EXEC0" exec-slot? target-slot? line-slot? annotation-slot? "\n" | "## EXEC0" exec-slot? target-slot? line-slot? annotation-slot? "\n" section-body-ne "\n"
63
- bare ::= "## BARE0" add-tags-slot? annotation-slot? "\n" section-body-ne "\n"
64
- work ::= "## WORK0" branch-slot? target-slot annotation-slot? "\n" section-body-ne "\n"
65
- fork ::= "## FORK0" branch-slot? target-slot annotation-slot? "\n" section-body-ne "\n"
66
- kill ::= "## KILL0" kill-slot? target-slot annotation-slot? "\n"
67
- send-mid ::= "## SEND0" status-mid-slot target-slot? annotation-slot? "\n" | "## SEND0" status-mid-slot target-slot? annotation-slot? "\n" section-body-ne "\n" | "## SEND0" target-slot? annotation-slot? "\n" | "## SEND0" target-slot? annotation-slot? "\n" section-body-ne "\n"
68
- send-102 ::= "## SEND0 [102]" target-slot? annotation-slot? "\n" section-body-ne
69
- send-200 ::= "## SEND0 [200]" target-slot? annotation-slot? "\n" section-body-ne
70
- send-202 ::= "## SEND0 [202]" target-slot? park-slot? annotation-slot? "\n" section-body-ne
71
- send-499 ::= "## SEND0 [499]" target-slot? annotation-slot? "\n" section-body-ne
50
+ find ::= "## FIND0" target-slot line-slot? annotation-slot? "\n" | "## FIND0" target-slot line-slot? annotation-slot? "\n" pattern-body-ne "\n"
51
+ read ::= "## READ0" target-slot text-line-slot? annotation-slot? "\n" | "## READ0" target-slot text-line-slot? annotation-slot? "\n" pattern-body-ne "\n"
52
+ edit ::= "## EDIT0" target-slot text-line-slot? annotation-slot? "\n" | "## EDIT0" target-slot text-line-slot? annotation-slot? "\n" section-body-ne "\n"
53
+ copy ::= "## COPY0" target-slot text-line-slot? target-slot text-line-slot? annotation-slot? "\n"
54
+ move ::= "## MOVE0" target-slot text-line-slot? target-slot text-line-slot? annotation-slot? "\n"
55
+ exec ::= "## EXEC0" executor-slot? exec-program? line-slot? annotation-slot? "\n" | "## EXEC0" executor-slot? exec-program? line-slot? annotation-slot? "\n" section-body-ne "\n"
56
+ bare ::= "## BARE0" annotation-slot? "\n" section-body-ne "\n"
57
+ work ::= "## WORK0" target-slot annotation-slot? "\n" section-body-ne "\n"
58
+ fork ::= "## FORK0" target-slot annotation-slot? "\n" section-body-ne "\n"
59
+ kill ::= "## KILL0" target-slot text-line-slot? annotation-slot? "\n" | "## KILL0" target-slot text-line-slot? annotation-slot? "\n" pattern-body-ne "\n"
60
+ send-mid ::= "## SEND0" recipient-slot annotation-slot? "\n" | "## SEND0" recipient-slot annotation-slot? "\n" section-body-ne "\n" | "## SEND0" annotation-slot? "\n" | "## SEND0" annotation-slot? "\n" section-body-ne "\n"
61
+ send-102 ::= "## SEND0 (NEXT)" annotation-slot? "\n" section-body-ne
62
+ send-200 ::= "## SEND0 (TERM)" annotation-slot? "\n" section-body-ne
63
+ send-202 ::= "## SEND0 (WAIT)" park-slot? annotation-slot? "\n" section-body-ne
64
+ send-499 ::= "## SEND0 (FAIL)" annotation-slot? "\n" section-body-ne
72
65
  send-final-any ::= send-102 | send-200 | send-202 | send-499
73
66
  send-final-first ::= send-200 | send-202 | send-499
74
- op-statement ::= find | read | edit | copy | move | open | fold | exec | bare | work | fork | kill
67
+ op-statement ::= find | read | edit | copy | move | exec | bare | work | fork | kill
75
68
  tail-0 ::= send-mid tail-1 | op-statement tail-1 | send-final-first
76
69
  tail-1 ::= send-mid tail-2 | op-statement tail-2 | send-final-any
77
70
  tail-2 ::= send-mid tail-3 | op-statement tail-3 | send-final-any
@@ -116,37 +109,20 @@ rz-chan-b24 ::= ("<" rz-chan-b1 | "|" rz-chan-b25 | [chanel>toug\n] rz-chan-b0 |
116
109
  rz-chan-b25 ::= ("<" rz-chan-b1 | [|chaneltoug\n] rz-chan-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
117
110
  rz-chan-first ::= [0-9A-Za-z]
118
111
  channel ::= "<|channel>thought\n" rz-chan-first rz-chan-b0 "<channel|>"
119
- turn ::= plan tail-0
120
- framed-turn ::= turn | "```plurnk\n" turn "\n```"
112
+ turn ::= plan tail-0 | tail-0
113
+ framed-turn ::= turn | "```example\n" turn "\n```" | "```plurnk\n" turn "\n```"
121
114
  root-gemma ::= channel sep framed-turn
122
- add-tags-slot ::= " " add-tags
123
- curation-tags-slot ::= " " curation-tags
124
- log-target-slot ::= " (log:" target-atom+ ")"
125
115
  target-slot ::= " " target metadata-slot*
116
+ recipient-slot ::= " (" scheme "://" target-inner ")" metadata-slot*
117
+ scheme ::= [a-z] [a-z0-9+.-]*
118
+ executor-name ::= [0-9A-Za-z_.+-] [0-9A-Za-z_.+-]*
119
+ executor-slot ::= " [" executor-name "]"
120
+ exec-program ::= target-slot | metadata-slot metadata-slot*
126
121
  metadata-slot ::= " {" [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r{}]* "}"
127
122
  line-slot ::= " " line
128
123
  text-line-slot ::= " " text-line
129
- exec-slot ::= " " exec-sig
130
- branch-slot ::= " " branch
131
- kill-slot ::= " " kill-sig
132
- status-mid-slot ::= " [" status-mid "]"
133
124
  park-slot ::= " " park
134
125
  annotation-slot ::= " <!-- " annotation-body-ne " -->"
135
- status-mid ::= [05-9] [0-9] [0-9] | "1" status-mid-1 | "2" status-mid-2 | "3" status-mid-3 | "4" status-mid-4
136
- status-mid-1 ::= "0" [0-13-9] | [1-9] [0-9]
137
- status-mid-2 ::= "0" [13-9] | [1-9] [0-9]
138
- status-mid-3 ::= "0" [0-9] | [1-9] [0-9]
139
- status-mid-4 ::= "9" [0-8] | [0-8] [0-9]
140
- add-tags ::= "[" add-tag add-tag-rest* "]"
141
- curation-tags ::= "[" curation-term curation-term-rest* "]"
142
- branch ::= "[" [A-Za-z0-9_./-]+ "]"
143
- tag ::= [A-Za-z0-9_.] [A-Za-z0-9_.+-]*
144
- add-tag ::= "+" tag
145
- remove-tag ::= "-" tag
146
- signed-tag ::= add-tag | remove-tag
147
- curation-term ::= tag | signed-tag
148
- add-tag-rest ::= "," add-tag
149
- curation-term-rest ::= "," curation-term
150
126
  target ::= "(" target-inner ")"
151
127
  target-inner ::= target-atom+
152
128
  target-atom ::= [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\\()<\r\n] | target-escape
@@ -162,5 +138,3 @@ frac ::= "." [0-9]+
162
138
  park ::= "<" park-t park-poll? ">"
163
139
  park-t ::= "-1" | [0-9]+
164
140
  park-poll ::= "," [0-9]+
165
- exec-sig ::= "[" [a-z] [a-z0-9_-]* "]"
166
- kill-sig ::= "[" [0-9] [0-9]? "]"