@plurnk/plurnk-contracts 1.7.0 → 1.9.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 (104) hide show
  1. package/SPEC.md +227 -63
  2. package/dist/conformance/agui-v1.json +541 -0
  3. package/dist/plurnk.gemma.gbnf +26 -22
  4. package/dist/plurnk.qwen.gbnf +26 -22
  5. package/dist/schema/A2aAgentDefinition.json +44 -0
  6. package/dist/schema/AcpPlan.json +63 -0
  7. package/dist/schema/AguiClientConformance.json +74 -0
  8. package/dist/schema/AguiConformanceKit.json +111 -0
  9. package/dist/schema/AguiDiscovery.json +70 -0
  10. package/dist/schema/ClientDisplayCapabilities.json +1 -1
  11. package/dist/schema/ClientInteractionProjection.json +2 -2
  12. package/dist/schema/ClientInteractionRequest.json +1 -1
  13. package/dist/schema/ClientInteractionResolution.json +1 -1
  14. package/dist/schema/ClientStatement.json +16 -11
  15. package/dist/schema/EntryReadResult.json +2 -2
  16. package/dist/schema/FunctionalityCandidate.json +33 -0
  17. package/dist/schema/FunctionalityDefinitionState.json +33 -0
  18. package/dist/schema/FunctionalityDiscoverQuery.json +16 -0
  19. package/dist/schema/FunctionalityDiscoverResult.json +15 -0
  20. package/dist/schema/FunctionalityListResult.json +15 -0
  21. package/dist/schema/FunctionalityMutationResult.json +16 -0
  22. package/dist/schema/LineMarker.json +1 -1
  23. package/dist/schema/LoopFlags.json +1 -1
  24. package/dist/schema/MatcherBody.json +1 -1
  25. package/dist/schema/McpConfigurationOverlay.json +25 -0
  26. package/dist/schema/McpServerDefinition.json +3 -2
  27. package/dist/schema/McpServerOptions.json +36 -0
  28. package/dist/schema/ModelCatalogPage.json +122 -0
  29. package/dist/schema/ModelCatalogQuery.json +32 -0
  30. package/dist/schema/ModelReadiness.json +47 -0
  31. package/dist/schema/ModelRoute.json +23 -0
  32. package/dist/schema/Notice.json +1 -1
  33. package/dist/schema/OperationResult.json +3 -3
  34. package/dist/schema/ParsedPath.json +1 -1
  35. package/dist/schema/Plan.json +52 -0
  36. package/dist/schema/PlurnkStatement.json +57 -40
  37. package/dist/schema/Position.json +1 -1
  38. package/dist/schema/ProblemDetails.json +1 -1
  39. package/dist/schema/ProposalDisposition.json +1 -1
  40. package/dist/schema/ProposalProjection.json +5 -6
  41. package/dist/schema/ProviderAccounting.json +3 -3
  42. package/dist/schema/ProviderCost.json +1 -1
  43. package/dist/schema/ProviderRequestAccounting.json +3 -3
  44. package/dist/schema/ProviderUsage.json +1 -1
  45. package/dist/schema/RangeExtent.json +1 -1
  46. package/dist/schema/ReasoningPolicy.json +7 -0
  47. package/dist/schema/ResourceSelection.json +3 -3
  48. package/dist/schema/SendBody.json +1 -1
  49. package/dist/schema/SkillDefinition.json +26 -0
  50. package/dist/schema/TextLineMarker.json +1 -1
  51. package/dist/schema/TextRegion.json +1 -1
  52. package/dist/src/AcpPlanValue.d.ts +7 -0
  53. package/dist/src/AcpPlanValue.d.ts.map +1 -0
  54. package/dist/src/AcpPlanValue.js +32 -0
  55. package/dist/src/AcpPlanValue.js.map +1 -0
  56. package/dist/src/AguiConformance.d.ts +11 -0
  57. package/dist/src/AguiConformance.d.ts.map +1 -0
  58. package/dist/src/AguiConformance.js +16 -0
  59. package/dist/src/AguiConformance.js.map +1 -0
  60. package/dist/src/ApplicationPort.d.ts +271 -0
  61. package/dist/src/ApplicationPort.d.ts.map +1 -0
  62. package/dist/src/ApplicationPort.js +2 -0
  63. package/dist/src/ApplicationPort.js.map +1 -0
  64. package/dist/src/AstBuilder.d.ts.map +1 -1
  65. package/dist/src/AstBuilder.js +44 -22
  66. package/dist/src/AstBuilder.js.map +1 -1
  67. package/dist/src/PlanValue.d.ts +10 -0
  68. package/dist/src/PlanValue.d.ts.map +1 -0
  69. package/dist/src/PlanValue.js +58 -0
  70. package/dist/src/PlanValue.js.map +1 -0
  71. package/dist/src/PlurnkErrorStrategy.d.ts.map +1 -1
  72. package/dist/src/PlurnkErrorStrategy.js +33 -19
  73. package/dist/src/PlurnkErrorStrategy.js.map +1 -1
  74. package/dist/src/PlurnkParser.js +3 -3
  75. package/dist/src/PlurnkParser.js.map +1 -1
  76. package/dist/src/Problems.js +1 -1
  77. package/dist/src/Validator.d.ts +68 -1
  78. package/dist/src/Validator.d.ts.map +1 -1
  79. package/dist/src/Validator.js +373 -0
  80. package/dist/src/Validator.js.map +1 -1
  81. package/dist/src/generated/plurnkLexer.d.ts +30 -28
  82. package/dist/src/generated/plurnkLexer.d.ts.map +1 -1
  83. package/dist/src/generated/plurnkLexer.js +398 -381
  84. package/dist/src/generated/plurnkLexer.js.map +1 -1
  85. package/dist/src/generated/plurnkParser.d.ts +56 -39
  86. package/dist/src/generated/plurnkParser.d.ts.map +1 -1
  87. package/dist/src/generated/plurnkParser.js +644 -450
  88. package/dist/src/generated/plurnkParser.js.map +1 -1
  89. package/dist/src/generated/plurnkParserVisitor.d.ts +7 -7
  90. package/dist/src/generated/plurnkParserVisitor.d.ts.map +1 -1
  91. package/dist/src/generated/plurnkParserVisitor.js +6 -6
  92. package/dist/src/generated/plurnkParserVisitor.js.map +1 -1
  93. package/dist/src/index.d.ts +7 -2
  94. package/dist/src/index.d.ts.map +1 -1
  95. package/dist/src/index.js +5 -2
  96. package/dist/src/index.js.map +1 -1
  97. package/dist/src/types.d.ts +2 -1
  98. package/dist/src/types.d.ts.map +1 -1
  99. package/dist/src/types.generated.d.ts +430 -21
  100. package/dist/src/types.generated.d.ts.map +1 -1
  101. package/dist/src/types.js +4 -0
  102. package/dist/src/types.js.map +1 -1
  103. package/package.json +7 -3
  104. package/plurnk.md +67 -78
