@plurnk/plurnk-contracts 1.16.5 → 1.17.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 (88) hide show
  1. package/README.md +13 -29
  2. package/SPEC.md +600 -519
  3. package/dist/conformance/agui-v1.json +3 -3
  4. package/dist/schema/CapabilityProjection.json +2 -4
  5. package/dist/schema/ClientStatement.json +5 -52
  6. package/dist/schema/FunctionalityDefinitionState.json +2 -2
  7. package/dist/schema/LineMarker.json +1 -1
  8. package/dist/schema/LoopPolicy.json +2 -3
  9. package/dist/schema/MatcherBody.json +6 -6
  10. package/dist/schema/McpServerDefinition.json +17 -0
  11. package/dist/schema/ModelCatalogPage.json +10 -1
  12. package/dist/schema/ModelRoute.json +9 -0
  13. package/dist/schema/Notice.json +1 -1
  14. package/dist/schema/ParsedPath.json +3 -2
  15. package/dist/schema/Plan.json +9 -5
  16. package/dist/schema/PlurnkStatement.json +86 -134
  17. package/dist/schema/ProposalProjection.json +2 -1
  18. package/dist/schema/ResourceSelection.json +51 -27
  19. package/dist/schema/SkillDefinition.json +3 -3
  20. package/dist/src/AcpPlanValue.d.ts +0 -1
  21. package/dist/src/AcpPlanValue.d.ts.map +1 -1
  22. package/dist/src/AcpPlanValue.js +14 -13
  23. package/dist/src/AcpPlanValue.js.map +1 -1
  24. package/dist/src/ApplicationPort.d.ts +16 -14
  25. package/dist/src/ApplicationPort.d.ts.map +1 -1
  26. package/dist/src/AstBuilder.d.ts +3 -2
  27. package/dist/src/AstBuilder.d.ts.map +1 -1
  28. package/dist/src/AstBuilder.js +340 -187
  29. package/dist/src/AstBuilder.js.map +1 -1
  30. package/dist/src/JsonDocument.d.ts +2 -0
  31. package/dist/src/JsonDocument.d.ts.map +1 -0
  32. package/dist/src/JsonDocument.js +14 -0
  33. package/dist/src/JsonDocument.js.map +1 -0
  34. package/dist/src/LoopLifecycle.d.ts +3 -0
  35. package/dist/src/LoopLifecycle.d.ts.map +1 -0
  36. package/dist/src/LoopLifecycle.js +14 -0
  37. package/dist/src/LoopLifecycle.js.map +1 -0
  38. package/dist/src/PlanValue.d.ts +1 -1
  39. package/dist/src/PlanValue.d.ts.map +1 -1
  40. package/dist/src/PlanValue.js +10 -6
  41. package/dist/src/PlanValue.js.map +1 -1
  42. package/dist/src/PlurnkErrorStrategy.d.ts.map +1 -1
  43. package/dist/src/PlurnkErrorStrategy.js +37 -142
  44. package/dist/src/PlurnkErrorStrategy.js.map +1 -1
  45. package/dist/src/PlurnkParseError.d.ts +3 -1
  46. package/dist/src/PlurnkParseError.d.ts.map +1 -1
  47. package/dist/src/PlurnkParseError.js +4 -1
  48. package/dist/src/PlurnkParseError.js.map +1 -1
  49. package/dist/src/PlurnkParser.d.ts +9 -5
  50. package/dist/src/PlurnkParser.d.ts.map +1 -1
  51. package/dist/src/PlurnkParser.js +175 -180
  52. package/dist/src/PlurnkParser.js.map +1 -1
  53. package/dist/src/RecordingListener.d.ts +1 -1
  54. package/dist/src/RecordingListener.d.ts.map +1 -1
  55. package/dist/src/RecordingListener.js +24 -6
  56. package/dist/src/RecordingListener.js.map +1 -1
  57. package/dist/src/TurnDisposition.d.ts +11 -0
  58. package/dist/src/TurnDisposition.d.ts.map +1 -0
  59. package/dist/src/TurnDisposition.js +32 -0
  60. package/dist/src/TurnDisposition.js.map +1 -0
  61. package/dist/src/Validator.js +1 -1
  62. package/dist/src/Validator.js.map +1 -1
  63. package/dist/src/generated/plurnkLexer.d.ts +93 -105
  64. package/dist/src/generated/plurnkLexer.d.ts.map +1 -1
  65. package/dist/src/generated/plurnkLexer.js +673 -828
  66. package/dist/src/generated/plurnkLexer.js.map +1 -1
  67. package/dist/src/generated/plurnkParser.d.ts +111 -152
  68. package/dist/src/generated/plurnkParser.d.ts.map +1 -1
  69. package/dist/src/generated/plurnkParser.js +756 -1082
  70. package/dist/src/generated/plurnkParser.js.map +1 -1
  71. package/dist/src/generated/plurnkParserVisitor.d.ts +15 -36
  72. package/dist/src/generated/plurnkParserVisitor.d.ts.map +1 -1
  73. package/dist/src/generated/plurnkParserVisitor.js +12 -30
  74. package/dist/src/generated/plurnkParserVisitor.js.map +1 -1
  75. package/dist/src/index.d.ts +5 -1
  76. package/dist/src/index.d.ts.map +1 -1
  77. package/dist/src/index.js +4 -1
  78. package/dist/src/index.js.map +1 -1
  79. package/dist/src/types.d.ts +3 -7
  80. package/dist/src/types.d.ts.map +1 -1
  81. package/dist/src/types.generated.d.ts +147 -80
  82. package/dist/src/types.generated.d.ts.map +1 -1
  83. package/dist/src/types.js +3 -3
  84. package/dist/src/types.js.map +1 -1
  85. package/package.json +4 -8
  86. package/plurnk.md +103 -119
  87. package/dist/plurnk.gemma.gbnf +0 -141
  88. package/dist/plurnk.qwen.gbnf +0 -130
