motely-wasm 24.3.0 → 24.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/README.md CHANGED
@@ -21,7 +21,6 @@ import bootsharp, {
21
21
  MotelyJaml,
22
22
  MotelyJamlyzer,
23
23
  MotelySearch,
24
- Jimmolate,
25
24
  } from "motely-wasm";
26
25
 
27
26
  MotelySearch.onProgress.subscribe((p) => {
@@ -31,8 +30,6 @@ MotelySearch.onProgress.subscribe((p) => {
31
30
  MotelySearch.onSeedMatch.subscribe((seed) => console.log(seed));
32
31
  MotelySearch.onScoredResult.subscribe((result) => console.log(result.seed, result.score));
33
32
 
34
- Jimmolate.filter = (inst) => true;
35
-
36
33
  await bootsharp.boot();
37
34
  ```
38
35
 
@@ -132,7 +129,6 @@ self.onmessage = (e) => {
132
129
  const { port, motelyUrl, jaml, startBatch, endBatch, batchChars } = e.data;
133
130
  (async () => {
134
131
  const engine = await import(motelyUrl);
135
- engine.Jimmolate.filter = () => 1;
136
132
  if (engine.default.getStatus() === engine.default.BootStatus.Standby)
137
133
  await engine.default.boot();
138
134
 
@@ -148,25 +144,6 @@ self.onmessage = (e) => {
148
144
 
149
145
  Boot each worker's engine once and reuse it: booting is the expensive part, searching is not.
150
146
 
151
- ## Jimmolate
152
-
153
- Jimmolate is a JS-authored seed filter in the engine filter chain, speaking the real Immolate `.cl` contract: `filter(inst) => score` — a number, and the host sets the bar with a score cutoff. Returning `true`/`false` also works for convenience; booleans coerce to 1/0. The filter receives the live `MotelySingleSearchContext` as an interop instance, so it can drive every query a native C# filter can. Bind it before `boot()`; keep-all (`(inst) => 1`) is the neutral binding.
154
-
155
- The ante-1 fingerprint filter from the C# unit tests, authored in JS — real voucher and boss queries pulling one needle out of the decoys:
156
-
157
- ```js
158
- Jimmolate.filter = (inst) => {
159
- if (inst.getAnteFirstVoucher(1) !== MotelyVoucher.MagicTrick) return 0;
160
- const result = inst.getBossForAnteWithState(1, inst.newRunState());
161
- return result.boss === MotelyBossBlind.TheWindow ? 1 : 0;
162
- };
163
- await MotelySearch.searchList(jaml);
164
- ```
165
-
166
- A JAML with zero must/should/mustNot clauses (deck, stake, seeds only — the real Immolate shape) is a first-class search: the Jimmolate filter carries the whole decision.
167
-
168
- Stream walkers that thread `ref` state are C#-only shapes; their state-threaded twins (value in, value out) are the JS-facing equivalents.
169
-
170
147
  ## One-line JAML
171
148
 
172
149
  A JAML clause can be written as one human line — the terse spelling of a clause, so it lives on `MotelyJaml`. Both calls delegate to the engine's `JamlLine` parser/formatter so packed item identity stays canonical.
@@ -206,7 +183,7 @@ npm run serve # hand-drive the test UI at http://127.0.0.1:4173/
206
183
  npm run pack:check
207
184
  ```
208
185
 
209
- The test UI (`testui/index.html`) is a plain ES-module page with a CodeMirror 6 editor: live engine-driven lint and completion while you type, a Jimmolate filter box compiled straight into the browser search, and a results table — feedback is continuous — live linting validates every keystroke, which is why the UI stays button-free. The Playwright specs in `tests-ui/` prove the package where UX lives: a real browser.
186
+ The test UI (`testui/index.html`) is a plain ES-module page with a CodeMirror 6 editor: live engine-driven lint and completion while you type, and a results table — feedback is continuous — live linting validates every keystroke, which is why the UI stays button-free. The Playwright specs in `tests-ui/` prove the package where UX lives: a real browser.
210
187
 
211
188
  Releasing, from `Motely.Wasm/`: sync `"version"` in `package.json` to `<MotelyVersion>` in the repo-root `Directory.Packages.props`, run `npm test` and `npm run test:ui` green, then `npm publish`.
212
189
 
@@ -218,7 +195,6 @@ The package test suite mirrors the C# behavior tests that are meaningful through
218
195
  - JAML YAML/JSON parse and validation strictness
219
196
  - JAMLyzer ante structure, event windows, score-by-analysis, and stream-state resume
220
197
  - real list/random/sequential searches
221
- - Jimmolate accept/reject predicate behavior against the live context
222
198
  - AND scoring, default source fallback, Hieroglyph pack-slot reachability, and luck-source regressions
223
199
  - One-line JAML canonicalization
224
200
  - seed math and keyword utility parity