@@ -0,0 +1,541 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "transport": [
4
+ {
5
+ "name": "comments-crlf-split-multiline",
6
+ "chunks": [
7
+ ": heartbeat\r\nid: ignored\r\ndata: {\"type\":\"CUSTOM\",\r\ndata: \"name\":\"plurnk.notice\",\"value\":{\"source\":\"engine\",\"kind\":\"fixture\",\"level\":\"info\"}}\r",
8
+ "\n\r\n"
9
+ ],
10
+ "eof": false,
11
+ "expect": {
12
+ "events": [
13
+ {
14
+ "type": "CUSTOM",
15
+ "name": "plurnk.notice",
16
+ "value": { "source": "engine", "kind": "fixture", "level": "info" }
17
+ }
18
+ ]
19
+ }
20
+ },
21
+ {
22
+ "name": "split-frame-and-eof-dispatch",
23
+ "chunks": [
24
+ "data: {\"type\":\"RUN_STARTED\",\"threadId\":\"fixture\",\"runId\":\"run",
25
+ "\"}\n\ndata: {\"type\":\"RUN_FINISHED\",\"threadId\":\"fixture\",\"runId\":\"run\",\"outcome\":{\"type\":\"success\"}}"
26
+ ],
27
+ "eof": true,
28
+ "expect": {
29
+ "events": [
30
+ { "type": "RUN_STARTED", "threadId": "fixture", "runId": "run" },
31
+ {
32
+ "type": "RUN_FINISHED",
33
+ "threadId": "fixture",
34
+ "runId": "run",
35
+ "outcome": { "type": "success" }
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ {
41
+ "name": "malformed-json",
42
+ "chunks": ["data: not-json\n\n"],
43
+ "eof": false,
44
+ "expect": { "error": "invalid-json" }
45
+ },
46
+ {
47
+ "name": "cr-only-lines",
48
+ "chunks": [
49
+ ": comment\rdata: {\"type\":\"RUN_STARTED\",\"threadId\":\"fixture\",\"runId\":\"cr\"}\r\r: tail\n"
50
+ ],
51
+ "eof": false,
52
+ "expect": {
53
+ "events": [
54
+ { "type": "RUN_STARTED", "threadId": "fixture", "runId": "cr" }
55
+ ]
56
+ }
57
+ }
58
+ ],
59
+ "lifecycles": [
60
+ {
61
+ "name": "ordinary-run",
62
+ "events": [
63
+ { "type": "RUN_STARTED", "threadId": "fixture", "runId": "run" },
64
+ {
65
+ "type": "CUSTOM",
66
+ "name": "plurnk.row",
67
+ "value": {
68
+ "id": 1,
69
+ "worker_id": 7,
70
+ "origin": "model",
71
+ "op": "PLAN",
72
+ "coordinate": "1.1.1",
73
+ "tx": { "body": "Work." }
74
+ }
75
+ },
76
+ {
77
+ "type": "CUSTOM",
78
+ "name": "plurnk.terminated",
79
+ "value": {
80
+ "workspaceId": 1,
81
+ "workerId": 7,
82
+ "loopId": 1,
83
+ "result": { "status": 200 },
84
+ "hitMaxTurns": false,
85
+ "turnIds": [1],
86
+ "attributions": [],
87
+ "usage": {
88
+ "accounting": { "requests": [], "usage": null, "costUsd": null },
89
+ "curationWeight": null,
90
+ "curationBudget": null,
91
+ "contextTokens": null,
92
+ "contextCapacity": null,
93
+ "meta": {}
94
+ }
95
+ }
96
+ },
97
+ {
98
+ "type": "RUN_FINISHED",
99
+ "threadId": "fixture",
100
+ "runId": "run",
101
+ "outcome": { "type": "success" }
102
+ }
103
+ ],
104
+ "expect": {
105
+ "completion": "success",
106
+ "families": ["log/entry", "loop/terminated"],
107
+ "status": 200
108
+ }
109
+ },
110
+ {
111
+ "name": "action-success",
112
+ "events": [
113
+ { "type": "RUN_STARTED", "threadId": "fixture", "runId": "action" },
114
+ {
115
+ "type": "CUSTOM",
116
+ "name": "plurnk.action.result",
117
+ "value": {
118
+ "kind": "workspace.list",
119
+ "ok": true,
120
+ "result": { "workspaces": [] }
121
+ }
122
+ },
123
+ {
124
+ "type": "RUN_FINISHED",
125
+ "threadId": "fixture",
126
+ "runId": "action",
127
+ "outcome": { "type": "success" }
128
+ }
129
+ ],
130
+ "expect": {
131
+ "completion": "success",
132
+ "families": [],
133
+ "action": { "kind": "workspace.list", "ok": true }
134
+ }
135
+ },
136
+ {
137
+ "name": "action-problem",
138
+ "events": [
139
+ {
140
+ "type": "CUSTOM",
141
+ "name": "plurnk.action.result",
142
+ "value": {
143
+ "kind": "workspace.rename",
144
+ "ok": false,
145
+ "problem": {
146
+ "type": "https://problems.plurnk.xyz/daemon/workspace/name-conflict",
147
+ "title": "Name conflict",
148
+ "status": 409,
149
+ "detail": "The workspace name is already in use."
150
+ }
151
+ }
152
+ },
153
+ {
154
+ "type": "RUN_FINISHED",
155
+ "threadId": "fixture",
156
+ "runId": "action-problem",
157
+ "outcome": { "type": "success" }
158
+ }
159
+ ],
160
+ "expect": {
161
+ "completion": "success",
162
+ "families": [],
163
+ "action": { "kind": "workspace.rename", "ok": false, "status": 409 }
164
+ }
165
+ },
166
+ {
167
+ "name": "loop-injection",
168
+ "events": [
169
+ {
170
+ "type": "CUSTOM",
171
+ "name": "plurnk.action.result",
172
+ "value": {
173
+ "kind": "loop.inject",
174
+ "ok": true,
175
+ "result": {
176
+ "status": 100,
177
+ "action": "injected_next_turn",
178
+ "loopId": 9,
179
+ "turnSeq": 2
180
+ }
181
+ }
182
+ },
183
+ {
184
+ "type": "RUN_FINISHED",
185
+ "threadId": "fixture",
186
+ "runId": "inject",
187
+ "outcome": { "type": "success" }
188
+ }
189
+ ],
190
+ "expect": {
191
+ "completion": "success",
192
+ "families": [],
193
+ "status": 100,
194
+ "action": { "kind": "loop.inject", "ok": true, "status": 100 }
195
+ }
196
+ },
197
+ {
198
+ "name": "proposal-interrupt",
199
+ "events": [
200
+ {
201
+ "type": "TOOL_CALL_START",
202
+ "toolCallId": "prop:42",
203
+ "toolCallName": "request_approval"
204
+ },
205
+ {
206
+ "type": "TOOL_CALL_ARGS",
207
+ "toolCallId": "prop:42",
208
+ "delta": "{\"op\":\"EDIT\",\"target\":{\"scheme\":\"file\",\"pathname\":\"example.txt\"},\"body\":\"change\",\"attrs\":{},\"flags\":{}}"
209
+ },
210
+ { "type": "TOOL_CALL_END", "toolCallId": "prop:42" },
211
+ {
212
+ "type": "RUN_FINISHED",
213
+ "threadId": "fixture",
214
+ "runId": "proposal",
215
+ "outcome": {
216
+ "type": "interrupt",
217
+ "interrupts": [
218
+ {
219
+ "id": "prop:42",
220
+ "reason": "tool_call",
221
+ "toolCallId": "prop:42"
222
+ }
223
+ ]
224
+ }
225
+ }
226
+ ],
227
+ "expect": {
228
+ "completion": "interrupt",
229
+ "families": ["loop/proposal"],
230
+ "interrupt": "proposal"
231
+ }
232
+ },
233
+ {
234
+ "name": "interaction-interrupt",
235
+ "events": [
236
+ {
237
+ "type": "TOOL_CALL_START",
238
+ "toolCallId": "int:43",
239
+ "toolCallName": "request_user_input"
240
+ },
241
+ {
242
+ "type": "TOOL_CALL_ARGS",
243
+ "toolCallId": "int:43",
244
+ "delta": "{\"question\":\"Proceed?\"}"
245
+ },
246
+ { "type": "TOOL_CALL_END", "toolCallId": "int:43" },
247
+ {
248
+ "type": "RUN_FINISHED",
249
+ "threadId": "fixture",
250
+ "runId": "interaction",
251
+ "outcome": {
252
+ "type": "interrupt",
253
+ "interrupts": [
254
+ {
255
+ "id": "int:43",
256
+ "reason": "tool_call",
257
+ "toolCallId": "int:43",
258
+ "message": "Answer the question.",
259
+ "responseSchema": {
260
+ "type": "object",
261
+ "required": ["answer"],
262
+ "properties": { "answer": { "type": "string" } }
263
+ }
264
+ }
265
+ ]
266
+ }
267
+ }
268
+ ],
269
+ "expect": {
270
+ "completion": "interrupt",
271
+ "families": ["loop/interaction"],
272
+ "interrupt": "interaction"
273
+ }
274
+ },
275
+ {
276
+ "name": "reasoning-stream",
277
+ "events": [
278
+ {
279
+ "type": "REASONING_START",
280
+ "messageId": "model-call-11/reasoning"
281
+ },
282
+ {
283
+ "type": "REASONING_MESSAGE_START",
284
+ "messageId": "model-call-11/reasoning",
285
+ "role": "reasoning"
286
+ },
287
+ {
288
+ "type": "REASONING_MESSAGE_CONTENT",
289
+ "messageId": "model-call-11/reasoning",
290
+ "delta": "checked "
291
+ },
292
+ {
293
+ "type": "REASONING_MESSAGE_CONTENT",
294
+ "messageId": "model-call-11/reasoning",
295
+ "delta": "the evidence"
296
+ },
297
+ {
298
+ "type": "REASONING_MESSAGE_END",
299
+ "messageId": "model-call-11/reasoning"
300
+ },
301
+ {
302
+ "type": "REASONING_END",
303
+ "messageId": "model-call-11/reasoning"
304
+ },
305
+ {
306
+ "type": "CUSTOM",
307
+ "name": "plurnk.terminated",
308
+ "value": {
309
+ "workspaceId": 1,
310
+ "workerId": 7,
311
+ "loopId": 1,
312
+ "result": { "status": 200 },
313
+ "hitMaxTurns": false,
314
+ "turnIds": [1],
315
+ "attributions": [],
316
+ "usage": {
317
+ "accounting": { "requests": [], "usage": null, "costUsd": null },
318
+ "curationWeight": null,
319
+ "curationBudget": null,
320
+ "contextTokens": null,
321
+ "contextCapacity": null,
322
+ "meta": {}
323
+ }
324
+ }
325
+ },
326
+ {
327
+ "type": "RUN_FINISHED",
328
+ "threadId": "fixture",
329
+ "runId": "reasoning",
330
+ "outcome": { "type": "success" }
331
+ }
332
+ ],
333
+ "expect": {
334
+ "completion": "success",
335
+ "families": ["reasoning/event", "loop/terminated"],
336
+ "status": 200
337
+ }
338
+ },
339
+ {
340
+ "name": "notice-and-stream",
341
+ "events": [
342
+ {
343
+ "type": "CUSTOM",
344
+ "name": "plurnk.notice",
345
+ "value": { "source": "engine", "kind": "fixture", "level": "info" }
346
+ },
347
+ {
348
+ "type": "CUSTOM",
349
+ "name": "plurnk.stream",
350
+ "value": {
351
+ "entryId": 8,
352
+ "workerId": 7,
353
+ "target": "sh:///1/1/8",
354
+ "scheme": "sh",
355
+ "channel": "stdout",
356
+ "state": "active",
357
+ "contentLength": 4
358
+ }
359
+ },
360
+ {
361
+ "type": "CUSTOM",
362
+ "name": "plurnk.stream",
363
+ "value": {
364
+ "entryId": 8,
365
+ "workerId": 7,
366
+ "target": "sh:///1/1/8",
367
+ "subscriptionId": 3,
368
+ "scheme": "sh",
369
+ "result": { "status": 200 },
370
+ "summary": "completed",
371
+ "wakeAction": "no-loop"
372
+ }
373
+ },
374
+ {
375
+ "type": "CUSTOM",
376
+ "name": "plurnk.terminated",
377
+ "value": {
378
+ "workspaceId": 1,
379
+ "workerId": 7,
380
+ "loopId": 1,
381
+ "result": { "status": 200 },
382
+ "hitMaxTurns": false,
383
+ "turnIds": [1],
384
+ "attributions": [],
385
+ "usage": {
386
+ "accounting": { "requests": [], "usage": null, "costUsd": null },
387
+ "curationWeight": null,
388
+ "curationBudget": null,
389
+ "contextTokens": null,
390
+ "contextCapacity": null,
391
+ "meta": {}
392
+ }
393
+ }
394
+ },
395
+ {
396
+ "type": "RUN_FINISHED",
397
+ "threadId": "fixture",
398
+ "runId": "stream",
399
+ "outcome": { "type": "success" }
400
+ }
401
+ ],
402
+ "expect": {
403
+ "completion": "success",
404
+ "families": ["notice/event", "stream/event", "stream/concluded", "loop/terminated"],
405
+ "status": 200
406
+ }
407
+ },
408
+ {
409
+ "name": "problem-run",
410
+ "events": [
411
+ {
412
+ "type": "CUSTOM",
413
+ "name": "plurnk.problem",
414
+ "value": {
415
+ "type": "https://problems.plurnk.xyz/fixture/conflict",
416
+ "title": "Fixture conflict",
417
+ "status": 409,
418
+ "detail": "The fixture deliberately conflicts."
419
+ }
420
+ },
421
+ {
422
+ "type": "RUN_ERROR",
423
+ "message": "The fixture deliberately conflicts.",
424
+ "code": "https://problems.plurnk.xyz/fixture/conflict"
425
+ }
426
+ ],
427
+ "expect": {
428
+ "completion": "error",
429
+ "families": ["problem/event"],
430
+ "status": 409
431
+ }
432
+ },
433
+ {
434
+ "name": "branch-batch",
435
+ "events": [
436
+ {
437
+ "type": "CUSTOM",
438
+ "name": "plurnk.branch_batch",
439
+ "value": {
440
+ "batchId": 4,
441
+ "state": "completed",
442
+ "completed": 2,
443
+ "total": 2
444
+ }
445
+ },
446
+ {
447
+ "type": "CUSTOM",
448
+ "name": "plurnk.terminated",
449
+ "value": {
450
+ "workspaceId": 1,
451
+ "workerId": 7,
452
+ "loopId": 1,
453
+ "result": { "status": 200 },
454
+ "hitMaxTurns": false,
455
+ "turnIds": [1],
456
+ "attributions": [],
457
+ "usage": {
458
+ "accounting": { "requests": [], "usage": null, "costUsd": null },
459
+ "curationWeight": null,
460
+ "curationBudget": null,
461
+ "contextTokens": null,
462
+ "contextCapacity": null,
463
+ "meta": {}
464
+ }
465
+ }
466
+ },
467
+ {
468
+ "type": "RUN_FINISHED",
469
+ "threadId": "fixture",
470
+ "runId": "branch",
471
+ "outcome": { "type": "success" }
472
+ }
473
+ ],
474
+ "expect": {
475
+ "completion": "success",
476
+ "families": ["workspace/branch-batch", "loop/terminated"],
477
+ "status": 200
478
+ }
479
+ },
480
+ {
481
+ "name": "cancelled-run",
482
+ "events": [
483
+ {
484
+ "type": "CUSTOM",
485
+ "name": "plurnk.terminated",
486
+ "value": {
487
+ "workspaceId": 1,
488
+ "workerId": 7,
489
+ "loopId": 1,
490
+ "result": {
491
+ "status": 499,
492
+ "problem": {
493
+ "type": "https://problems.plurnk.xyz/lifecycle/cancel/loop-cancelled",
494
+ "title": "Loop cancelled",
495
+ "status": 499,
496
+ "detail": "The loop was cancelled."
497
+ }
498
+ },
499
+ "hitMaxTurns": false,
500
+ "turnIds": [1],
501
+ "attributions": [],
502
+ "usage": {
503
+ "accounting": { "requests": [], "usage": null, "costUsd": null },
504
+ "curationWeight": null,
505
+ "curationBudget": null,
506
+ "contextTokens": null,
507
+ "contextCapacity": null,
508
+ "meta": {}
509
+ }
510
+ }
511
+ },
512
+ {
513
+ "type": "RUN_FINISHED",
514
+ "threadId": "fixture",
515
+ "runId": "cancel",
516
+ "outcome": { "type": "success" }
517
+ }
518
+ ],
519
+ "expect": {
520
+ "completion": "success",
521
+ "families": ["loop/terminated"],
522
+ "status": 499
523
+ }
524
+ },
525
+ {
526
+ "name": "dead-stream",
527
+ "events": [
528
+ {
529
+ "type": "CUSTOM",
530
+ "name": "plurnk.row",
531
+ "value": { "id": 1, "worker_id": 7, "origin": "model", "op": "PLAN" }
532
+ }
533
+ ],
534
+ "expect": {
535
+ "completion": "dead-stream",
536
+ "families": ["log/entry"],
537
+ "status": 502
538
+ }
539
+ }
540
+ ]
541
+ }
@@ -45,29 +45,32 @@ section-body-b40 ::= ("#" section-body-b1 | [ PLANFDRETCOYMVSXBWK] section-body-
45
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
46
  section-body-b42 ::= ("#" section-body-b1 | [ PANFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0)?
47
47
  section-body-ne ::= "#" section-body-b1 | [ PLANFIDRETCOYMVSXBWK] section-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F# PLANFIDRETCOYMVSXBWK] section-body-b0
48
+ annotation-body-b0 ::= ("-" annotation-body-b1 | ">" annotation-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r>-] annotation-body-b0)?
49
+ annotation-body-b1 ::= ("-" annotation-body-b2 | ">" annotation-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r>-] annotation-body-b0)?
50
+ annotation-body-b2 ::= ("-" annotation-body-b2 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r>-] annotation-body-b0)?
51
+ annotation-body-ne ::= "-" annotation-body-b1 | ">" annotation-body-b0 | [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r>-] annotation-body-b0
48
52
  pattern-body-ne ::= [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r:#] [^\x00-\x08\x0B-\x0C\x0E-\x1F\x7F\n\r]*
49
53
  log-selection ::= (curation-tags-slot log-target-slot? | log-target-slot)?
50
- plan ::= "# PLAN0" "\n" section-body-ne "\n\n"
51
- find ::= "## FIND0" add-tags-slot? target-slot line-slot? "\n\n" | "## FIND0" add-tags-slot? target-slot line-slot? "\n" pattern-body-ne "\n\n"
52
- read ::= "## READ0" add-tags-slot? target-slot text-line-slot? "\n\n" | "## READ0" add-tags-slot? target-slot text-line-slot? "\n" pattern-body-ne "\n\n"
53
- edit ::= "## EDIT0" add-tags-slot? target-slot text-line-slot? "\n\n" | "## EDIT0" add-tags-slot? target-slot text-line-slot? "\n" section-body-ne "\n\n"
54
- copy ::= "## COPY0" add-tags-slot? target-slot text-line-slot? "\n" section-body-ne "\n\n"
55
- move ::= "## MOVE0" add-tags-slot? target-slot text-line-slot? "\n" section-body-ne "\n\n"
56
- open ::= "## OPEN0" log-selection "\n\n" | "## OPEN0" log-selection "\n" pattern-body-ne "\n\n"
57
- fold ::= "## FOLD0" log-selection "\n\n" | "## FOLD0" log-selection "\n" pattern-body-ne "\n\n"
58
- exec ::= "## EXEC0" exec-slot? target-slot? line-slot? "\n\n" | "## EXEC0" exec-slot? target-slot? line-slot? "\n" section-body-ne "\n\n"
59
- bare ::= "## BARE0" add-tags-slot? "\n" section-body-ne "\n\n"
60
- work ::= "## WORK0" branch-slot? target-slot "\n" section-body-ne "\n\n"
61
- fork ::= "## FORK0" branch-slot? target-slot "\n" section-body-ne "\n\n"
62
- kill ::= "## KILL0" kill-slot? target-slot "\n\n"
63
- send-mid ::= "## SEND0" status-mid-slot target-slot? "\n\n" | "## SEND0" status-mid-slot target-slot? "\n" section-body-ne "\n\n" | "## SEND0" target-slot? "\n\n" | "## SEND0" target-slot? "\n" section-body-ne "\n\n"
64
- send-102 ::= "## SEND0 [102]" target-slot? "\n" section-body-ne
65
- send-200 ::= "## SEND0 [200]" target-slot? "\n" section-body-ne
66
- send-202 ::= "## SEND0 [202]" target-slot? park-slot? "\n" section-body-ne
67
- send-300 ::= "## SEND0 [300]" target-slot? "\n" section-body-ne
68
- send-499 ::= "## SEND0 [499]" target-slot? "\n" section-body-ne
69
- send-final-any ::= send-102 | send-200 | send-202 | send-300 | send-499
70
- send-final-first ::= send-200 | send-202 | send-300 | send-499
54
+ 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? annotation-slot? "\n" section-body-ne "\n"
59
+ move ::= "## MOVE0" add-tags-slot? target-slot text-line-slot? annotation-slot? "\n" section-body-ne "\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
72
+ send-final-any ::= send-102 | send-200 | send-202 | send-499
73
+ send-final-first ::= send-200 | send-202 | send-499
71
74
  op-statement ::= find | read | edit | copy | move | open | fold | exec | bare | work | fork | kill
72
75
  tail-0 ::= send-mid tail-1 | op-statement tail-1 | send-final-first
73
76
  tail-1 ::= send-mid tail-2 | op-statement tail-2 | send-final-any
@@ -126,10 +129,11 @@ branch-slot ::= " " branch
126
129
  kill-slot ::= " " kill-sig
127
130
  status-mid-slot ::= " [" status-mid "]"
128
131
  park-slot ::= " " park
132
+ annotation-slot ::= " <!-- " annotation-body-ne " -->"
129
133
  status-mid ::= [05-9] [0-9] [0-9] | "1" status-mid-1 | "2" status-mid-2 | "3" status-mid-3 | "4" status-mid-4
130
134
  status-mid-1 ::= "0" [0-13-9] | [1-9] [0-9]
131
135
  status-mid-2 ::= "0" [13-9] | [1-9] [0-9]
132
- status-mid-3 ::= "0" [1-9] | [1-9] [0-9]
136
+ status-mid-3 ::= "0" [0-9] | [1-9] [0-9]
133
137
  status-mid-4 ::= "9" [0-8] | [0-8] [0-9]
134
138
  add-tags ::= "[" add-tag add-tag-rest* "]"
135
139
  curation-tags ::= "[" curation-term curation-term-rest* "]"