package/dist/src/types.js CHANGED
@@ -6,7 +6,8 @@ import reasoningPolicySchema from "../schema/ReasoningPolicy.json" with { type:
6
6
  // expressed in JSON Schema. Hand-maintained.
7
7
  // Runtime protocol alphabet; PlurnkOp is structurally derived from this tuple. {§op-shapes}
8
8
  export const PLURNK_OPS = [
9
- "FIND", "READ", "EDIT", "COPY", "MOVE", "SEND", "EXEC", "BARE", "WORK", "FORK", "KILL", "PLAN",
9
+ "FIND", "READ", "EDIT", "COPY", "MOVE", "SEND", "EXEC", "BARE", "WORK", "FORK", "KILL",
10
+ "TASK",
10
11
  ];
11
12
  // Markerless model-facing retrievals share one fixed first page. Producers use
12
13
  // an explicit <1,-1> when they deliberately require the complete projection.
@@ -16,13 +17,12 @@ export const DEFAULT_RETRIEVAL_LIMIT = 16;
16
17
  export const REASONING_POLICIES = Object.freeze(reasoningPolicySchema.enum);
17
18
  export const DEFAULT_CAPABILITY_POLICY = Object.freeze({});
18
19
  export const DEFAULT_LOOP_POLICY = Object.freeze({
19
- capabilities: DEFAULT_CAPABILITY_POLICY,
20
20
  proposals: "review",
21
21
  });
22
22
  // Minting predicate only; URL ingestion deliberately remains permissive. {§worker-name}
23
23
  export const WORKER_NAME = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/;
24
24
  // Authority-shaped internal worker names excluded from minting. {§worker-name}
25
- export const RESERVED_AUTHORITIES = Object.freeze(["commons", "plurnk"]);
25
+ export const RESERVED_AUTHORITIES = Object.freeze(["plurnk"]);
26
26
  // Structurally synthesized statements have no parsed source point. {§parser-position}
27
27
  export const UNKNOWN_POSITION = Object.freeze({ line: 0, column: 0 });
28
28
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,oFAAoF;AACpF,cAAc,sBAAsB,CAAC;AAErC,OAAO,qBAAqB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAWzF,0EAA0E;AAC1E,6CAA6C;AAE7C,4FAA4F;AAC5F,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CACxF,CAAC;AAEX,+EAA+E;AAC/E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAoB1C,2EAA2E;AAC3E,uEAAuE;AACvE,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAC3C,qBAAqB,CAAC,IAAyB,CACpB,CAAC;AAEhC,MAAM,CAAC,MAAM,yBAAyB,GAAqB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAE7E,MAAM,CAAC,MAAM,mBAAmB,GAAe,MAAM,CAAC,MAAM,CAAC;IACzD,YAAY,EAAE,yBAAyB;IACvC,SAAS,EAAE,QAAQ;CACtB,CAAC,CAAC;AAEH,wFAAwF;AACxF,MAAM,CAAC,MAAM,WAAW,GAAG,sCAAsC,CAAC;AAElE,+EAA+E;AAC/E,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAU,CAAC,CAAC;AAElF,sFAAsF;AACtF,MAAM,CAAC,MAAM,gBAAgB,GAAuB,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,oFAAoF;AACpF,cAAc,sBAAsB,CAAC;AAErC,OAAO,qBAAqB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAWzF,0EAA0E;AAC1E,6CAA6C;AAE7C,4FAA4F;AAC5F,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IACtF,MAAM;CACA,CAAC;AAEX,+EAA+E;AAC/E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAoB1C,2EAA2E;AAC3E,uEAAuE;AACvE,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAC3C,qBAAqB,CAAC,IAAyB,CACpB,CAAC;AAEhC,MAAM,CAAC,MAAM,yBAAyB,GAAqB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAE7E,MAAM,CAAC,MAAM,mBAAmB,GAAe,MAAM,CAAC,MAAM,CAAC;IACzD,SAAS,EAAE,QAAQ;CACtB,CAAC,CAAC;AAEH,wFAAwF;AACxF,MAAM,CAAC,MAAM,WAAW,GAAG,sCAAsC,CAAC;AAElE,+EAA+E;AAC/E,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAU,CAAC,CAAC;AAEvE,sFAAsF;AACtF,MAAM,CAAC,MAAM,gBAAgB,GAAuB,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-contracts",
3
- "version": "1.16.5",
4
- "description": "Canonical PLURNK language, schemas, generated types, parser, rails, and runtime-neutral wire contracts",
3
+ "version": "1.17.0",
4
+ "description": "Canonical PLURNK language, schemas, generated types, parser, and runtime-neutral wire contracts",
5
5
  "keywords": [
6
6
  "plurnk",
7
7
  "antlr",
8
- "gbnf",
9
8
  "rfc-9457",
10
9
  "protocol"
11
10
  ],
@@ -34,8 +33,6 @@
34
33
  "default": "./dist/src/index.js"
35
34
  },
36
35
  "./package.json": "./package.json",
