@plurnk/plurnk-contracts 1.6.0 → 1.6.1

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 CHANGED
@@ -136,7 +136,6 @@ The complete package build emits both rails; they are not source-controlled. Sou
136
136
  differential tests serialize the owning generator directly, while installation
137
137
  coverage verifies the packed export.
138
138
 
139
-
140
139
  The rails share one turn shape but begin at their respective sampled-token
141
140
  boundaries:
142
141
 
@@ -401,7 +400,6 @@ each landed textual create or update carries the same bounded receipt used by
401
400
  EDIT. Whole-channel transfers remain bodyless structural effects; runtime
402
401
  owners reject binary markers rather than treating a text field as a byte lane.
403
402
 
404
-
405
403
  Every operation returns the runtime-neutral `OperationResult` defined by
406
404
  {§operation-result}. Its `status` belongs to the result envelope and is not a
407
405
  SEND signal. Durable operation observations are projected into a later packet;
@@ -590,7 +588,7 @@ Suffix rules:
590
588
 
591
589
  Example — a lane-0 turn stored inside a lane-2 EDIT body:
592
590
 
593
- ```
591
+ ```plurnk
594
592
  # PLAN2
595
593
  Store the quoted turn.
596
594
 
@@ -872,7 +870,7 @@ scope, or other persistence columns.
872
870
  | `contentOffset` | Actual Unicode-code-point offset of `content`; zero for a full read and capped at `contentLength` |
873
871
  | `contentLength` | Unicode-code-point length of the complete stored channel |
874
872
  | `mimetype` | Stored channel mimetype |
875
- | `tokens` | Stored token count for the complete channel |
873
+ | `weight` | Stored model-independent curation weight for the complete channel |
876
874
  | `state` | `static`, `active`, `closed`, or `errored` |
877
875
 
878
876
  For every returned channel,
@@ -1008,8 +1006,8 @@ turn-shape imperatives (begin with `# PLAN0`, end with a terminal
1008
1006
  - §signal-scope-redirect **EXEC scope in the signal slot.** When EXEC's
1009
1007
  `[signal]` slot (executor-ident mode) hits a leading `-` or digit —
1010
1008
  mark-shaped `<timeout, poll>` scope content mistyped into the brackets — the
1011
- lexer message becomes `timeout/poll ride the \`<scope>\` slot; try
1012
- \`## EXEC0 <-1,300>\`` instead of a raw `unrecognized character`. The redirect is
1009
+ lexer message becomes timeout/poll ride the `<scope>` slot; try
1010
+ `## EXEC0 <-1,300>`” instead of a raw `unrecognized character`. The redirect is
1013
1011
  EXEC-scoped because its signal mode is exclusive; SEND/KILL are untouched.
1014
1012
  - §matcher-body-redirect **Matcher body in the slot region.** When the
1015
1013
  post-target header region begins with `$`, `~`, or `@`, the lexer redirects
@@ -59,7 +59,7 @@
59
59
  "contentOffset",
60
60
  "contentLength",
61
61
  "mimetype",
62
- "tokens",
62
+ "weight",
63
63
  "state"
64
64
  ],
65
65
  "additionalProperties": false,
@@ -79,7 +79,7 @@
79
79
  "type": "string",
80
80
  "minLength": 1
81
81
  },
82
- "tokens": {
82
+ "weight": {
83
83
  "type": "integer",
84
84
  "minimum": 0,
85
85
  "maximum": 9007199254740991
@@ -5,7 +5,7 @@ const canonicalName = (term, prefix) => {
5
5
  if (name.length === 0
6
6
  || name.startsWith("+")
7
7
  || name.startsWith("-")
8
- || /[\[\],\s\p{Cc}]/u.test(name)) {
8
+ || /[[\],\s\p{Cc}]/u.test(name)) {
9
9
  throw new InvalidTagSignalError(`invalid log tag term '${term}'`);
10
10
  }
11
11
  return name;
@@ -1 +1 @@
1
- {"version":3,"file":"TagSignal.js","sourceRoot":"","sources":["../../src/TagSignal.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,qBAAsB,SAAQ,SAAS;CAAG;AAYvD,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,MAAsB,EAAU,EAAE;IACnE,MAAM,IAAI,GAAG,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAClD,IACI,IAAI,CAAC,MAAM,KAAK,CAAC;WACd,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;WACpB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;WACpB,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAClC,CAAC;Q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B,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC;YAChB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;SACzB,CAAC;QACF,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QACvE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,qBAAqB,CAAC,qDAAqD,QAAQ,GAAG,CAAC,CAAC;QACtG,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ"}
@@ -306,7 +306,7 @@ export interface ClientEntryChannel {
306
306
  contentOffset: number;
307
307
  contentLength: number;
308
308
  mimetype: string;
309
- tokens: number;
309
+ weight: number;
310
310
  state: ("static" | "active" | "closed" | "errored");
311
311
  }
312
312
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-contracts",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Canonical PLURNK language, schemas, generated types, parser, rails, and runtime-neutral wire contracts",
5
5
  "keywords": [
6
6
  "plurnk",
package/plurnk.md CHANGED
@@ -22,7 +22,7 @@ new reasoning conclusions, open inquiries, unresolved priorities
22
22
  body?
23
23
  ```
24
24
 
25
- PLAN persists **new** reasoning conclusions, open inquiries, and unresolved priorities.
25
+ Each PLAN updates the running state with new or revised reasoning conclusions, open inquiries, and unresolved priorities.
26
26
  PLAN begins the turn as H1. Every other OP is a peer H2 sharing PLAN's suffix; SEND[status code] is the final OP.
27
27
  Nested OP headings in body content use a suffix different from the containing turn.
28
28
  A single blank line between sections is optional and is not body content; additional blank lines are body content.
@@ -32,7 +32,7 @@ Body content is character-perfect, including whitespace.
32
32
 
33
33
  | OP | purpose | `[signal]` | `(path)` | `<scope>` | `body` |
34
34
  |------|--------------------------------|--------------|----------------------------|----------------|-----------------------------|
35
- | PLAN | persist working-state deltas | - | - | - | conclusions, inquiries, priorities |
35
+ | PLAN | persist working-state deltas | - | - | - | new conclusions, inquiries, priorities |
36
36
  | FIND | list matching targets | add log tags? | target or glob | result range? | pattern? |
37
37
  | READ | retrieve target content | add log tags? | target | text region? | - |
38
38
  | EDIT | create or edit scoped content | add log tags? | file or entry | text region? | literal text |