@lokascript/hyperscript-adapter 7.2.0 → 7.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,90 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [7.4.0] - 2026-10-21
11
+
12
+ Content htmx or fixi swaps in runs its hyperscript, as it does on upstream `_hyperscript`: the
13
+ engine has upstream's htmx integration in every bundle, and loading the engine twice no longer
14
+ binds every handler twice. A minor: new behavior and a deprecated option, nothing removed.
15
+
16
+ ### Fixed
17
+
18
+ - **`@hyperfixi/engine`: content htmx or fixi swaps in runs its hyperscript, and htmx content a
19
+ script puts in issues its requests.** Upstream `_hyperscript` has this integration in its core
20
+ runtime and the engine had none: a `_="on click …"` that htmx swapped in did nothing, and an
21
+ `hx-get` that a script `put` into the page was never wired. The engine now has upstream's
22
+ integration (0.9.93's `htmx-compat.js`), installed by `boot()` in every bundle, the Vite
23
+ plugin's included: `htmx:load` (htmx 2) and `htmx:after:process` (htmx 4) process the content,
24
+ an after-process hook hands what a script inserts to `htmx.process`, and on htmx 4 it
25
+ registers upstream's `hs-include` extension (`hs-include=":id"` sends element-scoped variables
26
+ with the request; `htmx.config.extensions = "hs-include"` enables it). Two additions upstream
27
+ lacks: fixi (`fx:swapped` processes the swapped content), and pages with their own hooks
28
+ between the two (`htmx.onLoad(el => _hyperscript.process(el))`,
29
+ `_hyperscript.addAfterProcessHook(el => htmx.process(el))`, the workarounds until now) no longer
30
+ recurse, where upstream recurses until the stack runs out. The workarounds can be removed. The
31
+ first vendoring of upstream's suite left out its htmx tests (`integration/htmx.js`,
32
+ `ext/hs-include.js`), which is how the gap shipped; the gate now runs them and passes all 19
33
+ (1422/1486). `hyperfixi-hs.js` grows 0.7 KB gzipped, to 34.9 KB.
34
+ - **`@hyperfixi/engine`: loading the engine twice no longer binds every handler twice.** Element
35
+ state was private to each copy of the engine, so the second copy initialised every element
36
+ again and one click ran its handler twice. htmx 4's boosted swaps run body scripts again, so
37
+ boost, then back, did it on a page that loads the engine at the end of its body. The state is
38
+ now `elt._hyperscript`, where upstream keeps it and a second copy finds it (two more of
39
+ upstream's tests pass).
40
+ - **Examples: sortable-list's Add Task added a blank task and threw.** Its script read the input
41
+ with `first #new-item-input`, which is null (`first` of one element), and now reads the element
42
+ itself. tell-command's code sample shows its `on click`.
43
+
44
+ ### Deprecated
45
+
46
+ - **`@hyperfixi/vite-plugin`'s `htmx` option does nothing.** It added a listener for htmx 2's
47
+ event names, which htmx 4 does not fire; the engine's integration covers every bundle. The
48
+ option is still accepted, so existing configs build.
49
+
50
+ ## [7.3.0] - 2026-10-21
51
+
52
+ `@hyperfixi/mcp-server` lists its 14 core tools by default and keeps the other 70 in toolsets
53
+ that `LOKASCRIPT_MCP_TOOLSETS` lists, and five of its tools that were broken work. A minor, as
54
+ when the sampling tools went opt-in (2.11.0): every tool still answers a call by name, and the
55
+ variable lists any of them again.
56
+
57
+ ### Changed
58
+
59
+ - **`@hyperfixi/mcp-server` lists 14 core tools by default; the other 70 are in opt-in
60
+ toolsets.** A connection listed all 84: about 13k tokens of definitions in each client that
61
+ loads them all, and a month of sessions called 7 of them. The default list is the agent loop
62
+ and what it leans on (`validate_and_compile`, `get_diagnostics`, `get_code_fixes`,
63
+ `get_command_docs`, `get_expression_docs`, `search_patterns`), translation (`translate_code`,
64
+ `translate_to_english`, `get_keyword_translations`, `list_supported_languages`), proof that
65
+ a change kept its meaning (`score_fidelity`, `diff_behaviors`), and `detect_domain` /
66
+ `compile_auto`: about 2.5k tokens. Set `LOKASCRIPT_MCP_TOOLSETS` to list more: `domains`
67
+ (26), `lse` (13), `grail` (5), `debug` (4), `editor` (3), `analysis` (9), `profiles` (5),
68
+ `project` (5), comma-separated, or `all`. Only the list changes: every tool still answers a
69
+ call by name. A client that picks tools from the list (Claude Code, Claude Desktop) needs
70
+ the variable to see a tool outside the core; the README lists each toolset's tools (#1607).
71
+
72
+ ### Fixed
73
+
74
+ - **`lse_from_hyperscript` returned `[get patient:null]` for every input**, with `ok: true` and
75
+ confidence 1: it read the semantic parse as the AST builder's tree. It now renders the parse,
76
+ and refuses (`ok: false`, the rendered LSE under `partial`) a parse that left input unread or
77
+ a shape whose LSE does not parse back, such as a `then` chain inside a handler (#1607).
78
+ - **`extract_routes` and `generate_server_routes` threw on every input** ("Cannot read
79
+ properties of undefined"), from the day they were added: they read `.routes` from the array
80
+ `scanRoutes` returns. They report server-bridge's route conflicts where they promised an
81
+ `errors` field it never had. The import that hid this from the typecheck (an untyped ambient
82
+ module) is gone (#1607).
83
+ - **`get_code_fixes` had no fixes for the codes `validate_and_compile` emits**
84
+ (`ENGINE_PARSE_ERROR`, `UNCONSUMED_INPUT`, …), though the server's instructions send an agent
85
+ there from its diagnostics; `get_diagnostics`' `parse-error` and `low-confidence` mapped to
86
+ keys that did not exist. Every code compilation-service emits now has fixes, and a test holds
87
+ that (#1607).
88
+ - **`explain_code` listed commands by kind, not in the order they run** (toggle → wait → add
89
+ came out "toggles … adds … waits") and dropped their targets. It explains the parse now: each
90
+ step rendered back to English with what it does, a block's body and an `if`'s two branches (#1607).
91
+ - **`get_diagnostics`' typo fix was titled `Fix typo: ${suggestion}`**, unfilled, with no edit.
92
+ It now reads "Fix typo: toggle" with an edit that replaces the misspelled word (#1607).
93
+
10
94
  ## [7.2.0] - 2026-10-20
11
95
 
12
96
  `@hyperfixi/mcp-server` moves to `@lokascript/domains` 7.1.0: learn left the domains for