37
- "./plurnk.gemma.gbnf": "./dist/plurnk.gemma.gbnf",
38
- "./plurnk.qwen.gbnf": "./dist/plurnk.qwen.gbnf",
39
36
  "./schema/*.json": {
40
37
  "plurnk-dev": "./schema/*.json",
41
38
  "default": "./dist/schema/*.json"
@@ -60,16 +57,14 @@
60
57
  "build:types": "node --conditions=plurnk-dev scriptify/generate-types.ts",
61
58
  "build:clean": "rm -rf dist",
62
59
  "build:dist": "tsc -p tsconfig.build.json",
63
- "build:gbnf": "node --conditions=plurnk-dev scriptify/generate-gbnf.ts",
64
60
  "build:schemas": "node --conditions=plurnk-dev scriptify/copy-schemas.ts",
65
- "build": "npm run build:clean && npm run build:grammar && npm run build:types && npm run build:dist && npm run build:gbnf && npm run build:schemas",
61
+ "build": "npm run build:clean && npm run build:grammar && npm run build:types && npm run build:dist && npm run build:schemas",
66
62
  "antlr:tokens": "testrig src/generated/plurnk document --tokens",
67
63
  "antlr:trace": "testrig src/generated/plurnk document --trace",
68
64
  "antlr:parse": "testrig src/generated/plurnk document --tree",
69
65
  "test:lint": "tsc --noEmit",
70
66
  "test:unit": "node --conditions=plurnk-dev --test src/*.test.ts test/unit/*.test.ts",
71
67
  "test:intg": "node --conditions=plurnk-dev --test test/integration/*.test.ts test/demo/*.test.ts",
72
- "test:llama": "node --conditions=plurnk-dev --test test/llama/*.test.ts",
73
68
  "test:installation": "node --conditions=plurnk-dev scriptify/smoke-test.ts",
74
69
  "conformance:report": "node --conditions=plurnk-dev scriptify/agui-conformance-report.ts",
75
70
  "test": "npm run test:lint && npm run test:unit && npm run test:intg",
@@ -81,6 +76,7 @@
81
76
  "@cfworker/json-schema": "^4.1.1",
82
77
  "antlr4ng": "^3.0.0",
83
78
  "json-p3": "2.2.2",
79
+ "jsonc-parser": "^3.3.1",
84
80
  "xpath": "^0.0.34"
85
81
  },
