@hyperfixi/server-bridge 7.3.0 → 7.5.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/CHANGELOG.md +130 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,136 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [7.5.0] - 2026-10-22
|
|
11
|
+
|
|
12
|
+
What a live test of 7.3.0 found users hitting. The Vite plugin loads in a CommonJS project and
|
|
13
|
+
ships types. MCP `diff_behaviors` compares whole handlers, and `npx` installs the engine.
|
|
14
|
+
Hand-written non-English hyperscript that ran wrong in silence now reads right or says so. A
|
|
15
|
+
minor: `@lokascript/htmx-adapter`'s `hx-on` change restores what its README always documented
|
|
16
|
+
(bodies are JavaScript by default), and a page that relied on the engine switching them adds
|
|
17
|
+
`<meta name="htmx-i18n-hx-on" content="hyperscript">`.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **`@lokascript/htmx-adapter`: `hx-on` bodies stay JavaScript unless the page opts in to
|
|
22
|
+
hyperscript bodies.** The adapter used to switch every `hx-on` body on the page to hyperscript
|
|
23
|
+
whenever a hyperscript engine (`window._hyperscript`) was loaded, and the documented stack (the
|
|
24
|
+
engine, htmx 4 and this adapter) always has one. So a plain-JavaScript
|
|
25
|
+
`hx-on:click="document.getElementById('o').textContent = 'ran'"` failed with a hyperscript parse
|
|
26
|
+
error, although the README says bodies are JavaScript by default. The opt-in is now explicit:
|
|
27
|
+
`<meta name="htmx-i18n-hx-on" content="hyperscript">`, or `setBodyExecutor()` as before. A page
|
|
28
|
+
that wrote hyperscript `hx-on` bodies and relied on the engine alone adds the `<meta>` tag. With
|
|
29
|
+
the tag and no engine on the page, the adapter warns and the bodies stay JavaScript.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- **`@hyperfixi/vite-plugin` loads in a CommonJS project.** `npm init -y` writes
|
|
34
|
+
`"type": "commonjs"`, and there the plugin's `require` build failed with
|
|
35
|
+
`ERR_PACKAGE_PATH_NOT_EXPORTED`: it requires `@hyperfixi/engine`, whose `exports` had only an
|
|
36
|
+
`import` condition. The engine's `exports` now name its ES module as the `default` too, which
|
|
37
|
+
Node 20.19+ and 22.12+ (what Vite 8 needs) can `require`.
|
|
38
|
+
- **`@hyperfixi/vite-plugin` ships types for the app side** (`@hyperfixi/vite-plugin/client`):
|
|
39
|
+
the virtual module and `window.hyperfixi` / `window._hyperscript`. A TypeScript 6 project
|
|
40
|
+
rejected `import 'hyperfixi'` (`TS2882`). The README has a TypeScript section, with JSX's
|
|
41
|
+
`data-script` and an augmentation for `_`.
|
|
42
|
+
- **The Vite plugin's scanner reads a `<script type="text/hyperscript">` block that contains
|
|
43
|
+
`<`** (`if n < 10`, a `<div/>` query). It skipped the whole block, so its commands were not
|
|
44
|
+
bundled and the page failed to parse. It also reads the `script` and `data-script` attributes,
|
|
45
|
+
which the engine runs as it runs `_`, and a production build scans Vite's `root` rather than the
|
|
46
|
+
working directory (`vite build app` from a parent directory bundled the siblings' modules).
|
|
47
|
+
- **MCP `diff_behaviors` no longer calls any two multi-command or `if` handlers identical.** It
|
|
48
|
+
compared the operations it could extract, and it extracted single commands only: a `then` chain
|
|
49
|
+
(a `compound` node), an `if`, a loop and every command it had no extractor for gave nothing, so
|
|
50
|
+
`remove .b then wait 2s` and `remove .c then wait 5s` were "No semantic change", and so were an
|
|
51
|
+
English handler and an unrelated Spanish one. It now compares every command of a chain, both
|
|
52
|
+
branches of an `if`, a loop's body, and any other command with all its written roles (a
|
|
53
|
+
`fetch`'s `with` options included), and `this` is no longer read as `me`. Faithful translations
|
|
54
|
+
still compare identical (checked on chains, branches, loops and `wait for` in ja, es and ar).
|
|
55
|
+
- **`npx @hyperfixi/mcp-server` installs the engine.** `@hyperfixi/engine`, `@hyperfixi/core` and
|
|
56
|
+
`@hyperfixi/server-bridge` were optional peers, which `npx` leaves out, so the documented
|
|
57
|
+
install checked nothing on the engine: every error only the engine catches came back `ok`, and
|
|
58
|
+
only stderr said so. They are dependencies now, and a validation whose engine check could not
|
|
59
|
+
run says so in the result (`ENGINE_CHECK_SKIPPED`, `info`; `get_diagnostics`:
|
|
60
|
+
`engine-check-skipped`). release-smoke installs the server alone and checks for the three.
|
|
61
|
+
- **Validation warns on `this`** (`THIS_IS_NOT_ME`): hyperscript has no `this`, so
|
|
62
|
+
`toggle .a on this` or `put this.value.length into #n` reads a variable nobody set and does
|
|
63
|
+
nothing. These validated clean (6 of 10 clean-validating snippets that did nothing, in the 7.3.0
|
|
64
|
+
live test). The inert-shape warnings also reach commands after a `then` and inside an `if`'s
|
|
65
|
+
branches; they read only a block's `body` before.
|
|
66
|
+
- **The IR `validate_and_compile` returns has the commands of a chain, a branch or a loop**: a
|
|
67
|
+
`then` chain is `compound` with each command in `body`, an `if` has `body` and `else`. A chain
|
|
68
|
+
came back as `compound` with no commands, so it could not be checked against an intent.
|
|
69
|
+
- **AGENTS.md** said `this`, `and` or a comma between commands, and `put … in` work; all four fail
|
|
70
|
+
on both engines. Its worked example showed output the server no longer gives, and it quoted a
|
|
71
|
+
fidelity figure ("~76%") from before the renderer reached 100% on the corpus. Rewritten from the
|
|
72
|
+
server's real output.
|
|
73
|
+
- **Multilingual: a native time unit after the event is a duration.** ko `클릭할 때 1초 대기`,
|
|
74
|
+
tr `tıklamada 1 saniye bekle` and ja `クリックで 1 秒 待つ` came back `on click 1 wait s`: the
|
|
75
|
+
number became a click count (the handler ran on the first click only) and the wait waited for
|
|
76
|
+
nothing, with no error. A number and the language's word for a unit after it, glued or spaced,
|
|
77
|
+
are one duration now (`wait 1s`, `wait 150ms`).
|
|
78
|
+
- **Multilingual: a bare URL with a number in it translates.** `fetch /api/items/42` and
|
|
79
|
+
`fetch /api/slow?ms=300` were refused in every language, both ways ("would lose 42"): the check
|
|
80
|
+
counted the URL's numbers alone, and the translation writes the URL quoted. A bare URL is one
|
|
81
|
+
value now, the same as quoted.
|
|
82
|
+
- **Multilingual: es and pt `esperar a <event>` waits for the event.** es `esperar a continue`
|
|
83
|
+
came back `wait continue`, a timed wait on a variable, which waits for nothing. `esperar a`
|
|
84
|
+
(es, pt) and `esperar por` (pt) read as `wait for`, as `esperar evento` already did.
|
|
85
|
+
- **Multilingual: a hover word is `mouseenter`.** Eighteen languages' hover word (es `sobrevolar`,
|
|
86
|
+
fr `survol`, ko `호버`, …) read as `on hover`, which is not a DOM event, so the handler never ran.
|
|
87
|
+
They read as `on mouseenter` now; what `on mouseenter` is written as does not change.
|
|
88
|
+
- **Multilingual: a dropped word with content of its own is refused, not dropped.** es
|
|
89
|
+
`al hacer clic fuera quitar .open de mí` came back `on click remove .open from me` (the dropdown
|
|
90
|
+
closed on every click): a particle the language maps to a word with meaning (`fuera`, `out`) was
|
|
91
|
+
skipped like a role marker. Such a translation is refused now (`LossyTranslationError`).
|
|
92
|
+
- **`@lokascript/hyperscript-adapter` warns when a handler listens for a word nothing fires.**
|
|
93
|
+
A word the language does not know as an event (es `al pulsar …`, de `beim Tippen …`) runs as a
|
|
94
|
+
custom event of that name, and the handler never ran, silently. The adapter now warns once per
|
|
95
|
+
language and word. A name written as code (`miEvento`, `draggable:start`) stays quiet. No event
|
|
96
|
+
words were added: loka-js and our dictionaries ship the noun (`clic`), not the verbs. MCP
|
|
97
|
+
`validate_and_compile` reports the same, as an `UNKNOWN_EVENT_WORD` warning on non-English
|
|
98
|
+
input (`get_code_fixes` has its fix).
|
|
99
|
+
|
|
100
|
+
## [7.4.0] - 2026-10-21
|
|
101
|
+
|
|
102
|
+
Content htmx or fixi swaps in runs its hyperscript, as it does on upstream `_hyperscript`: the
|
|
103
|
+
engine has upstream's htmx integration in every bundle, and loading the engine twice no longer
|
|
104
|
+
binds every handler twice. A minor: new behavior and a deprecated option, nothing removed.
|
|
105
|
+
|
|
106
|
+
### Fixed
|
|
107
|
+
|
|
108
|
+
- **`@hyperfixi/engine`: content htmx or fixi swaps in runs its hyperscript, and htmx content a
|
|
109
|
+
script puts in issues its requests.** Upstream `_hyperscript` has this integration in its core
|
|
110
|
+
runtime and the engine had none: a `_="on click …"` that htmx swapped in did nothing, and an
|
|
111
|
+
`hx-get` that a script `put` into the page was never wired. The engine now has upstream's
|
|
112
|
+
integration (0.9.93's `htmx-compat.js`), installed by `boot()` in every bundle, the Vite
|
|
113
|
+
plugin's included: `htmx:load` (htmx 2) and `htmx:after:process` (htmx 4) process the content,
|
|
114
|
+
an after-process hook hands what a script inserts to `htmx.process`, and on htmx 4 it
|
|
115
|
+
registers upstream's `hs-include` extension (`hs-include=":id"` sends element-scoped variables
|
|
116
|
+
with the request; `htmx.config.extensions = "hs-include"` enables it). Two additions upstream
|
|
117
|
+
lacks: fixi (`fx:swapped` processes the swapped content), and pages with their own hooks
|
|
118
|
+
between the two (`htmx.onLoad(el => _hyperscript.process(el))`,
|
|
119
|
+
`_hyperscript.addAfterProcessHook(el => htmx.process(el))`, the workarounds until now) no longer
|
|
120
|
+
recurse, where upstream recurses until the stack runs out. The workarounds can be removed. The
|
|
121
|
+
first vendoring of upstream's suite left out its htmx tests (`integration/htmx.js`,
|
|
122
|
+
`ext/hs-include.js`), which is how the gap shipped; the gate now runs them and passes all 19
|
|
123
|
+
(1422/1486). `hyperfixi-hs.js` grows 0.7 KB gzipped, to 34.9 KB.
|
|
124
|
+
- **`@hyperfixi/engine`: loading the engine twice no longer binds every handler twice.** Element
|
|
125
|
+
state was private to each copy of the engine, so the second copy initialised every element
|
|
126
|
+
again and one click ran its handler twice. htmx 4's boosted swaps run body scripts again, so
|
|
127
|
+
boost, then back, did it on a page that loads the engine at the end of its body. The state is
|
|
128
|
+
now `elt._hyperscript`, where upstream keeps it and a second copy finds it (two more of
|
|
129
|
+
upstream's tests pass).
|
|
130
|
+
- **Examples: sortable-list's Add Task added a blank task and threw.** Its script read the input
|
|
131
|
+
with `first #new-item-input`, which is null (`first` of one element), and now reads the element
|
|
132
|
+
itself. tell-command's code sample shows its `on click`.
|
|
133
|
+
|
|
134
|
+
### Deprecated
|
|
135
|
+
|
|
136
|
+
- **`@hyperfixi/vite-plugin`'s `htmx` option does nothing.** It added a listener for htmx 2's
|
|
137
|
+
event names, which htmx 4 does not fire; the engine's integration covers every bundle. The
|
|
138
|
+
option is still accepted, so existing configs build.
|
|
139
|
+
|
|
10
140
|
## [7.3.0] - 2026-10-21
|
|
11
141
|
|
|
12
142
|
`@hyperfixi/mcp-server` lists its 14 core tools by default and keeps the other 70 in toolsets
|
package/package.json
CHANGED