@lokascript/framework 6.1.0 → 6.3.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 +97 -1
  2. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -7,6 +7,100 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [6.3.0] - 2026-10-18
11
+
12
+ The htmx adapter writes localized SSE and WebSocket attributes under the names the page's htmx
13
+ reads: htmx 4's `hx-sse:` / `hx-ws:` on htmx 4, without its deprecation warnings, and htmx 2's on
14
+ htmx 2.
15
+
16
+ ### Changed
17
+
18
+ - **`@lokascript/htmx-adapter`: localized SSE and WebSocket attributes take the page's htmx's names**
19
+ (#1582).
20
+ On htmx 4, `sse-conectar` canonicalized to htmx 2's `sse-connect`. htmx 4's `hx-sse` and `hx-ws`
21
+ extensions read that, but copy each one with a "legacy attribute … is deprecated" warning: three
22
+ on a page with one connection of each. The adapter now writes `hx-sse:connect`, `hx-ws:connect` and
23
+ `hx-ws:send` (in htmx's `metaCharacter`) on htmx 4, and htmx 2's names on htmx 2, which reads only
24
+ those. The generation comes from the htmx `registerWith` is given, accepted or not; before that the
25
+ adapter writes htmx 2's names, which both read. htmx 4's spelling of a localized name works too
26
+ (`hx-sse:conectar`, `hx-ws:enviar`). `sse-swap` has no htmx 4 name (htmx 4 removed it), so a
27
+ localized one stays `sse-swap`, and htmx 4 warns about it. A new browser test runs it on htmx
28
+ 4.0.0's own extensions: connect, swap and send, with no warning.
29
+
30
+ ## [6.2.0] - 2026-10-18
31
+
32
+ The `@lokascript/semantic/core` path weighs about a third less, and its lexicons now register with
33
+ it. MCP `get_diagnostics` gives the engine's verdict for English, and a multi-line BehaviorSpec with
34
+ a line it cannot read is refused instead of compiled without it.
35
+
36
+ ### Fixed
37
+
38
+ - **`@hyperfixi/mcp-server`: `get_diagnostics` gives the engine's verdict for English, where it
39
+ stopped** (#1575). Measured on 672 inputs (the agent bench and the docs patterns, in en/ja/es/ar), it
40
+ flagged 6 of the 27 English inputs the engine rejects, none with a position; gave 9 false errors
41
+ on English the engine reads (8 of them a possessive `'s` read as an open quote); and warned 467
42
+ `possible-typo`s, 391 on ja/es/ar words checked against an English command list. Now: 27 of 27,
43
+ each at the token where the engine stopped; 0 false errors (semantic's doubts about English the
44
+ engine reads are warnings); and a "did you mean" only for the word the engine stopped on
45
+ (`toggel`, not `and`), never off English. Style advice (`wait` over `setTimeout`, `then` between
46
+ commands) stays.
47
+
48
+ - **`@lokascript/semantic`: `lexicons/<code>` registers its vocabulary with `./core`.** Each
49
+ lexicon file bundled a private copy of the lexicon registry, so a page that imported
50
+ `@lokascript/semantic/core`, `languages/ja` and `lexicons/ja` registered the Japanese words in a
51
+ Map `render` never read, and value words stayed English (`私の valueに` for `私の 値 に`). The root
52
+ entry and the browser bundles were not affected. `test/core-subpaths.test.ts` holds it on the
53
+ built files (#1577).
54
+
55
+ - **`@hyperfixi/mcp-server`: a multi-line BehaviorSpec with a line it cannot read is refused,
56
+ not compiled without it** (lokascript-domains #54). On `@lokascript/domains` 5.0.1,
57
+ `compile_behaviorspec` answered `ok: true` for `test "Login"` / `given page /login` /
58
+ `when I click #submit` / `then #result is visible` with only the `goto`: the two lines it
59
+ could not read were gone. mcp-server is on domains 5.0.2, whose `compileBehaviorSpec` throws a
60
+ `BehaviorSpecError`; the multi-line handler answers `ok: false` with `errors` (one per line)
61
+ and the rest under `partial`, never `code`. `validate_behaviorspec` reports what compile would
62
+ refuse (a `given page /login when …` URL that takes the rest of its line), and
63
+ `translate_behaviorspec` refuses such a spec whole (`translated` and `playwright` are `null`)
64
+ instead of translating what remained (#1576).
65
+
66
+ - **`@lokascript/compilation-service`: `/health` reports the package's version**, not the `1.4.0`
67
+ literal it reported through 6.1.0 (`src/version.ts`, rewritten by `set-version.cjs`; #1576).
68
+
69
+ ### Changed
70
+
71
+ - **`@lokascript/semantic`: the `./core` + `./languages/<code>` path weighs about a third less.**
72
+ Measured with esbuild (minified, gzip -9) on learn's ten languages with their lexicons:
73
+ 275 KB → 180 KB; `./core` alone 155 KB → 120 KB; core with one language and its lexicon
74
+ 168 KB → 133 KB. Two packaging changes: `KNOWN_PROFILES` is marked pure, so a bundle that does
75
+ not use it drops the profiles of languages it never imports (35 KB); and the language and
76
+ lexicon modules share their common code in chunks instead of a copy each (60 KB over ten).
77
+ Through the packed tarball, the bundled path renders exactly what the root entry does (1,476 of
78
+ 1,476 pairs: 164 docs patterns × 9 languages, there and back), and the root entry is unchanged
79
+ (3,772 of 3,772 pairs against 6.1.0). `@hyperfixi/vite-plugin`'s debug size table is
80
+ re-measured (one language ~130–135 KB, `all` ~222 KB) (#1577).
81
+
82
+ - **`@lokascript/language-server` on `vscode-languageserver` 10** (protocol 3.18; replaces
83
+ Dependabot #1278), and the LokaScript VS Code extension on `vscode-languageclient` 10 (#1279),
84
+ which needs VS Code 1.91 (`engines.vscode` was `^1.85.0`). 10.x adds an exports map without
85
+ `./node.js`, so the server imports `vscode-languageserver/node`; a diagnostic's `message` may be
86
+ `MarkupContent` in 3.18, so the code actions read its text either way. Over stdio the server
87
+ answers as 6.1.0 does: the same capabilities, the engine's parse error at the same position,
88
+ hover and completion (#1579).
89
+
90
+ ### Added
91
+
92
+ - **`@lokascript/semantic/core` exports `getAllTranslations` and `getAllTranslationsWithStatus`**,
93
+ over the languages a page registered. lokascript-learn's playground imported the root entry, and
94
+ with it all 24 languages, for this one function (#1577).
95
+
96
+ ### Deprecated
97
+
98
+ - **`@hyperfixi/mcp-server`: `parse_multilingual`, removed in 7.0.** It returns only the top node
99
+ (every handler as `on` and its event) and reported success on 21 of the 27 English inputs the
100
+ engine rejects; `validate_and_compile` returns the whole IR and the engine's verdict. Its
101
+ description starts "Deprecated", and each result carries a second text block naming the
102
+ replacement (#1575).
103
+
10
104
  ## [6.1.0] - 2026-10-18
11
105
 
12
106
  One validator and one translator: MCP `validate_and_compile` accepts the English the engine reads
@@ -1999,7 +2093,9 @@ _Synchronized version release. See git history for details._
1999
2093
  - npm access token stored in GitHub Secrets
2000
2094
  - 2FA recommended for npm organization
2001
2095
 
2002
- [Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v6.1.0...HEAD
2096
+ [Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v6.3.0...HEAD
2097
+ [6.3.0]: https://github.com/codetalcott/hyperfixi/compare/v6.2.0...v6.3.0
2098
+ [6.2.0]: https://github.com/codetalcott/hyperfixi/compare/v6.1.0...v6.2.0
2003
2099
  [6.1.0]: https://github.com/codetalcott/hyperfixi/compare/v6.0.0...v6.1.0
2004
2100
  [6.0.0]: https://github.com/codetalcott/hyperfixi/compare/v5.1.0...v6.0.0
2005
2101
  [5.1.0]: https://github.com/codetalcott/hyperfixi/compare/v5.0.0...v5.1.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokascript/framework",
3
- "version": "6.1.0",
3
+ "version": "6.3.0",
4
4
  "description": "Generic framework for building multilingual DSLs with semantic parsing and grammar transformation",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -95,13 +95,13 @@
95
95
  "author": "LokaScript Contributors",
96
96
  "license": "MIT",
97
97
  "dependencies": {
98
- "@lokascript/intent": "^6.1.0"
98
+ "@lokascript/intent": "^6.3.0"
99
99
  },
100
100
  "devDependencies": {
101
101
  "@lokascript/domains": "^5.0.0",
102
102
  "@types/node": "^26.6.3",
103
103
  "@vitest/coverage-v8": "^5.0.0",
104
- "tsup": "^8.0.0",
104
+ "tsup": "^9.0.0",
105
105
  "typescript": "^5.0.0",
106
106
  "vitest": "^5.0.2"
107
107
  },