86
82
  "devDependencies": {
package/plurnk.md CHANGED
@@ -1,163 +1,147 @@
1
- # Plurnk Service
1
+ # Plurnk Harness
2
2
 
3
- YOU MUST ONLY use the Plurnk OPs (PLAN|FIND|READ|EDIT|COPY|MOVE|EXEC|WORK|FORK|KILL|SEND).
4
- YOU MUST proceed until every Active User Prompt requirement and every pending or in_progress item is completed.
3
+ ## Harness Operation Syntax
5
4
 
6
- ## Syntax
5
+ ````OP (path)? <scope|range>? [metadata]? pattern? <!-- aside -->?
6
+ body?
7
+ ````
7
8
 
8
- ```example
9
- ## PLANdelimiter <!-- terse annotation on same line as OP -->?
10
- [{"content": string, "status": "pending" | "in_progress" | "completed" | "memory"},
11
- …]
12
- ### OPdelimiter (path)? <scope>? <!-- terse annotation on same line as OP -->?
13
- body?
14
- ### SENDdelimiter (NEXT|WAIT|TERM|FAIL)
15
- message
16
- ```
9
+ > [!IMPORTANT]
10
+ > YOU MUST ONLY perform OPs (helper operations, registered executors, or enabled MCP services).
17
11
 
18
- YOU MUST use the same delimiter, such as `0`, for every OP in a turn.
19
- YOU MUST begin every non-PLAN OP with `### `, as in `### FIND0`.
20
- YOU MUST only place an OP's `(path)`, `<scope>`, and `<!-- annotation -->` on the OP heading line.
21
- YOU MUST begin an OP's `body` immediately beneath its heading line.
12
+ > [!IMPORTANT]
13
+ > YOU MUST include the OP and its parameters on the opening fence line.
22
14
 
23
- ## OPs
15
+ * `[metadata]`: optional one-line JSON array of option objects.
16
+ * `<!-- aside -->`: optional terse note beside (never below) the operation line.
24
17
 
25
- * Plurnk grammar is overloaded and polymorphic, with `(path)`, `<scope>`, and `body` components depending on the OP.
26
- * An unscoped EDIT only creates a new file or entry.
18
+ ## Helper Operations
27
19
 
28
- ```example
29
- ## PLAN0 <!-- determinations, decisions, and docket items -->
30
- [{"content": string, "status": "pending" | "in_progress" | "completed" | "memory"}]
20
+ * FIND: list matching paths, or the match locations inside one path
21
+ * READ: read files, entries, streams, or only the lines a pattern selects
22
+ * EDIT: create a file or entry; replace existing text by scope or by pattern
23
+ * COPY (from) (to): copy files, entries, streams, or text regions
24
+ * MOVE (from) (to): move files, entries, streams, or text regions
25
+ * SEND: message workers or endpoints; without a path, respond to Active Prompts
26
+ * WORK: deploy a child worker (fresh log)
27
+ * FORK: deploy a forked worker (forked log)
28
+ * BARE: deploy an isolated inference query (no log or tools)
29
+ * KILL: delete, terminate, or curate the log
30
+ * TASK: task inventory
31
31
 
32
- ### FIND0 (target or glob) <result range> <!-- list matching targets -->
33
- filter pattern
32
+ ## Workflow Management
34
33
 
35
- ### READ0 (target) <text region> <!-- retrieve target content -->
34
+ ````TASK <!-- status of tasks necessary to resolve Active Prompts -->
35
+ [{"content": string, "status": "pending" | "waiting" | "in_progress" | "completed" | "failed"}]
36
+ ````
36
37
 
37
- ### EDIT0 (target) <text region> <!-- edit/replace/delete text -->
38
- literal replacement text
38
+ * `pending`: blocked until a task it depends on is `completed`.
39
+ * `waiting`: parked until a stream or worker finishes (doesn't block other in_progress work).
40
+ * `in_progress`: active work.
41
+ * `completed`, `failed`: resolved, successfully or not.
39
42
 
40
- ### COPY0 (source) <source text region> (destination) <destination text region> <!-- copy between targets -->
43
+ > [!IMPORTANT]
44
+ > YOU SHOULD conclude every turn with one TASK operation.
41
45
 
42
- ### MOVE0 (source) <source text region> (destination) <destination text region> <!-- move between targets -->
46
+ > [!IMPORTANT]
47
+ > A turn holding only the final response SEND and a TASK with every task `completed` or `failed` finishes the loop.
43
48
 
44
- ### EXEC0 <!-- run a command, script, or tool -->
45
- command, script, or tool input
49
+ > [!IMPORTANT]
50
+ > YOU MAY NOT finish the loop while a task, worker, or stream is unfinished.
46
51
 
47
- ### WORK0 (worker://name) <!-- spawn a child worker -->
48
- prompt
52
+ ## Workspace Navigation
49
53
 
50
- ### FORK0 (worker://name) <!-- fork current worker -->
51
- prompt
54
+ ````FIND (src/**/*.ts) /TODO/ <!-- paths with matches -->
55
+ ````
52
56
 
53
- ### KILL0 (target or glob) <range or region> <!-- delete or terminate -->
54
- filter pattern
57
+ ````READ (belfry.md) /\bbats?\b/i <!-- only the lines matching "bat" or "bats" -->
58
+ ````
55
59
 
56
- ### SEND0 (recipient) <!-- message a worker://name, a path, or the user (default) -->
57
- message
58
- ```
60
+ > [!TIP]
61
+ > Locate with FIND, then READ a scope or a pattern; prefer glob-filtered paths over broad scans.
59
62
 
60
- ## Standard Workflow
63
+ * `(path)` may be a glob, permitting bulk operations.
64
+ * Log item paths nest: `log:///1/2/3/READ` is loop/turn/item/operation.
65
+ * FIND results hold one inner array per path: its channels, default first; append `#channel` to select another.
66
+ * Percent-encode `(` as `%28` and `)` as `%29`.
67
+ * Creating a file creates missing parent directories.
61
68
 
62
- YOU SHOULD begin every turn with a `## PLAN0`, including determinations, decisions, and docket items.
63
- YOU SHOULD end every turn with `### SEND0 (NEXT|WAIT|TERM|FAIL)`.
64
- YOU SHOULD NOT `(TERM)` when the turn OPs contain delegation, streams, or side effects.
69
+ ## File Editing
65
70
 
66
- | submit code | meaning | body message |
67
- |------------------|-----------------------------------|------------------------------------------|
68
- | `### SEND0 (NEXT)` | Continue to results in next turn | Describe expected or intended next steps |
69
- | `### SEND0 (WAIT)` | Wait for workers or streams | Describe expected or intended next steps |
70
- | `### SEND0 (TERM)` | Successful conclusion | Response to the Active User Prompt |
71
- | `### SEND0 (FAIL)` | Abort and fail prompt | Describe error or issue |
71
+ ````EDIT (example.md) <@abcde>
72
+ literal replacement text
73
+ ````
72
74
 
73
- * The results of OPs are not observable until after submitting with `(NEXT)`, or `(WAIT)`.
75
+ ````EDIT (books.xml) //book[price > 35.00] <!-- an empty body removes each match -->
76
+ ````
74
77
 
75
- ```example
76
- ## PLAN0
77
- [{"content":"report.md is very large, requiring chunking.","status":"memory"},
78
- {"content":"Update the existing private summary entry with relevant findings from report.md.","status":"in_progress"}]
79
- ### EDIT0 (worker://~/report-summary.md) <@wCf7x>
80
- * Q3 results: 42%
78
+ ````42EDIT (edit-example.md) <!-- resolve nested OP conflicts with matching numeric delimiters after fencing -->
79
+ ````EDIT (edit-example.md)
80
+ An edit example.
81
+ ````
82
+ ````42
81
83
 
82
- ### EDIT0 (worker://~/report-summary.md) <-1>
83
- * Q4 results exceeded Q3
84
+ > [!TIP]
85
+ > The EDIT body is literal text. YOU SHOULD address lines by `<@hash>` or `<@start,@end>`; stale targets are rejected.
84
86
 
85
- ### KILL0 (log:///1/5/4/READ) <!-- purge previous chunk -->
86
- ### READ0 (report.md) <401,600> <!-- retrieve next chunk -->
87
- ### SEND0 (NEXT)
88
- Next: Distill relevant findings from this chunk, then continue reading.
89
- ```
87
+ ## Messaging
90
88
 
91
- ## The PLAN
89
+ ````SEND (node:///c4e56789) <!-- SEND with a (path) sends the message to the path -->
90
+ With a running node script, SEND passes this message to stdin.
91
+ ````
92
92
 
93
- * Determinations: "memory" entries recording findings or learnings.
94
- * Decisions: "memory" entries recording conclusions, decisions, or policies.
95
- * Docket: "pending", "in_progress", or "completed" work.
93
+ ````SEND <!-- SEND without a (path) responds to Active Prompts -->
94
+ YOU SHOULD format responses to the Active Prompts in Markdown, using Mermaid diagrams, tables, lists, or prose.
95
+ ````
96
96
 
97
- ## Pattern Filtering
97
+ ## Delegation
98
+
99
+ ````WORK (worker://reviewer) <!-- the child's result lands in your log -->
100
+ Review src/ for unhandled promise rejections.
101
+ ````
98
102
 
99
- * Pattern matchers in the OP's `body` select paths by content:
103
+ ````KILL (sh:///ab3d5678) <!-- stops a running command -->
104
+ ````
100
105
 
101
- | prefix | dialect | form | example | engine |
102
- |--------|----------|------------------------------------|-------------------------|------------------|
103
- | `/` | regex | `/pattern/flags` | `/\btimeout\b/i` | ECMAScript |
104
- | `//` | xpath | `//selector` | `//dependencies/*` | XPath 1.0 |
105
- | `$` | jsonpath | `$.field`, `$.items[*].name` | `$[*][?(@.tokensActive>500)]` | RFC 9535 |
106
- | `~` | semantic | `~phrase` | `~retry` | embedding cosine |
107
- | `&` | graph | `&<symbol`, `&>symbol`, `&symbol` | `&<parseTurn` | symbol index |
108
- | none | glob | `pattern` | `?(export )?(async )function *` | glob / literal |
106
+ > [!TIP]
107
+ > `SEND (worker://name)` messages a live worker. The packet's `## Delegation` lists your live workers and streams.
109
108
 
110
- * The leading symbol commits its dialect.
111
- * In a path target, `*` maps one level and `**` crosses directories.
112
- * Mapping is universal: JSONPath can query XML and XPath can query JSON.
113
- * Patterned FIND returns paths for broad targets and locations for exact targets.
109
+ ## Context Curation
114
110
 
115
- ## `(path)`
111
+ ````KILL (log:///1/[1-7]/*/{TASK,READ}) <!-- removes matching log items -->
112
+ ````
116
113
 
117
- * Log item paths are nested: `log:///1/2/3/READ` is loop/turn/item/OP.
118
- * In FIND results, each inner array lists one path's channels, default first. Append `#channel` to override the default.
119
- * A file or entry extension declares its mimetype.
120
- * Percent-encode reserved path characters: `(` becomes `%28` and `)` becomes `%29`.
121
- * Creating a file automatically creates missing parent directories.
114
+ ````KILL (log:///**/READ) <17,-1> <!-- trims each item's log lines from 17 on -->
115
+ ````
122
116
 
123
- * Parent traversal: `### READ0 (../AGENTS.md)`.
124
- * Stream channel: `### READ0 (sh:///1/2/3/EXEC#stderr)`.
117
+ > [!CAUTION]
118
+ > logTokensTotal must not exceed logTokensMax. KILL on log items and lines hides them from your context without deleting anything; successful log KILL receipts are not shown.
125
119
 
126
- ## `<scope>`
120
+ ## `<scope|range>`
127
121
 
128
- * Text scopes use 1-based lines and Unicode code-point columns consistently across textual mimetypes:
122
+ Text scopes use 1-based lines and Unicode code-point columns across textual mimetypes:
129
123
 
130
124
  | form | endpoint rule |
131
125
  |-----------------|--------------------------------|
132
- | `<L>` | one line |
133
- | `<@hash>` | one line |
134
- | `<SL,EL>` | lines SL through EL, inclusive |
135
- | `<@start,@end>` | lines @start through @end, inclusive |
126
+ | `<L>`, `<@hash>` | one line |
127
+ | `<SL,EL>`, `<@start,@end>` | lines SL through EL, inclusive |
136
128
  | `<SL,SC,EL,EC>` | start included, end excluded — `<2,1,2,5>` is columns 1-4 of line 2 |
137
129
  | `<0>`, `<-1>` | prepend / append on mutations; as an end line, `-1` is the last line |
138
130
 
139
- * The hash anchor and line number (`@abcde 42:`) in results are not content.
140
-
141
- YOU SHOULD prefer `<@hash>` or `<@start,@end>` to EDIT or KILL line coordinates; they reject stale targets.
142
-
143
- ## KILL
131
+ > [!CAUTION]
132
+ > The hash anchor and line number (`@abcde 42:`) shown on editable text are not content.
144
133
 
145
- * `### KILL0 (worker://~/notes.md)` without a scope deletes an entry.
146
- * `### KILL0 (src/app.js) <@zyxwv>` removes one line by anchor.
147
- * `### KILL0 (sh:///1/2/3/EXEC)` stops a running command.
148
- * `### KILL0 (worker://recheck)` terminates a worker.
149
- * `### KILL0 (log:///1/[1-7]/*/{PLAN,READ})` removes matching log items.
150
- * `### KILL0 (log:///**/READ) <17,-1>` removes each item's lines from 17 on.
151
- * A log KILL never touches the source.
152
-
153
- YOU MAY KILL superseded, stale, or irrelevant log items to avoid `tokensActiveTotal` overflow.
154
-
155
- ## Delegation
134
+ ## `pattern`
156
135
 
157
- | OP | inherits | typical use | body |
158
- |-------|------------|---------------------------------|------|
159
- | WORK | fresh log | Divide and conquer | self-contained task prompt, with necessary context |
160
- | FORK | forked log | Do two things at once | distinct objective prompt; prior context is inherited |
136
+ | prefix | dialect | example |
137
+ |--------|--------------------------|---------------------------------|
138
+ | `/` | regex (ECMAScript) | `/\btimeout\b/i` |
139
+ | `^` | regex anchored to a line | `^Note:.*` |
140
+ | `//` | xpath (1.0) | `//dependencies/*` |
141
+ | `$` | jsonpath (RFC 9535) | `$.items[?(@.price>500)]` |
142
+ | `~` | full-text (SQLite FTS5) | `~retry` |
143
+ | `&` | graph: `&sym` all relations, `&<sym` referrers, `&>sym` referents | `&<parseTurn` |
144
+ | none | glob, or a literal | `?(export )?(async )function *` |
161
145
 
162
- * Delegation `body` must contain a prompt, not OPs.
163
- * Send a worker another message: `### SEND0 (worker://recheck)` with body `Also verify the alternative against the existing tests.`.
146
+ > [!TIP]
147
+ > The `[metadata]` parameter accepts a `[{"pattern":"matcher"}]` option for patterns that cannot be inline.
@@ -1,141 +0,0 @@
1
- # @generated by scriptify/generate-gbnf.ts — do not edit; run `npm run build:gbnf`.
2
- # @plurnk-response-root root-gemma
3
- root ::= root-gemma
4
- section-body-b0 ::= ("#" section-body-b1 | [ PLANFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
5
- section-body-b1 ::= ("#" section-body-b2 | [ PLANFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
6
- section-body-b2 ::= ("#" section-body-b7 | " " section-body-b3 | [PLANFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
7
- section-body-b3 ::= ("#" section-body-b1 | [ LANFIDRETCOYMVSXBWK] section-body-b0 | "P" section-body-b4 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
8
- section-body-b4 ::= ("#" section-body-b1 | [ PANFIDRETCOYMVSXBWK] section-body-b0 | "L" section-body-b5 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
9
- section-body-b5 ::= ("#" section-body-b1 | [ PLNFIDRETCOYMVSXBWK] section-body-b0 | "A" section-body-b6 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
10
- section-body-b6 ::= ("#" section-body-b1 | [ PLAFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
11
- section-body-b7 ::= ("#" section-body-b7 | " " section-body-b8 | [PLANFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
12
- section-body-b8 ::= ("#" section-body-b1 | [ LANIDTOYVX] section-body-b0 | "P" section-body-b4 | "F" section-body-b9 | "R" section-body-b12 | "E" section-body-b15 | "C" section-body-b18 | "M" section-body-b21 | "S" section-body-b24 | "B" section-body-b29 | "W" section-body-b32 | "K" section-body-b37 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
13
- section-body-b9 ::= ("#" section-body-b1 | [ PLANFDRETCYMVSXBWK] section-body-b0 | "I" section-body-b10 | "O" section-body-b35 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
14
- section-body-b10 ::= ("#" section-body-b1 | [ PLAFIDRETCOYMVSXBWK] section-body-b0 | "N" section-body-b11 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
15
- section-body-b11 ::= ("#" section-body-b1 | [ PLANFIRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
16
- section-body-b12 ::= ("#" section-body-b1 | [ PLANFIDRTCOYMVSXBWK] section-body-b0 | "E" section-body-b13 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
17
- section-body-b13 ::= ("#" section-body-b1 | [ PLNFIDRETCOYMVSXBWK] section-body-b0 | "A" section-body-b14 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
18
- section-body-b14 ::= ("#" section-body-b1 | [ PLANFIRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
19
- section-body-b15 ::= ("#" section-body-b1 | [ PLANFIRETCOYMVSBWK] section-body-b0 | "D" section-body-b16 | "X" section-body-b27 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
20
- section-body-b16 ::= ("#" section-body-b1 | [ PLANFDRETCOYMVSXBWK] section-body-b0 | "I" section-body-b17 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
21
- section-body-b17 ::= ("#" section-body-b1 | [ PLANFIDRECOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
22
- section-body-b18 ::= ("#" section-body-b1 | [ PLANFIDRETCYMVSXBWK] section-body-b0 | "O" section-body-b19 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
23
- section-body-b19 ::= ("#" section-body-b1 | [ LANFIDRETCOYMVSXBWK] section-body-b0 | "P" section-body-b20 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
24
- section-body-b20 ::= ("#" section-body-b1 | [ PLANFIDRETCOMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
25
- section-body-b21 ::= ("#" section-body-b1 | [ PLANFIDRETCYMVSXBWK] section-body-b0 | "O" section-body-b22 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
26
- section-body-b22 ::= ("#" section-body-b1 | [ PLANFIDRETCOYMSXBWK] section-body-b0 | "V" section-body-b23 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
27
- section-body-b23 ::= ("#" section-body-b1 | [ PLANFIDRTCOYMVSXBWK] section-body-b0 | [^\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 | "N" section-body-b26 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
30
- section-body-b26 ::= ("#" section-body-b1 | [ PLANFIRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
31
- section-body-b27 ::= ("#" section-body-b1 | [ PLANFIDRTCOYMVSXBWK] section-body-b0 | "E" section-body-b28 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
32
- section-body-b28 ::= ("#" section-body-b1 | [ PLANFIDRETOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
33
- section-body-b29 ::= ("#" section-body-b1 | [ PLNFIDRETCOYMVSXBWK] section-body-b0 | "A" section-body-b30 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
34
- section-body-b30 ::= ("#" section-body-b1 | [ PLANFIDETCOYMVSXBWK] section-body-b0 | "R" section-body-b31 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
35
- section-body-b31 ::= ("#" section-body-b1 | [ PLANFIDRTCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
36
- section-body-b32 ::= ("#" section-body-b1 | [ PLANFIDRETCYMVSXBWK] section-body-b0 | "O" section-body-b33 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
37
- section-body-b33 ::= ("#" section-body-b1 | [ PLANFIDETCOYMVSXBWK] section-body-b0 | "R" section-body-b34 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
38
- section-body-b34 ::= ("#" section-body-b1 | [ PLANFIDRETCOYMVSXBW] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
39
- section-body-b35 ::= ("#" section-body-b1 | [ PLANFIDETCOYMVSXBWK] section-body-b0 | "R" section-body-b36 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
40
- section-body-b36 ::= ("#" section-body-b1 | [ PLANFIDRETCOYMVSXBW] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
41
- section-body-b37 ::= ("#" section-body-b1 | [ PLANFDRETCOYMVSXBWK] section-body-b0 | "I" 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 | "L" section-body-b39 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
43
- section-body-b39 ::= ("#" section-body-b1 | [ PANFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
44
- section-body-ne ::= "#" section-body-b1 | [ PLANFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0
45
- annotation-body-b0 ::= ("-" annotation-body-b1 | ">" annotation-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r>-] annotation-body-b0)?
46
- annotation-body-b1 ::= ("-" annotation-body-b2 | ">" annotation-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r>-] annotation-body-b0)?
47
- annotation-body-b2 ::= ("-" annotation-body-b2 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r>-] annotation-body-b0)?
48
- annotation-body-ne ::= "-" annotation-body-b1 | ">" annotation-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r>-] annotation-body-b0
49
- pattern-body-ne ::= [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r:#] [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r]*
50
- plan ::= "## PLAN0" annotation-slot? "\n" section-body-ne "\n"
51
- find ::= "### FIND0" target-slot line-slot? annotation-slot? "\n" | "### FIND0" target-slot line-slot? annotation-slot? "\n" pattern-body-ne "\n"
52
- read ::= "### READ0" target-slot text-line-slot? annotation-slot? "\n" | "### READ0" target-slot text-line-slot? annotation-slot? "\n" pattern-body-ne "\n"
53
- edit ::= "### EDIT0" target-slot text-line-slot? annotation-slot? "\n" | "### EDIT0" target-slot text-line-slot? annotation-slot? "\n" section-body-ne "\n"
54
- copy ::= "### COPY0" target-slot text-line-slot? target-slot text-line-slot? annotation-slot? "\n"
55
- move ::= "### MOVE0" target-slot text-line-slot? target-slot text-line-slot? annotation-slot? "\n"
56
- 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"
57
- bare ::= "### BARE0" annotation-slot? "\n" section-body-ne "\n"
58
- work ::= "### WORK0" target-slot annotation-slot? "\n" section-body-ne "\n"
59
- fork ::= "### FORK0" target-slot annotation-slot? "\n" section-body-ne "\n"
60
- kill ::= "### KILL0" target-slot text-line-slot? annotation-slot? "\n" | "### KILL0" target-slot text-line-slot? annotation-slot? "\n" pattern-body-ne "\n"
61
- 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"
62
- send-102 ::= "### SEND0 (NEXT)" annotation-slot? "\n" section-body-ne
63
- send-200 ::= "### SEND0 (TERM)" annotation-slot? "\n" section-body-ne
64
- send-202 ::= "### SEND0 (WAIT)" park-slot? annotation-slot? "\n" section-body-ne
65
- send-499 ::= "### SEND0 (FAIL)" annotation-slot? "\n" section-body-ne
66
- send-final-any ::= send-102 | send-200 | send-202 | send-499
67
- send-final-first ::= send-200 | send-202 | send-499
68
- op-statement ::= find | read | edit | copy | move | exec | bare | work | fork | kill
69
- tail-0 ::= send-mid tail-1 | op-statement tail-1 | send-final-first
70
- tail-1 ::= send-mid tail-2 | op-statement tail-2 | send-final-any
71
- tail-2 ::= send-mid tail-3 | op-statement tail-3 | send-final-any
72
- tail-3 ::= send-mid tail-4 | op-statement tail-4 | send-final-any
73
- tail-4 ::= send-mid tail-5 | op-statement tail-5 | send-final-any
74
- tail-5 ::= send-mid tail-6 | op-statement tail-6 | send-final-any
75
- tail-6 ::= send-mid tail-7 | op-statement tail-7 | send-final-any
76
- tail-7 ::= send-mid tail-8 | op-statement tail-8 | send-final-any
77
- tail-8 ::= send-mid tail-9 | op-statement tail-9 | send-final-any
78
- tail-9 ::= send-mid tail-10 | op-statement tail-10 | send-final-any
79
- tail-10 ::= send-mid tail-11 | op-statement tail-11 | send-final-any
80
- tail-11 ::= send-mid tail-12 | op-statement tail-12 | send-final-any
81
- tail-12 ::= send-mid tail-13 | op-statement tail-13 | send-final-any
82
- tail-13 ::= send-mid tail-14 | op-statement tail-14 | send-final-any
83
- tail-14 ::= send-final-any
84
- sep ::= [ \t\r\n]? [ \t\r\n]? [ \t\r\n]? [ \t\r\n]? [ \t\r\n]? [ \t\r\n]? [ \t\r\n]?
85
- rz-chan-b0 ::= ("<" rz-chan-b1 | [|chanel>toug\n] rz-chan-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
86
- rz-chan-b1 ::= ("<" rz-chan-b1 | "|" rz-chan-b2 | "c" rz-chan-b18 | [hanel>toug\n] rz-chan-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
87
- rz-chan-b2 ::= ("<" rz-chan-b1 | [|hanel>toug\n] rz-chan-b0 | "c" rz-chan-b3 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
88
- rz-chan-b3 ::= ("<" rz-chan-b1 | [|canel>toug\n] rz-chan-b0 | "h" rz-chan-b4 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
89
- rz-chan-b4 ::= ("<" rz-chan-b1 | [|chnel>toug\n] rz-chan-b0 | "a" rz-chan-b5 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
90
- rz-chan-b5 ::= ("<" rz-chan-b1 | [|chael>toug\n] rz-chan-b0 | "n" rz-chan-b6 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
91
- rz-chan-b6 ::= ("<" rz-chan-b1 | [|chael>toug\n] rz-chan-b0 | "n" rz-chan-b7 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
92
- rz-chan-b7 ::= ("<" rz-chan-b1 | [|chanl>toug\n] rz-chan-b0 | "e" rz-chan-b8 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
93
- rz-chan-b8 ::= ("<" rz-chan-b1 | [|chane>toug\n] rz-chan-b0 | "l" rz-chan-b9 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
94
- rz-chan-b9 ::= ("<" rz-chan-b1 | [|chaneltoug\n] rz-chan-b0 | ">" rz-chan-b10 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
95
- rz-chan-b10 ::= ("<" rz-chan-b1 | [|chanel>oug\n] rz-chan-b0 | "t" rz-chan-b11 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
96
- rz-chan-b11 ::= ("<" rz-chan-b1 | [|canel>toug\n] rz-chan-b0 | "h" rz-chan-b12 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
97
- rz-chan-b12 ::= ("<" rz-chan-b1 | [|chanel>tug\n] rz-chan-b0 | "o" rz-chan-b13 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
98
- rz-chan-b13 ::= ("<" rz-chan-b1 | [|chanel>tog\n] rz-chan-b0 | "u" rz-chan-b14 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
99
- rz-chan-b14 ::= ("<" rz-chan-b1 | [|chanel>tou\n] rz-chan-b0 | "g" rz-chan-b15 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
100
- rz-chan-b15 ::= ("<" rz-chan-b1 | [|canel>toug\n] rz-chan-b0 | "h" rz-chan-b16 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
101
- rz-chan-b16 ::= ("<" rz-chan-b1 | [|chanel>oug\n] rz-chan-b0 | "t" rz-chan-b17 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
102
- rz-chan-b17 ::= ("<" rz-chan-b1 | [|chanel>toug] rz-chan-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
103
- rz-chan-b18 ::= ("<" rz-chan-b1 | [|canel>toug\n] rz-chan-b0 | "h" rz-chan-b19 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
104
- rz-chan-b19 ::= ("<" rz-chan-b1 | [|chnel>toug\n] rz-chan-b0 | "a" rz-chan-b20 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
105
- rz-chan-b20 ::= ("<" rz-chan-b1 | [|chael>toug\n] rz-chan-b0 | "n" rz-chan-b21 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
106
- rz-chan-b21 ::= ("<" rz-chan-b1 | [|chael>toug\n] rz-chan-b0 | "n" rz-chan-b22 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
107
- rz-chan-b22 ::= ("<" rz-chan-b1 | [|chanl>toug\n] rz-chan-b0 | "e" rz-chan-b23 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
108
- rz-chan-b23 ::= ("<" rz-chan-b1 | [|chane>toug\n] rz-chan-b0 | "l" rz-chan-b24 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
109
- rz-chan-b24 ::= ("<" rz-chan-b1 | "|" rz-chan-b25 | [chanel>toug\n] rz-chan-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
110
- rz-chan-b25 ::= ("<" rz-chan-b1 | [|chaneltoug\n] rz-chan-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F<|chanel>toug\n] rz-chan-b0)?
111
- rz-chan-first ::= [0-9A-Za-z]
112
- channel ::= "<|channel>thought\n" rz-chan-first rz-chan-b0 "<channel|>"
113
- turn ::= plan tail-0 | tail-0
114
- framed-turn ::= turn | "```example\n" turn "\n```" | "```plurnk\n" turn "\n```"
115
- root-gemma ::= channel sep framed-turn
116
- target-slot ::= " " target metadata-slot*
117
- recipient-slot ::= " (" scheme "://" target-inner ")" metadata-slot*
118
- scheme ::= [a-z] [a-z0-9+.-]*
119
- executor-name ::= [0-9A-Za-z_.+-] [0-9A-Za-z_.+-]*
120
- executor-slot ::= " [" executor-name "]"
121
- exec-program ::= target-slot | metadata-slot metadata-slot*
122
- metadata-slot ::= " {" [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r{}]* "}"
123
- line-slot ::= " " line
124
- text-line-slot ::= " " text-line
125
- park-slot ::= " " park
126
- annotation-slot ::= " <!-- " annotation-body-ne " -->"
127
- target ::= "(" target-inner ")"
128
- target-inner ::= target-atom+
129
- target-atom ::= [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\\()<\r\n] | target-escape
130
- target-escape ::= "\\\\" | "\\(" | "\\)"
131
- line ::= "<" int line-rest* ">"
132
- line-rest ::= "," int
133
- text-line ::= "<" text-coordinate text-line-rest* ">"
134
- text-line-rest ::= "," text-coordinate
135
- text-coordinate ::= int | line-anchor
136
- line-anchor ::= "@" [0-9A-Za-z] [0-9A-Za-z] [0-9A-Za-z] [0-9A-Za-z] [0-9A-Za-z]
137
- int ::= "-"? [0-9]+ frac?
138
- frac ::= "." [0-9]+
139
- park ::= "<" park-t park-poll? ">"
140
- park-t ::= "-1" | [0-9]+
141
- park-poll ::= "," [0-9]+