@plurnk/plurnk-contracts 4.0.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SPEC.md +39 -38
- package/dist/schema/PlurnkStatement.json +1 -1
- package/dist/src/Functionality.d.ts +1 -0
- package/dist/src/Functionality.d.ts.map +1 -1
- package/dist/src/types.generated.d.ts +1 -1
- package/package.json +2 -2
- package/plurnk.md +36 -41
package/SPEC.md
CHANGED
|
@@ -291,7 +291,7 @@ rule.
|
|
|
291
291
|
|
|
292
292
|
§balanced-fences A complete nested interpretation takes precedence over missing-closer
|
|
293
293
|
recovery. Within a body, a line-leading labeled fence opens a literal block, and an equal or
|
|
294
|
-
wider bare fence nests
|
|
294
|
+
wider bare fence nests unless closing there costs the reading less
|
|
295
295
|
({§fence-pairing}). A nested block ends at its first valid closer, as a CommonMark code block
|
|
296
296
|
does. So a wider outer fence holds any narrower body, finished or not, and equal widths nest
|
|
297
297
|
when every inner block closes. Preserve every nested body byte, including apparent operations
|
|
@@ -409,13 +409,18 @@ repaired reading: a complete nested interpretation takes precedence. Each class
|
|
|
409
409
|
|
|
410
410
|
| Counted | Complete readings | Repaired readings | Why |
|
|
411
411
|
|---|---|---|---|
|
|
412
|
-
| Hidden operations: a heading that will not run, written at its block's width or wider | 1, together with
|
|
413
|
-
| Repairs: a supplied closer (except a message's run to the end of the input, {§message-run-on}), a fence read as a stray, a narrower closer accepted, a body under an operation that takes none (
|
|
414
|
-
| Literal by declaration: a heading narrower than its block, or no wider than the labeled block or example holding it, or inside a quotation or a KILL, or an executor heading inside a SEND, WORK, FORK or BARE body ({§prose-code-blocks})
|
|
412
|
+
| Hidden operations: a heading that will not run, written at its block's width or wider | 1, together with discarded code | 1 | Every operation the author wrote should run |
|
|
413
|
+
| Repairs: a supplied closer (except a message's run to the end of the input, {§message-run-on}), a fence read as a stray, a narrower closer accepted, a body under an operation that takes none (COPY, MOVE, non-log targeted KILL), a body not well-formed in the media type its runtime declares ({§executor-invocation}) | none by definition | 2 | The least-errors distance |
|
|
414
|
+
| Literal by declaration: a heading narrower than its block, or no wider than the labeled block or example holding it, or inside a quotation or a KILL, or an executor heading shown as a code block inside a SEND, WORK, FORK or BARE body ({§prose-code-blocks}) | none: the author's enclosure wrote it as an example | 3, together with the row below | A heading the author wrapped is the example it was written as |
|
|
415
|
+
| Discarded code: a labeled fence in a body read as text, or such an executor heading read as text | 1, together with hidden operations | 3, together with the row above | Every code block the author declared should stand |
|
|
415
416
|
| Supplied closers | 2 | 4 | A block the author opened should end at a fence the author wrote |
|
|
416
417
|
| Other fences read as text | 3 | 5 | The least departure from the fences as written |
|
|
417
418
|
|
|
418
|
-
Complete readings compare
|
|
419
|
+
Complete readings compare as a single least-errors order over departures from the fences as written,
|
|
420
|
+
and a heading the author enclosed in a wider or labeled fence is the example it was written as, not a
|
|
421
|
+
departure. So a message whose own fence is narrower than the fences wrapping its examples still holds
|
|
422
|
+
them: the reading that lets a wrapper close the message and runs the examples ties on cost and loses on
|
|
423
|
+
preference, since a body nests before it closes ({§balanced-fences}). Once every reading of an
|
|
419
424
|
emission needs a repair, its shape is already broken, and saving a repair is not worth an operation
|
|
420
425
|
the author wrote: across the corpus, readings that traded operations for repairs held a WORK in a
|
|
421
426
|
BARE behind two stray fences, wrote 11,485 characters of operation text into a file as an EDIT
|
|
@@ -747,8 +752,7 @@ matcher." ({§diagnostic-observation}).
|
|
|
747
752
|
§operation-aside The final header modifier may be one single-line HTML
|
|
748
753
|
comment. AstBuilder removes its delimiters and surrounding whitespace into
|
|
749
754
|
`aside: string | null`. It is durable descriptive text, not authority,
|
|
750
|
-
routing, timing, or body input. Comments inside a body remain literal
|
|
751
|
-
for the narrowly owned {§misplaced-aside-advisory}.
|
|
755
|
+
routing, timing, or body input. Comments inside a body remain literal.
|
|
752
756
|
|
|
753
757
|
§scheme-metadata-modifier A target may carry one single-line `[metadata]`
|
|
754
758
|
block, placed under {§slot-order}; executor and SEND fences also admit it without a target.
|
|
@@ -786,13 +790,10 @@ the owner verbatim, and the owner's reader treats `pattern` as reserved. The
|
|
|
786
790
|
language lifts only from one block that parses as a JSON array of objects;
|
|
787
791
|
anything else lifts nothing and reaches the owner's `400` untouched. A
|
|
788
792
|
`pattern` that is present but not a string is the language's own positioned
|
|
789
|
-
diagnostic, as is a matcher of a claimed dialect that fails admission. FIND
|
|
790
|
-
READ
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
matcher, and it never strikes ({§matcher-body-redirect}). The heading line itself
|
|
794
|
-
is the matcher's home ({§naked-pattern}). A body that is only an HTML comment is
|
|
795
|
-
still the aside under {§misplaced-aside-advisory}. EDIT keeps its literal body:
|
|
793
|
+
diagnostic, as is a matcher of a claimed dialect that fails admission. FIND and
|
|
794
|
+
READ bodies become memory under {§retrieval-annotation}; a non-log KILL's body is
|
|
795
|
+
unused and receives the advisory under {§matcher-body-redirect}. The heading line
|
|
796
|
+
is the matcher's home ({§naked-pattern}). EDIT keeps its literal body:
|
|
796
797
|
with a matcher it is the replacement for every selected span ({§edit-pattern}),
|
|
797
798
|
and an absent body deletes them. `PlurnkParser.stringify` writes a lifted matcher
|
|
798
799
|
whose block left no metadata back bare when the bare form reads back identically
|
|
@@ -817,8 +818,8 @@ governed by {§canonical-statement}; runtime conditions remain explicit below.
|
|
|
817
818
|
|
|
818
819
|
| OP | `(path)` | `<scope>` | `body` |
|
|
819
820
|
|------|----------------------------------------------|---------------------------------|--------------------------------|
|
|
820
|
-
| FIND | required target or glob | optional result range |
|
|
821
|
-
| READ | required target | optional text region |
|
|
821
|
+
| FIND | required target or glob | optional result range | annotation normalized to NOTE |
|
|
822
|
+
| READ | required target | optional text region | annotation normalized to NOTE |
|
|
822
823
|
| EDIT | required file or entry | required for an existing target | literal text |
|
|
823
824
|
| COPY | required source and destination | optional region after each path | empty |
|
|
824
825
|
| MOVE | required source and destination | optional region after each path | empty |
|
|
@@ -831,11 +832,23 @@ governed by {§canonical-statement}; runtime conditions remain explicit below.
|
|
|
831
832
|
| NOTE | none | none | literal working memory |
|
|
832
833
|
| WAIT | optional label ({§send-wait-scope}) | none; duration is `[seconds]` metadata | explanation of the wait |
|
|
833
834
|
|
|
835
|
+
§retrieval-annotation **A retrieval's authored body is memory, not selection or output.**
|
|
836
|
+
A nonblank body beneath FIND or READ becomes one ordinary NOTE immediately before
|
|
837
|
+
the retrieval, including a body consisting of a pattern or an HTML comment. A
|
|
838
|
+
grouped READ contributes one NOTE before its expanded statements. The retrieval
|
|
839
|
+
itself has no body; its selector comes only from its header. Normalization is the
|
|
840
|
+
same in content and exposed reasoning and never executes quoted body text. The
|
|
841
|
+
canonical rendering is NOTE followed by bodyless retrieval; exact submitted text
|
|
842
|
+
remains source evidence. The NOTE persists independently of retrieval success and
|
|
843
|
+
is curated normally. Explicit NOTE remains the taught form.
|
|
844
|
+
|
|
834
845
|
§note-value NOTE retains its literal body as ordinary model-owned working memory.
|
|
835
846
|
It has no target, scope, metadata, or lifecycle effect. Its full body participates
|
|
836
847
|
in ordinary log token accounting and model-driven curation; prior notes are not
|
|
837
|
-
automatically hidden. A
|
|
838
|
-
|
|
848
|
+
automatically hidden. A continuing or parked turn that carried no NOTE is told so in
|
|
849
|
+
the next packet ({§continued-without-note}); the omission is never a failure. A
|
|
850
|
+
NOTE-only turn does not request completion; ordinary repetition and strike rules
|
|
851
|
+
still apply.
|
|
839
852
|
|
|
840
853
|
§reasoning-operations The shared fence parser admits complete, line-leading NOTE,
|
|
841
854
|
FIND and READ statements from exposed provider reasoning. Admission is part of
|
|
@@ -1779,7 +1792,7 @@ not infer it from diagnostic wording. It does not independently prescribe a stri
|
|
|
1779
1792
|
§parse-recovery **Every hard diagnostic carries its working form.** A `severity: "error"`
|
|
1780
1793
|
diagnostic names, in `recovery`, the form of the construct it refused, in the model's terms: a
|
|
1781
1794
|
refused heading carries the operation's canonical line (`` `READ (path) <L,M>? pattern? <!-- aside -->?`
|
|
1782
|
-
on the opening fence line
|
|
1795
|
+
on the opening fence line. ``), a refused scope the scope's form, and a refused
|
|
1783
1796
|
matcher its dialect's form with an example (`` A pattern is a regex written `/pattern/flags`, such
|
|
1784
1797
|
as `/timeout/i`. ``). The working form is the language's, never a reconstruction of the input
|
|
1785
1798
|
({§diagnostic-observation}). The runtime projects `recovery` as the Problem's `recovery` beside the
|
|
@@ -1868,7 +1881,7 @@ diagnostics are:
|
|
|
1868
1881
|
that already names a channel keeps such a token as its pattern. Those
|
|
1869
1882
|
matchers remain independent of owner options: a block without `pattern` never
|
|
1870
1883
|
erases the heading matcher, and invalid blocks still reach the owning validator.
|
|
1871
|
-
|
|
1884
|
+
Their heading-line text owns selection independently of annotation or distillation bodies. On EDIT only
|
|
1872
1885
|
a sigil lifts, because plain heading-line text is the replacement body it always
|
|
1873
1886
|
was; the lines beneath the heading are then the replacement, and none deletes each
|
|
1874
1887
|
match ({§edit-pattern}). A trailing `<!-- aside -->` on the same line stays the
|
|
@@ -1929,15 +1942,12 @@ diagnostics are:
|
|
|
1929
1942
|
body instead, the anchor would be written into the file, or the EDIT refused for want of a line
|
|
1930
1943
|
marker (14 distinct recorded headings). On READ and KILL the same text stays a literal matcher,
|
|
1931
1944
|
since `@patch` is a search a model means.
|
|
1932
|
-
- §matcher-body-redirect **Unread
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
{§
|
|
1938
|
-
One sigil line beneath a bodyless heading is the bare form written a line low and still lifts;
|
|
1939
|
-
nothing else is promoted into a matcher from below the heading. An option block's `pattern`
|
|
1940
|
-
prevents that lift, and the advisory never echoes the discarded text.
|
|
1945
|
+
- §matcher-body-redirect **Unread selector text.** An option block's `pattern` owns the
|
|
1946
|
+
selector; surplus heading text is unused with one warning naming its location.
|
|
1947
|
+
A non-log KILL's body is likewise unused: `This KILL takes no body; line 2 was not used.`
|
|
1948
|
+
Neither warning echoes discarded text. No operation recovers a matcher from below
|
|
1949
|
+
its header. READ/FIND bodies follow {§retrieval-annotation}; log KILL bodies follow
|
|
1950
|
+
{§log-kill-distillation}.
|
|
1941
1951
|
- §combined-anchor-tolerance **Combined line number and anchor in a scope.** A
|
|
1942
1952
|
text-coordinate scope written `L<@hash>` — digits immediately before the opener — is the
|
|
1943
1953
|
displayed `42<@abcde>` row prefix copied whole: the scope is the anchor, the number is dropped, and one
|
|
@@ -1953,15 +1963,6 @@ diagnostics are:
|
|
|
1953
1963
|
states the anchor rule instead, with the scope marked: `` every line anchor carries
|
|
1954
1964
|
its `@`: `<@abcde,@fghij>` ``. Spacing and boundary-loss diagnostics retain their own
|
|
1955
1965
|
contracts.
|
|
1956
|
-
- §misplaced-aside-advisory **Aside in the body.** A READ or FIND whose
|
|
1957
|
-
body is solely an HTML comment (`<!-- … -->`) can never carry a matcher: it is
|
|
1958
|
-
the aside the model put on the line below the heading. The builder takes
|
|
1959
|
-
the comment as the aside when the heading has none, builds the operation
|
|
1960
|
-
with no body, and raises one warning-severity advisory stating that observed
|
|
1961
|
-
normalization; the parser places the advisory right after its statement and
|
|
1962
|
-
the service delivers it as a `parse_advisory` notice with its position. A body
|
|
1963
|
-
with any other content is ignored under the same advisory path
|
|
1964
|
-
({§matcher-body-redirect}).
|
|
1965
1966
|
|
|
1966
1967
|
§error-shape The diagnostic class determines the parts of a message; every class says what
|
|
1967
1968
|
happened, never why ({§diagnostic-observation}). Advisories belong to one successfully built statement. A rejected
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
},
|
|
154
154
|
"body": {
|
|
155
155
|
"type": "null",
|
|
156
|
-
"description": "
|
|
156
|
+
"description": "Retrieval bodies normalize to separate NOTE statements; selection belongs to the header ({§retrieval-annotation})."
|
|
157
157
|
},
|
|
158
158
|
"position": {
|
|
159
159
|
"$ref": "#/$defs/PositionRef"
|
|
@@ -58,6 +58,7 @@ export interface FunctionalityPrepared<Runtime = never> {
|
|
|
58
58
|
readonly documents: readonly FunctionalityDocument[];
|
|
59
59
|
readonly outcomes: ReadonlyMap<string, FunctionalityOutcome>;
|
|
60
60
|
readonly snapshot: unknown;
|
|
61
|
+
publish(): (() => void) | undefined;
|
|
61
62
|
commit(): Promise<void>;
|
|
62
63
|
abort(): Promise<void>;
|
|
63
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Functionality.d.ts","sourceRoot":"","sources":["../../src/Functionality.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEtG,MAAM,WAAW,2BAA2B;IACxC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAChC;AAKD,MAAM,WAAW,qBAAsB,SAAQ,2BAA2B;IACtE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACnD;AAGD,MAAM,MAAM,0BAA0B,GAAG,MAAM,0BAA0B,CAAC;AAI1E,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEzD,MAAM,WAAW,6BAA6B;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,sBAAuB,SAAQ,6BAA6B;IAEzE,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAClC;AAID,MAAM,WAAW,8BAA+B,SAAQ,6BAA6B;IACjF,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,UAAU,CAAC,EAAE,uBAAuB,CAAC;IAE9C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,+BAA+B;IAC5C,Q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,SAAS,OAAO,EAAE,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,SAAS,qBAAqB,EAAE,CAAC;IACrD,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAC7D,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAI3B,OAAO,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAGpC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAExB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAMD,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AAK9D,MAAM,WAAW,yBAAyB;IACtC,MAAM,CACF,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,EAC/E,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,qBAAqB,GAChC,OAAO,CAAC;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAGhE,OAAO,CACH,QAAQ,EAAE,2BAA2B,EACrC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,uBAAuB,CAAC;QAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,GACpF,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB"}
|
|
@@ -228,7 +228,7 @@ export interface FindStatement {
|
|
|
228
228
|
*/
|
|
229
229
|
matcher: (MatcherBody | null);
|
|
230
230
|
/**
|
|
231
|
-
*
|
|
231
|
+
* Retrieval bodies normalize to separate NOTE statements; selection belongs to the header ({§retrieval-annotation}).
|
|
232
232
|
*/
|
|
233
233
|
body: null;
|
|
234
234
|
position: Position;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-contracts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Canonical PLURNK language contract, schemas, generated types, and runtime-neutral wire contracts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plurnk",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"json-schema-to-typescript": "^16.0.0"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "c75c4bc760db609905a8a0932bd1f50bb4d8886c"
|
|
76
76
|
}
|
package/plurnk.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Plurnk Operation Protocol
|
|
2
2
|
|
|
3
3
|
> [!IMPORTANT]
|
|
4
|
-
> YOU MUST ONLY emit fenced
|
|
4
|
+
> YOU MUST ONLY emit fenced operation batches; with the parameters, pattern, and terse aside on the fenced operation line. No tool calls.
|
|
5
5
|
|
|
6
6
|
## Syntax
|
|
7
7
|
|
|
@@ -9,9 +9,12 @@
|
|
|
9
9
|
body?
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
+
> [!TIP]
|
|
13
|
+
> You may use more than three backticks in your opening and closing outer fences to wrap, nest, and disambiguate.
|
|
14
|
+
|
|
12
15
|
## Core Operations
|
|
13
16
|
|
|
14
|
-
* NOTE:
|
|
17
|
+
* NOTE: Working memory. Save all new facts, ideas, and plans for later turns.
|
|
15
18
|
* FIND: List matching paths, or the match locations inside one path.
|
|
16
19
|
* READ: Read files, entries, streams, or only the lines a pattern selects.
|
|
17
20
|
* EDIT: Create a file or entry; replace existing text by scope or by pattern.
|
|
@@ -25,32 +28,28 @@ body?
|
|
|
25
28
|
|
|
26
29
|
## Loop Protocol
|
|
27
30
|
|
|
28
|
-
> [!
|
|
29
|
-
> YOU
|
|
30
|
-
|
|
31
|
-
```NOTE <!-- plan -->
|
|
32
|
-
the steps ahead and why
|
|
33
|
-
```
|
|
31
|
+
> [!IMPORTANT]
|
|
32
|
+
> YOU MUST persist all new facts, ideas, and plans in NOTEs on every turn.
|
|
34
33
|
|
|
35
|
-
```NOTE <!--
|
|
36
|
-
a finding and its evidence
|
|
34
|
+
```NOTE <!-- fact -->
|
|
35
|
+
a finding or conclusion and its evidence
|
|
37
36
|
```
|
|
38
37
|
|
|
39
|
-
```NOTE <!--
|
|
40
|
-
a decision and
|
|
38
|
+
```NOTE <!-- idea -->
|
|
39
|
+
a thought, working theory, or decision, and why
|
|
41
40
|
```
|
|
42
41
|
|
|
43
|
-
```NOTE <!--
|
|
44
|
-
the
|
|
42
|
+
```NOTE <!-- plan -->
|
|
43
|
+
the steps ahead and why
|
|
45
44
|
```
|
|
46
45
|
|
|
47
|
-
|
|
46
|
+
````SEND
|
|
48
47
|
a continuing progress update response
|
|
49
|
-
|
|
48
|
+
````
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
````SEND [200]
|
|
52
51
|
a final deliverable response
|
|
53
|
-
|
|
52
|
+
````
|
|
54
53
|
|
|
55
54
|
> [!CAUTION]
|
|
56
55
|
> The loop continues until all Open Messages receive a `[200]` or `[499]` response and all Open Work is completed.
|
|
@@ -72,38 +71,40 @@ Describe the child's complete task in the body.
|
|
|
72
71
|
| `&` | graph (treesitter symbols) | `&sym`, `&<sym`, `&>sym` |
|
|
73
72
|
| none | literal or glob/extglob | `?(export )?(async )function *` |
|
|
74
73
|
|
|
74
|
+
## `<scope|range>`
|
|
75
|
+
|
|
76
|
+
> [!TIP]
|
|
77
|
+
> Text scopes use 1-based lines and Unicode code-point columns across textual mimetypes:
|
|
78
|
+
|
|
79
|
+
| form | endpoint rule |
|
|
80
|
+
|-----------------|--------------------------------|
|
|
81
|
+
| `<L>`, `<@hash>` | one line |
|
|
82
|
+
| `<SL,EL>`, `<@start,@end>` | lines SL through EL, inclusive |
|
|
83
|
+
| `<SL,SC,EL,EC>` | start included, end excluded — `<@abcde,5,@abcde,8>` is `bar` in line 42 `foo bar baz` |
|
|
84
|
+
| `<L,1,L,1>`, `<@hash,1,@hash,1>` | insert before that line |
|
|
85
|
+
| `<0>`, `<-1>` | prepend / append on mutations; as an end line, `-1` is the last line |
|
|
86
|
+
|
|
75
87
|
## Workspace Navigation
|
|
76
88
|
|
|
77
|
-
```FIND (src/**/*.ts) /TODO/ <!-- paths with matches -->
|
|
89
|
+
```FIND (src/**/*.ts) <1,-1> /TODO/ <!-- paths with matches -->
|
|
78
90
|
```
|
|
79
91
|
|
|
80
|
-
```READ (src/**/*.ts) /TODO/ <!-- the matching lines in every file -->
|
|
92
|
+
```READ (src/**/*.ts) <1,-1> /TODO/ <!-- the matching lines in every file -->
|
|
81
93
|
```
|
|
82
94
|
|
|
83
95
|
```COPY (sh:///ab3d5678) (build.log) <!-- the command's output lands in a file, never in your context -->
|
|
84
96
|
```
|
|
85
97
|
|
|
86
|
-
```members (add) <!-- adding membership tracking for files outside of the project folder -->
|
|
87
|
-
{"files": ["../exampleSisterProject/*.md", "../exampleSisterProject/example.json"]}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
98
|
* `(path)` may be a glob/extglob, permitting bulk operations.
|
|
91
99
|
* Log item paths nest: `log:///1/2/3/READ` is loop/turn/item/OP.
|
|
92
100
|
* FIND results hold one inner array per path: its channels, default first; append `#channel` to the path to select another: `(sh:///ab3d5678#stderr)`.
|
|
93
101
|
* Percent-encode in paths `(` as `%28` and `)` as `%29`.
|
|
94
102
|
|
|
95
|
-
##
|
|
96
|
-
|
|
97
|
-
> [!TIP]
|
|
98
|
-
> Text scopes use 1-based lines and Unicode code-point columns across textual mimetypes:
|
|
103
|
+
## Membership (worker:///_plurnk/plurnk/members.md)
|
|
99
104
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
| `<SL,EL>`, `<@start,@end>` | lines SL through EL, inclusive |
|
|
104
|
-
| `<SL,SC,EL,EC>` | start included, end excluded — `<@abcde,5,@abcde,8>` is `bar` in line 42 `foo bar baz` |
|
|
105
|
-
| `<L,1,L,1>`, `<@hash,1,@hash,1>` | insert before that line |
|
|
106
|
-
| `<0>`, `<-1>` | prepend / append on mutations; as an end line, `-1` is the last line |
|
|
105
|
+
```members (add) <!-- adding membership tracking for files outside of the project folder -->
|
|
106
|
+
{"files": ["../exampleSisterProject/*.md", "../exampleSisterProject/example.json"]}
|
|
107
|
+
```
|
|
107
108
|
|
|
108
109
|
## Editing
|
|
109
110
|
|
|
@@ -134,12 +135,6 @@ bar
|
|
|
134
135
|
```EDIT (books.xml) //book[price > 35.00] <!-- an empty body removes each match -->
|
|
135
136
|
```
|
|
136
137
|
|
|
137
|
-
````EDIT (edit-example.md)
|
|
138
|
-
```EDIT (create-example.md)
|
|
139
|
-
Nesting can be resolved with increased outer fences.
|
|
140
|
-
```
|
|
141
|
-
````
|
|
142
|
-
|
|
143
138
|
> [!TIP]
|
|
144
139
|
> YOU SHOULD address lines by `<@hash>` or `<@start,@end>` to protect against stale targets.
|
|
145
140
|
|