@lokascript/planner 4.2.0 → 4.4.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 (2) hide show
  1. package/CHANGELOG.md +126 -1
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,129 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.4.0] - 2026-10-10
11
+
12
+ Translations now read as their language. In 4.3.0, 19% of the corpus's translations and 24% of the
13
+ command-shape scripts' translations kept at least one English word, and a third of the corpus kept an
14
+ English event name. Counting only the English a recorded decision does not keep (type names, `url`,
15
+ `debounced at`, …), every one of the 23 languages is now at or under 5% of corpus renders (0.7–4.6%)
16
+ and 10% of command-shape renders (3.9–6.2%), and no translation writes an English event name its
17
+ language has a word for. The words are the owner's vocabulary sheet
18
+ (`docs-internal/multilingual/VOCABULARY_SHEET.md`), decided 2026-10-08.
19
+
20
+ ### Added
21
+
22
+ - **`@hyperfixi/testing-framework`: the English left in a translation is gated.** `english-leaks.ts`
23
+ counts, per render, the English grammar words (the tokens the engine's own parser matched in the
24
+ source), English event names the language's lexicon has a word for, and a nominative `me` beside a
25
+ marker in the 13 languages where that case is wrong. Two shrink-only baselines (the corpus, in
26
+ `test:canonical`, and the command-shape cases, in their shards); `tools/regen-english-leaks-baseline.ts
27
+ --report` prints each language against M2's targets. An English alternative a profile keeps for
28
+ code-switched input, beside a primary that is the language's own, counts as English.
29
+ - **`@lokascript/semantic`: `transition … from … to`** reads and writes in every language (a `source`
30
+ role), and the bare command reads in English. The schema's `destination` role is gone: upstream has
31
+ none, and SOV destination markers read an owned property's owner as an element (tr and qu swapped
32
+ `#foo's *width` silently). English writes `using` for an easing.
33
+ - **`@lokascript/semantic`: `add/remove/hide/show … when <condition>`** in every language, through a
34
+ `condition` role marked with each profile's `when`. It was English in every translation, and refused
35
+ as a bare command.
36
+
37
+ ### Changed
38
+
39
+ - **`@lokascript/semantic` writes each language's own words** for: loop heads (`repeat for x in`,
40
+ `while`, `until`; es `repetir para x en .items`), `I match` / `I am` (written as the third person, and
41
+ back in English as upstream's first person), `does not match`, `fetch … do not throw`, `on first`,
42
+ `go back`, `from elsewhere`, a loop's `index`, `start view transition`, a query's `in`, a conversion's
43
+ `as` (the type name stays English), `the X of Y` inside an expression (es `valor de #price`, ja
44
+ `#priceの値`), `catch` and `finally`, `element x`, and `def` (as the noun "function", es `función
45
+ greet(name)`). bn, th and vi have their own `document` and `window`; he has its own words for all of
46
+ these and for `matches`, `exists`, `or`, `not`, `first`, `next`, `previous`, `closest`, `empty`, `is`,
47
+ `document` and `window`; and the 15 languages that wrote English `forever` have their own (es
48
+ `repetir siempre`, de `endlos`, ja `ずっと`). Every reader still takes the English words. Where a word
49
+ would read back as another (es `en` is also a marker), the translation keeps English's.
50
+ - **`@lokascript/semantic` writes native event names** in he, hi, it, pl, qu, ru, th, uk and vi where
51
+ the lexicon's word reads back; the rest are denylisted with their reasons.
52
+ - **`@lokascript/semantic`: a foreign `put X at start of Y` is written with the language's `prepend`**,
53
+ which English writes back as `put … at start of`.
54
+
55
+ ### Fixed
56
+
57
+ - **`@lokascript/semantic` reads `me` after a marker in the case the marker takes**, as authors write it:
58
+ de `zu mir`, pt `a mim`, pl `do mnie`, ru `ко мне`, uk `до мене`, hi `मुझ में`. Each was read as a
59
+ variable (`zu mir` ran as `to mir`) or refused. Translations still write the nominative.
60
+
61
+ - **`@lokascript/semantic`: `put X at start of Y` translates.** It was refused in all 23 languages: no
62
+ language but English had a pattern for it, and the render wrote `at end of` in its place.
63
+ - **`@lokascript/semantic`: a one-line handler's `put … at end of`** translates in es, id, it, pt, tl and
64
+ uk. The fused handler pattern took the end noun for the destination wherever the language's `at` word
65
+ is also a destination marker.
66
+ - **`@lokascript/semantic`: `^x is …` keeps its copula** in ar, hi and th, which read the `is` word after a
67
+ `^` variable as the pronoun `it`.
68
+ - **`@lokascript/semantic`: an SOV loop body may open with a variable named `index`** (ja `index を …`),
69
+ and `repeat` is never read as an event name.
70
+
71
+ ## [4.3.0] - 2026-10-07
72
+
73
+ More of what upstream reads now translates, and what does not is refused instead of lost. On the
74
+ command-shape gate, round trips that came back silently different fell from 174 in 4.2.0 to 31,
75
+ none of them in English; 24,386 of 27,240 now read as their source does. English-to-English refuses
76
+ 61 of the 1,135 scripts, down from 82, and each of the 61 now belongs to a named family with the
77
+ reason it is not carried yet.
78
+
79
+ ### Added
80
+
81
+ - **`@lokascript/semantic` reads `on every <event>` and `init immediately`.** Both lost their head
82
+ word, so the handler or the block was refused. `EventHandlerSemanticNode.eventModifiers.every` and
83
+ `FeatureSemanticNode.immediately` carry them. English writes them as upstream does; every other
84
+ language writes the English word first (`every al clic …`), as it already did for `on first`.
85
+ - **`@hyperfixi/testing-framework`: two new value-matrix axes.** A `branch` position is an `if` with
86
+ no `then` before a command that names no target (`if 2 is in arr add .a end`). The matrix's `if`
87
+ cells always wrote `then` and a `put` with its target, so an SOV reader always saw where the
88
+ condition ended, and none of them could fail the way Turkish did (see Fixed). The 610 pairs that
89
+ `branch` refuses are listed in the baseline. A twelfth operand kind is a CSS length (`100px`,
90
+ `50%`). The matrix now has 5,396 cells.
91
+
92
+ ### Changed
93
+
94
+ - **`@lokascript/semantic` refuses core's swap strategies that upstream has no spelling for.**
95
+ `translate()` gains a loss kind, `'core-only'` (`TranslationLossKind`). Upstream and the engine
96
+ read `swap morph of #t with it` as an exchange with a property named `morph`, so core's morph
97
+ strategies, `none`, and a strategy with no content are now refused in every language. Before,
98
+ English wrote them as they were read. Core's `swap into #t with x` and `swap over #t with x` are its
99
+ innerHTML and outerHTML, and they are now written as `put x into #t` and `put x into #t's
100
+ outerHTML`. Before, English wrote `swap into of #t with x`, which runs as an exchange.
101
+ - **`@lokascript/semantic` writes a word in the target language only where that language's reader
102
+ brings it back.** A property name is localized only through the reader's property table or as a
103
+ keyword. So `add .foo to my children` keeps `children` in Spanish (`mi children`), where it wrote
104
+ `mi hijos` and read back a property named `hijos`. A call's arguments are written as written
105
+ (`call sprayInto(me)` wrote `sprayInto(yo)`). So is every bracket group inside an expression:
106
+ `2 is in [true, n]` wrote `[verdadero, n]` in Spanish, a variable no reader de-localizes. And so is a
107
+ type name after `am a`. These spots now show English words in foreign renders where they used to
108
+ show words that did not come back.
109
+ - **`@lokascript/semantic`: `innerHTML` and `outerHTML` are no longer English keywords.** A swap's
110
+ strategy slot still reads them, as words.
111
+
112
+ ### Fixed
113
+
114
+ - **`@lokascript/semantic`: Turkish keeps an `if` condition whole before a command with no target.**
115
+ `if 2 is in arr add .a end` read back as `if 2 add .a to is in arr end`, with any operand, and so
116
+ did `is a Number` and `<` after a possessive. Turkish case markers may be dropped, and the marker
117
+ test counted a marker word anywhere in the value: `in` (also the operator), `a` (also the article),
118
+ `nin` (also the possessive). The marker must now be the last token of its group.
119
+ - **`@lokascript/semantic`: a number with a CSS unit is one value.** Upstream reads `100px`,
120
+ `1.5rem` and `50%` as one string. Every tokenizer split them, so `set my *width to 100px` and
121
+ `transition height to 100px` were refused in all 24 languages. A `%` that an operand touches
122
+ (`5%2`) or that is spaced still reads as the operator.
123
+ - **`@lokascript/semantic`: more English forms that were refused in every language now read.**
124
+ `set innerHTML of #d1 to …` and `increment innerHTML of #d1`; a single-quoted string that holds a
125
+ `"` (`set #t to '<div _="…">'`), which was written back in double quotes and so closed early;
126
+ `fetch … don't throw`; `put … at the start of` / `at the end of`, where the `end` closed the
127
+ handler; `remove 3 from :arr` and `remove {color} from me`; `otherwise` as `else`. In a translation
128
+ of an empty then-branch's `otherwise`, 13 languages wrote their own word for it inside the
129
+ condition and read it back there, silently.
130
+ - **`@lokascript/semantic`: a handler's `catch` and `finally` bodies are written in upstream's
131
+ spelling.** `catch e prepend …` kept core's `prepend`, which the engine rejects.
132
+
10
133
  ## [4.2.0] - 2026-10-07
11
134
 
12
135
  A translation that would lose part of a script is now refused instead of returned short.
@@ -1423,7 +1546,9 @@ _Synchronized version release. See git history for details._
1423
1546
  - npm access token stored in GitHub Secrets
1424
1547
  - 2FA recommended for npm organization
1425
1548
 
1426
- [Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v4.2.0...HEAD
1549
+ [Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v4.4.0...HEAD
1550
+ [4.4.0]: https://github.com/codetalcott/hyperfixi/compare/v4.3.0...v4.4.0
1551
+ [4.3.0]: https://github.com/codetalcott/hyperfixi/compare/v4.2.0...v4.3.0
1427
1552
  [4.2.0]: https://github.com/codetalcott/hyperfixi/compare/v4.1.0...v4.2.0
1428
1553
  [4.1.0]: https://github.com/codetalcott/hyperfixi/compare/v4.0.1...v4.1.0
1429
1554
  [4.0.1]: https://github.com/codetalcott/hyperfixi/compare/v4.0.0...v4.0.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokascript/planner",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "description": "BFS planner over affordance graphs — cost-aware planning with preconditions, effects, and template parameters",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",