@onimaxxing/sussy-seeds-mcp 0.1.2 → 0.1.4

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/dist/index.js CHANGED
@@ -140811,10 +140811,409 @@ var CONSTRAINT_KIND_CATALOG = [
140811
140811
  import { z as z4 } from "zod";
140812
140812
 
140813
140813
  // src/wasm.ts
140814
- import { readFileSync } from "fs";
140814
+ import { existsSync, readFileSync } from "fs";
140815
140815
  import { createRequire } from "module";
140816
140816
  import { dirname, join } from "path";
140817
- import init, { Roller } from "@tigin-backwards/oxygen-not-included-gambling";
140817
+ import { fileURLToPath } from "url";
140818
+
140819
+ // ../../node_modules/.pnpm/@tigin-backwards+oxygen-not-included-gambling@0.4.0/node_modules/@tigin-backwards/oxygen-not-included-gambling/oni_roll_wasm.js
140820
+ var Roller = class {
140821
+ __destroy_into_raw() {
140822
+ const ptr = this.__wbg_ptr;
140823
+ this.__wbg_ptr = 0;
140824
+ RollerFinalization.unregister(this);
140825
+ return ptr;
140826
+ }
140827
+ free() {
140828
+ const ptr = this.__destroy_into_raw();
140829
+ wasm.__wbg_roller_free(ptr, 0);
140830
+ }
140831
+ /**
140832
+ * Runs the position-aware scan path: phase 1 placement (cached
140833
+ * rings) + trait selection (`_into`) over `n_seeds` consecutive
140834
+ * cluster_seeds. Returns the cumulative trait count so the JIT
140835
+ * can't elide the work. Use to measure the combined phase 1 +
140836
+ * trait cost under real WASM (what scan_chunk runs for queries
140837
+ * that read world positions).
140838
+ * @param {number} n_seeds
140839
+ * @returns {number}
140840
+ */
140841
+ benchPhase1AndTraits(n_seeds) {
140842
+ const ret = wasm.roller_benchPhase1AndTraits(this.__wbg_ptr, n_seeds);
140843
+ return ret >>> 0;
140844
+ }
140845
+ /**
140846
+ * Same as `bench_phase1_and_traits` but uses the uncached
140847
+ * `compute_world_placements` for an A/B against the cache.
140848
+ * @param {number} n_seeds
140849
+ * @returns {number}
140850
+ */
140851
+ benchPhase1AndTraitsUncached(n_seeds) {
140852
+ const ret = wasm.roller_benchPhase1AndTraitsUncached(this.__wbg_ptr, n_seeds);
140853
+ return ret >>> 0;
140854
+ }
140855
+ /**
140856
+ * Same shape as `bench_traits_scratch` but uses the returning
140857
+ * `select_traits_pooled` (allocates a fresh `Vec<Arc<str>>` per
140858
+ * call). Lets the JS-side bench measure the alloc overhead vs
140859
+ * the scratch path under real WASM/V8.
140860
+ * @param {number} n_seeds
140861
+ * @returns {number}
140862
+ */
140863
+ benchTraitsReturning(n_seeds) {
140864
+ const ret = wasm.roller_benchTraitsReturning(this.__wbg_ptr, n_seeds);
140865
+ return ret >>> 0;
140866
+ }
140867
+ /**
140868
+ * Micro-benchmark exit. Runs `Cluster::select_traits_pooled_into`
140869
+ * (the path scan_chunk hits for positionless trait queries) over
140870
+ * `n_seeds` consecutive cluster_seeds starting at 0, against
140871
+ * every world. Returns the cumulative trait count so the JIT
140872
+ * can't elide the work.
140873
+ *
140874
+ * Used by `scripts/wasm_bench_traits.mjs` to measure real WASM
140875
+ * throughput from JS via `performance.now()`. The trait_pool +
140876
+ * trait_scratch + trait_out_bufs already in `Roller` are the
140877
+ * exact buffers scan_chunk uses, so the numbers reflect what a
140878
+ * real `scanChunk` call would see for its trait-selection slice.
140879
+ * @param {number} n_seeds
140880
+ * @returns {number}
140881
+ */
140882
+ benchTraitsScratch(n_seeds) {
140883
+ const ret = wasm.roller_benchTraitsScratch(this.__wbg_ptr, n_seeds);
140884
+ return ret >>> 0;
140885
+ }
140886
+ /**
140887
+ * Cluster type id (e.g. "expansion1::clusters/VanillaSandstoneCluster").
140888
+ * @returns {string}
140889
+ */
140890
+ get clusterId() {
140891
+ let deferred1_0;
140892
+ let deferred1_1;
140893
+ try {
140894
+ const ret = wasm.roller_clusterId(this.__wbg_ptr);
140895
+ deferred1_0 = ret[0];
140896
+ deferred1_1 = ret[1];
140897
+ return getStringFromWasm0(ret[0], ret[1]);
140898
+ } finally {
140899
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
140900
+ }
140901
+ }
140902
+ /**
140903
+ * Replace the resident `SettingsCache` with one built from a
140904
+ * `{path: jsonString}` files map. Optional override for mod /
140905
+ * overlay flows; the default cache (baked-in U59 codegen) is
140906
+ * loaded lazily on first `new Roller(coord)`. Existing Roller
140907
+ * instances keep their `Arc` handles to the previous cache, so
140908
+ * versions are isolated.
140909
+ * @param {string} overlay_json
140910
+ */
140911
+ static loadSnapshot(overlay_json) {
140912
+ const ptr0 = passStringToWasm0(overlay_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
140913
+ const len0 = WASM_VECTOR_LEN;
140914
+ const ret = wasm.roller_loadSnapshot(ptr0, len0);
140915
+ if (ret[1]) {
140916
+ throw takeFromExternrefTable0(ret[0]);
140917
+ }
140918
+ }
140919
+ /**
140920
+ * Create a new roller for a given cluster coord. `coord` is any
140921
+ * valid game coord for the target cluster type — the seed field
140922
+ * is ignored (we vary it ourselves via `summarize`).
140923
+ * @param {string} coord
140924
+ */
140925
+ constructor(coord) {
140926
+ const ptr0 = passStringToWasm0(coord, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
140927
+ const len0 = WASM_VECTOR_LEN;
140928
+ const ret = wasm.roller_new(ptr0, len0);
140929
+ if (ret[2]) {
140930
+ throw takeFromExternrefTable0(ret[1]);
140931
+ }
140932
+ this.__wbg_ptr = ret[0] >>> 0;
140933
+ RollerFinalization.register(this, this.__wbg_ptr, this);
140934
+ return this;
140935
+ }
140936
+ /**
140937
+ * Run a compiled query bytecode against every cluster_seed in
140938
+ * `[lo, hi)` and return the top-K matches as JS objects.
140939
+ *
140940
+ * Only matches cross the WASM boundary — the main perf win vs
140941
+ * per-seed `summarize()` + JS filter. The inner loop stays in
140942
+ * WASM with zero allocations per cluster after the first call.
140943
+ *
140944
+ * Each returned match is `{ cluster_seed, score, columns: {key: value, ...} }`.
140945
+ * @param {number} lo
140946
+ * @param {number} hi
140947
+ * @param {Uint8Array} bytecode
140948
+ * @param {number} top_k
140949
+ * @returns {any}
140950
+ */
140951
+ scanChunk(lo, hi, bytecode, top_k) {
140952
+ const ptr0 = passArray8ToWasm0(bytecode, wasm.__wbindgen_malloc);
140953
+ const len0 = WASM_VECTOR_LEN;
140954
+ const ret = wasm.roller_scanChunk(this.__wbg_ptr, lo, hi, ptr0, len0, top_k);
140955
+ if (ret[2]) {
140956
+ throw takeFromExternrefTable0(ret[1]);
140957
+ }
140958
+ return takeFromExternrefTable0(ret[0]);
140959
+ }
140960
+ /**
140961
+ * Full summary for one cluster_seed. Returns a JS object of shape
140962
+ * `ClusterSummary`.
140963
+ * @param {number} cluster_seed
140964
+ * @returns {any}
140965
+ */
140966
+ summarize(cluster_seed) {
140967
+ const ret = wasm.roller_summarize(this.__wbg_ptr, cluster_seed);
140968
+ if (ret[2]) {
140969
+ throw takeFromExternrefTable0(ret[1]);
140970
+ }
140971
+ return takeFromExternrefTable0(ret[0]);
140972
+ }
140973
+ /**
140974
+ * World-trait lists (one Vec per world) for the given
140975
+ * cluster_seed. Pure seed hash, cheap. Separate from `summarize`
140976
+ * because traits aren't always needed.
140977
+ *
140978
+ * Fragment-aware: if a slot was swapped by world-mixing on this
140979
+ * seed, the returned Vec at that slot reflects the fragment's
140980
+ * rules (not the vanilla config's) — matching what `summarize`
140981
+ * puts in `ClusterSummary.world_traits` and what
140982
+ * `Cluster::generate_with_settings` actually runs at capture time.
140983
+ * @param {number} cluster_seed
140984
+ * @returns {any}
140985
+ */
140986
+ traits(cluster_seed) {
140987
+ const ret = wasm.roller_traits(this.__wbg_ptr, cluster_seed);
140988
+ if (ret[2]) {
140989
+ throw takeFromExternrefTable0(ret[1]);
140990
+ }
140991
+ return takeFromExternrefTable0(ret[0]);
140992
+ }
140993
+ /**
140994
+ * Number of worlds in this cluster layout.
140995
+ * @returns {number}
140996
+ */
140997
+ get world_count() {
140998
+ const ret = wasm.roller_world_count(this.__wbg_ptr);
140999
+ return ret >>> 0;
141000
+ }
141001
+ };
141002
+ if (Symbol.dispose) Roller.prototype[Symbol.dispose] = Roller.prototype.free;
141003
+ function __wbg_get_imports() {
141004
+ const import0 = {
141005
+ __proto__: null,
141006
+ __wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
141007
+ const ret = Error(getStringFromWasm0(arg0, arg1));
141008
+ return ret;
141009
+ },
141010
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
141011
+ const ret = String(arg1);
141012
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
141013
+ const len1 = WASM_VECTOR_LEN;
141014
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
141015
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
141016
+ },
141017
+ __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
141018
+ throw new Error(getStringFromWasm0(arg0, arg1));
141019
+ },
141020
+ __wbg_new_a70fbab9066b301f: function() {
141021
+ const ret = new Array();
141022
+ return ret;
141023
+ },
141024
+ __wbg_new_ab79df5bd7c26067: function() {
141025
+ const ret = new Object();
141026
+ return ret;
141027
+ },
141028
+ __wbg_set_282384002438957f: function(arg0, arg1, arg2) {
141029
+ arg0[arg1 >>> 0] = arg2;
141030
+ },
141031
+ __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
141032
+ arg0[arg1] = arg2;
141033
+ },
141034
+ __wbindgen_cast_0000000000000001: function(arg0) {
141035
+ const ret = arg0;
141036
+ return ret;
141037
+ },
141038
+ __wbindgen_cast_0000000000000002: function(arg0) {
141039
+ const ret = arg0;
141040
+ return ret;
141041
+ },
141042
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
141043
+ const ret = getStringFromWasm0(arg0, arg1);
141044
+ return ret;
141045
+ },
141046
+ __wbindgen_cast_0000000000000004: function(arg0) {
141047
+ const ret = BigInt.asUintN(64, arg0);
141048
+ return ret;
141049
+ },
141050
+ __wbindgen_init_externref_table: function() {
141051
+ const table = wasm.__wbindgen_externrefs;
141052
+ const offset2 = table.grow(4);
141053
+ table.set(0, void 0);
141054
+ table.set(offset2 + 0, void 0);
141055
+ table.set(offset2 + 1, null);
141056
+ table.set(offset2 + 2, true);
141057
+ table.set(offset2 + 3, false);
141058
+ }
141059
+ };
141060
+ return {
141061
+ __proto__: null,
141062
+ "./oni_roll_wasm_bg.js": import0
141063
+ };
141064
+ }
141065
+ var RollerFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
141066
+ }, unregister: () => {
141067
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_roller_free(ptr >>> 0, 1));
141068
+ var cachedDataViewMemory0 = null;
141069
+ function getDataViewMemory0() {
141070
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
141071
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
141072
+ }
141073
+ return cachedDataViewMemory0;
141074
+ }
141075
+ function getStringFromWasm0(ptr, len) {
141076
+ ptr = ptr >>> 0;
141077
+ return decodeText(ptr, len);
141078
+ }
141079
+ var cachedUint8ArrayMemory0 = null;
141080
+ function getUint8ArrayMemory0() {
141081
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
141082
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
141083
+ }
141084
+ return cachedUint8ArrayMemory0;
141085
+ }
141086
+ function passArray8ToWasm0(arg, malloc) {
141087
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
141088
+ getUint8ArrayMemory0().set(arg, ptr / 1);
141089
+ WASM_VECTOR_LEN = arg.length;
141090
+ return ptr;
141091
+ }
141092
+ function passStringToWasm0(arg, malloc, realloc) {
141093
+ if (realloc === void 0) {
141094
+ const buf = cachedTextEncoder.encode(arg);
141095
+ const ptr2 = malloc(buf.length, 1) >>> 0;
141096
+ getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
141097
+ WASM_VECTOR_LEN = buf.length;
141098
+ return ptr2;
141099
+ }
141100
+ let len = arg.length;
141101
+ let ptr = malloc(len, 1) >>> 0;
141102
+ const mem = getUint8ArrayMemory0();
141103
+ let offset2 = 0;
141104
+ for (; offset2 < len; offset2++) {
141105
+ const code = arg.charCodeAt(offset2);
141106
+ if (code > 127) break;
141107
+ mem[ptr + offset2] = code;
141108
+ }
141109
+ if (offset2 !== len) {
141110
+ if (offset2 !== 0) {
141111
+ arg = arg.slice(offset2);
141112
+ }
141113
+ ptr = realloc(ptr, len, len = offset2 + arg.length * 3, 1) >>> 0;
141114
+ const view = getUint8ArrayMemory0().subarray(ptr + offset2, ptr + len);
141115
+ const ret = cachedTextEncoder.encodeInto(arg, view);
141116
+ offset2 += ret.written;
141117
+ ptr = realloc(ptr, len, offset2, 1) >>> 0;
141118
+ }
141119
+ WASM_VECTOR_LEN = offset2;
141120
+ return ptr;
141121
+ }
141122
+ function takeFromExternrefTable0(idx) {
141123
+ const value = wasm.__wbindgen_externrefs.get(idx);
141124
+ wasm.__externref_table_dealloc(idx);
141125
+ return value;
141126
+ }
141127
+ var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
141128
+ cachedTextDecoder.decode();
141129
+ var MAX_SAFARI_DECODE_BYTES = 2146435072;
141130
+ var numBytesDecoded = 0;
141131
+ function decodeText(ptr, len) {
141132
+ numBytesDecoded += len;
141133
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
141134
+ cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
141135
+ cachedTextDecoder.decode();
141136
+ numBytesDecoded = len;
141137
+ }
141138
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
141139
+ }
141140
+ var cachedTextEncoder = new TextEncoder();
141141
+ if (!("encodeInto" in cachedTextEncoder)) {
141142
+ cachedTextEncoder.encodeInto = function(arg, view) {
141143
+ const buf = cachedTextEncoder.encode(arg);
141144
+ view.set(buf);
141145
+ return {
141146
+ read: arg.length,
141147
+ written: buf.length
141148
+ };
141149
+ };
141150
+ }
141151
+ var WASM_VECTOR_LEN = 0;
141152
+ var wasmModule;
141153
+ var wasm;
141154
+ function __wbg_finalize_init(instance, module) {
141155
+ wasm = instance.exports;
141156
+ wasmModule = module;
141157
+ cachedDataViewMemory0 = null;
141158
+ cachedUint8ArrayMemory0 = null;
141159
+ wasm.__wbindgen_start();
141160
+ return wasm;
141161
+ }
141162
+ async function __wbg_load(module, imports) {
141163
+ if (typeof Response === "function" && module instanceof Response) {
141164
+ if (typeof WebAssembly.instantiateStreaming === "function") {
141165
+ try {
141166
+ return await WebAssembly.instantiateStreaming(module, imports);
141167
+ } catch (e) {
141168
+ const validResponse = module.ok && expectedResponseType(module.type);
141169
+ if (validResponse && module.headers.get("Content-Type") !== "application/wasm") {
141170
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
141171
+ } else {
141172
+ throw e;
141173
+ }
141174
+ }
141175
+ }
141176
+ const bytes = await module.arrayBuffer();
141177
+ return await WebAssembly.instantiate(bytes, imports);
141178
+ } else {
141179
+ const instance = await WebAssembly.instantiate(module, imports);
141180
+ if (instance instanceof WebAssembly.Instance) {
141181
+ return { instance, module };
141182
+ } else {
141183
+ return instance;
141184
+ }
141185
+ }
141186
+ function expectedResponseType(type) {
141187
+ switch (type) {
141188
+ case "basic":
141189
+ case "cors":
141190
+ case "default":
141191
+ return true;
141192
+ }
141193
+ return false;
141194
+ }
141195
+ }
141196
+ async function __wbg_init(module_or_path) {
141197
+ if (wasm !== void 0) return wasm;
141198
+ if (module_or_path !== void 0) {
141199
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
141200
+ ({ module_or_path } = module_or_path);
141201
+ } else {
141202
+ console.warn("using deprecated parameters for the initialization function; pass a single object instead");
141203
+ }
141204
+ }
141205
+ if (module_or_path === void 0) {
141206
+ module_or_path = new URL("oni_roll_wasm_bg.wasm", import.meta.url);
141207
+ }
141208
+ const imports = __wbg_get_imports();
141209
+ if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) {
141210
+ module_or_path = fetch(module_or_path);
141211
+ }
141212
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
141213
+ return __wbg_finalize_init(instance, module);
141214
+ }
141215
+
141216
+ // src/wasm.ts
140818
141217
  var require2 = createRequire(import.meta.url);
140819
141218
  var bootPromise = null;
140820
141219
  async function boot() {
@@ -140826,12 +141225,16 @@ async function boot() {
140826
141225
  }
140827
141226
  return bootPromise;
140828
141227
  }
140829
- async function doBoot() {
141228
+ function resolveWasmPath() {
141229
+ const bundled = join(dirname(fileURLToPath(import.meta.url)), "oni_roll_wasm_bg.wasm");
141230
+ if (existsSync(bundled)) return bundled;
140830
141231
  const entryPath = require2.resolve("@tigin-backwards/oxygen-not-included-gambling");
140831
- const wasmPath = join(dirname(entryPath), "oni_roll_wasm_bg.wasm");
140832
- const wasmBytes = readFileSync(wasmPath);
140833
- const wasmModule = new WebAssembly.Module(wasmBytes);
140834
- await init({ module_or_path: wasmModule });
141232
+ return join(dirname(entryPath), "oni_roll_wasm_bg.wasm");
141233
+ }
141234
+ async function doBoot() {
141235
+ const wasmBytes = readFileSync(resolveWasmPath());
141236
+ const wasmModule2 = new WebAssembly.Module(wasmBytes);
141237
+ await __wbg_init({ module_or_path: wasmModule2 });
140835
141238
  }
140836
141239
  var ROLLER_CACHE = /* @__PURE__ */ new Map();
140837
141240
  function coordPrefix(coord) {
@@ -140863,7 +141266,7 @@ async function boot2() {
140863
141266
  return bootPromise2;
140864
141267
  }
140865
141268
  async function doBoot2() {
140866
- wg = require3("@tigin-backwards/oxygen-not-included-worldgen-node");
141269
+ wg = require3("@onimaxxing/worldgen-node");
140867
141270
  await wg.default();
140868
141271
  wg.worldgen.snapshot.loadVanillaExtensions();
140869
141272
  }
@@ -144457,7 +144860,7 @@ pp$8.parseForStatement = function(node) {
144457
144860
  var containsEsc = this.containsEsc;
144458
144861
  var refDestructuringErrors = new DestructuringErrors();
144459
144862
  var initPos = this.start;
144460
- var init2 = awaitAt > -1 ? this.parseExprSubscripts(refDestructuringErrors, "await") : this.parseExpression(true, refDestructuringErrors);
144863
+ var init = awaitAt > -1 ? this.parseExprSubscripts(refDestructuringErrors, "await") : this.parseExpression(true, refDestructuringErrors);
144461
144864
  if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
144462
144865
  if (awaitAt > -1) {
144463
144866
  if (this.type === types$1._in) {
@@ -144465,28 +144868,28 @@ pp$8.parseForStatement = function(node) {
144465
144868
  }
144466
144869
  node.await = true;
144467
144870
  } else if (isForOf && this.options.ecmaVersion >= 8) {
144468
- if (init2.start === initPos && !containsEsc && init2.type === "Identifier" && init2.name === "async") {
144871
+ if (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async") {
144469
144872
  this.unexpected();
144470
144873
  } else if (this.options.ecmaVersion >= 9) {
144471
144874
  node.await = false;
144472
144875
  }
144473
144876
  }
144474
144877
  if (startsWithLet && isForOf) {
144475
- this.raise(init2.start, "The left-hand side of a for-of loop may not start with 'let'.");
144878
+ this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'.");
144476
144879
  }
144477
- this.toAssignable(init2, false, refDestructuringErrors);
144478
- this.checkLValPattern(init2);
144479
- return this.parseForIn(node, init2);
144880
+ this.toAssignable(init, false, refDestructuringErrors);
144881
+ this.checkLValPattern(init);
144882
+ return this.parseForIn(node, init);
144480
144883
  } else {
144481
144884
  this.checkExpressionErrors(refDestructuringErrors, true);
144482
144885
  }
144483
144886
  if (awaitAt > -1) {
144484
144887
  this.unexpected(awaitAt);
144485
144888
  }
144486
- return this.parseFor(node, init2);
144889
+ return this.parseFor(node, init);
144487
144890
  };
144488
- pp$8.parseForAfterInit = function(node, init2, awaitAt) {
144489
- if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init2.declarations.length === 1) {
144891
+ pp$8.parseForAfterInit = function(node, init, awaitAt) {
144892
+ if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init.declarations.length === 1) {
144490
144893
  if (this.options.ecmaVersion >= 9) {
144491
144894
  if (this.type === types$1._in) {
144492
144895
  if (awaitAt > -1) {
@@ -144496,12 +144899,12 @@ pp$8.parseForAfterInit = function(node, init2, awaitAt) {
144496
144899
  node.await = awaitAt > -1;
144497
144900
  }
144498
144901
  }
144499
- return this.parseForIn(node, init2);
144902
+ return this.parseForIn(node, init);
144500
144903
  }
144501
144904
  if (awaitAt > -1) {
144502
144905
  this.unexpected(awaitAt);
144503
144906
  }
144504
- return this.parseFor(node, init2);
144907
+ return this.parseFor(node, init);
144505
144908
  };
144506
144909
  pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) {
144507
144910
  this.next();
@@ -144689,8 +145092,8 @@ pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) {
144689
145092
  }
144690
145093
  return this.finishNode(node, "BlockStatement");
144691
145094
  };
144692
- pp$8.parseFor = function(node, init2) {
144693
- node.init = init2;
145095
+ pp$8.parseFor = function(node, init) {
145096
+ node.init = init;
144694
145097
  this.expect(types$1.semi);
144695
145098
  node.test = this.type === types$1.semi ? null : this.parseExpression();
144696
145099
  this.expect(types$1.semi);
@@ -144701,16 +145104,16 @@ pp$8.parseFor = function(node, init2) {
144701
145104
  this.labels.pop();
144702
145105
  return this.finishNode(node, "ForStatement");
144703
145106
  };
144704
- pp$8.parseForIn = function(node, init2) {
145107
+ pp$8.parseForIn = function(node, init) {
144705
145108
  var isForIn = this.type === types$1._in;
144706
145109
  this.next();
144707
- if (init2.type === "VariableDeclaration" && init2.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init2.kind !== "var" || init2.declarations[0].id.type !== "Identifier")) {
145110
+ if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
144708
145111
  this.raise(
144709
- init2.start,
145112
+ init.start,
144710
145113
  (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
144711
145114
  );
144712
145115
  }
144713
- node.left = init2;
145116
+ node.left = init;
144714
145117
  node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
144715
145118
  this.expect(types$1.parenR);
144716
145119
  node.body = this.parseStatement("for");
@@ -149102,8 +149505,204 @@ function parse3(input, options) {
149102
149505
  return Parser.parse(input, options);
149103
149506
  }
149104
149507
 
149105
- // ../../apps/onimaxxing/src/gambling/query/compile.ts
149106
- import { OP, Program } from "@tigin-backwards/oxygen-not-included-gambling/query";
149508
+ // ../../node_modules/.pnpm/@tigin-backwards+oxygen-not-included-gambling@0.4.0/node_modules/@tigin-backwards/oxygen-not-included-gambling/query.js
149509
+ var OP = {
149510
+ Nop: 0,
149511
+ PushI32: 1,
149512
+ PushF32: 2,
149513
+ PushBool: 3,
149514
+ Pop: 4,
149515
+ Dup: 5,
149516
+ Swap: 6,
149517
+ AddI: 16,
149518
+ SubI: 17,
149519
+ MulI: 18,
149520
+ NegI: 19,
149521
+ AddF: 20,
149522
+ SubF: 21,
149523
+ MulF: 22,
149524
+ DivF: 23,
149525
+ AbsI: 24,
149526
+ AbsF: 25,
149527
+ MinI: 26,
149528
+ MaxI: 27,
149529
+ MinF: 28,
149530
+ MaxF: 29,
149531
+ I2F: 30,
149532
+ F2I: 31,
149533
+ LtI: 32,
149534
+ LeI: 33,
149535
+ GtI: 34,
149536
+ GeI: 35,
149537
+ EqI: 36,
149538
+ NeI: 37,
149539
+ LtF: 38,
149540
+ LeF: 39,
149541
+ GtF: 40,
149542
+ GeF: 41,
149543
+ EqF: 42,
149544
+ NeF: 43,
149545
+ And: 48,
149546
+ Or: 49,
149547
+ Not: 50,
149548
+ FloorF: 51,
149549
+ CeilF: 52,
149550
+ RoundF: 53,
149551
+ ClampI: 54,
149552
+ ClampF: 55,
149553
+ Jmp: 64,
149554
+ JmpIfFalse: 65,
149555
+ JmpIfTrue: 66,
149556
+ ReturnFail: 67,
149557
+ ReturnScoreI: 68,
149558
+ ReturnScoreF: 69,
149559
+ FindWorld: 80,
149560
+ WorldQ: 81,
149561
+ WorldR: 82,
149562
+ WorldDistHome: 83,
149563
+ WorldHasTrait: 84,
149564
+ WorldTraitCount: 85,
149565
+ CountWorldsWithTrait: 86,
149566
+ WorldHasAnyTrait: 87,
149567
+ WorldHasAllTraits: 88,
149568
+ FindPoi: 96,
149569
+ PoiQ: 97,
149570
+ PoiR: 98,
149571
+ PoiCapacityRoll: 99,
149572
+ PoiRechargeRoll: 100,
149573
+ CountPoiAboveCap: 101,
149574
+ CountPoiByType: 102,
149575
+ CountHarvestable: 103,
149576
+ MeanPoiCap: 104,
149577
+ MaxPoiCap: 105,
149578
+ SumPoiCapAbove: 106,
149579
+ CountPoiCapRech: 107,
149580
+ CountPoiAboveCapOfType: 108,
149581
+ CountPoiCapRechOfType: 109,
149582
+ MeanPoiCapOfType: 110,
149583
+ MeanPoiRechOfType: 111,
149584
+ HasVanilla: 112,
149585
+ VanillaMinDist: 113,
149586
+ CountVanilla: 114,
149587
+ HexDist: 128,
149588
+ HexTaxicab: 129,
149589
+ WorldToWorldDist: 130,
149590
+ PoiToWorldDist: 131,
149591
+ PoiDistHome: 132,
149592
+ PoiToPoiDist: 133,
149593
+ EmitColI: 144,
149594
+ EmitColF: 145,
149595
+ PackLex: 160,
149596
+ HypotheticalGeyserAvg: 161
149597
+ };
149598
+ var Program = class {
149599
+ constructor() {
149600
+ this.strings = [];
149601
+ this.code = [];
149602
+ this.labels = /* @__PURE__ */ new Map();
149603
+ }
149604
+ str(s) {
149605
+ const i = this.strings.indexOf(s);
149606
+ if (i >= 0) return i;
149607
+ this.strings.push(s);
149608
+ return this.strings.length - 1;
149609
+ }
149610
+ emitU8(b) {
149611
+ this.code.push(b & 255);
149612
+ }
149613
+ emitU16(n) {
149614
+ this.code.push(n & 255, n >> 8 & 255);
149615
+ }
149616
+ emitI16(n) {
149617
+ this.emitU16(n < 0 ? n + 65536 : n);
149618
+ }
149619
+ emitI32(n) {
149620
+ const u = n < 0 ? n + 4294967296 : n;
149621
+ this.code.push(u & 255, u >> 8 & 255, u >> 16 & 255, u >> 24 & 255);
149622
+ }
149623
+ emitF32(n) {
149624
+ const buf = new ArrayBuffer(4);
149625
+ new Float32Array(buf)[0] = n;
149626
+ const b = new Uint8Array(buf);
149627
+ this.code.push(b[0], b[1], b[2], b[3]);
149628
+ }
149629
+ // Vararg trait-set emit for OP.WorldHasAnyTrait / OP.WorldHasAllTraits.
149630
+ // Encoding: opcode u8, count u8, count × (str index u16).
149631
+ // Caller: worldIdx already on the stack, then emitTraitSet(OP, [...]).
149632
+ emitTraitSet(op, traits2) {
149633
+ if (traits2.length > 255) {
149634
+ throw new Error(`emitTraitSet: at most 255 traits (got ${traits2.length})`);
149635
+ }
149636
+ this.emitU8(op);
149637
+ this.emitU8(traits2.length);
149638
+ for (const t of traits2) this.emitU16(this.str(t));
149639
+ }
149640
+ // Label support for jumps. `jmpTo("end")` emits a JMP_IF_FALSE with a
149641
+ // placeholder offset; `label("end")` later patches the placeholder.
149642
+ emitJmp(op, labelName) {
149643
+ this.emitU8(op);
149644
+ const patchPos = this.code.length;
149645
+ this.emitI16(0);
149646
+ const entry = this.labels.get(labelName) || { target: void 0, patches: [] };
149647
+ entry.patches.push({ patchPos, opEnd: this.code.length });
149648
+ this.labels.set(labelName, entry);
149649
+ }
149650
+ label(name) {
149651
+ const pos = this.code.length;
149652
+ const entry = this.labels.get(name) || { target: void 0, patches: [] };
149653
+ entry.target = pos;
149654
+ for (const p of entry.patches) {
149655
+ const off = pos - p.opEnd;
149656
+ this.code[p.patchPos] = off & 255;
149657
+ this.code[p.patchPos + 1] = off >> 8 & 255;
149658
+ }
149659
+ entry.patches = [];
149660
+ this.labels.set(name, entry);
149661
+ }
149662
+ // Build the final Uint8Array.
149663
+ build() {
149664
+ for (const [name, entry] of this.labels) {
149665
+ if (entry.patches.length > 0) {
149666
+ throw new Error(`unresolved label: ${name} (${entry.patches.length} refs)`);
149667
+ }
149668
+ }
149669
+ const enc = new TextEncoder();
149670
+ const stringBlock = [];
149671
+ for (const s of this.strings) {
149672
+ const bytes = enc.encode(s);
149673
+ stringBlock.push(bytes.length & 255, bytes.length >> 8 & 255);
149674
+ for (const b of bytes) stringBlock.push(b);
149675
+ }
149676
+ const codeLen = this.code.length;
149677
+ const header = [
149678
+ 79,
149679
+ 82,
149680
+ 81,
149681
+ 66,
149682
+ // "ORQB"
149683
+ 1,
149684
+ 0,
149685
+ // version
149686
+ 0,
149687
+ 0,
149688
+ // flags
149689
+ this.strings.length & 255,
149690
+ this.strings.length >> 8 & 255
149691
+ ];
149692
+ const out = new Uint8Array(header.length + stringBlock.length + 4 + codeLen);
149693
+ let off = 0;
149694
+ out.set(header, off);
149695
+ off += header.length;
149696
+ out.set(stringBlock, off);
149697
+ off += stringBlock.length;
149698
+ out[off++] = codeLen & 255;
149699
+ out[off++] = codeLen >> 8 & 255;
149700
+ out[off++] = codeLen >> 16 & 255;
149701
+ out[off++] = codeLen >> 24 & 255;
149702
+ out.set(this.code, off);
149703
+ return out;
149704
+ }
149705
+ };
149107
149706
 
149108
149707
  // ../../apps/onimaxxing/src/gambling/query/cluster-vocab.ts
149109
149708
  function clusterKnownWorlds(clusterCoord) {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onimaxxing/sussy-seeds-mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "MCP server for Oxygen Not Included seed hunting. Runs the sussy-seeds wasm scanner over stdio; the LLM composes Builder AST specs and drives cluster / summary / map-tier scans against the game's real worldgen.",
5
5
  "keywords": [
6
6
  "claude",
@@ -35,35 +35,34 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "scripts": {
39
- "dev": "tsx src/index.ts",
40
- "build": "tsup",
41
- "typecheck": "tsc --noEmit -p tsconfig.json",
42
- "lint": "pnpm run typecheck && oxfmt . && oxlint src --deny-warnings --report-unused-disable-directives",
43
- "format": "oxfmt .",
44
- "test": "vitest run --passWithNoTests",
45
- "prepublishOnly": "pnpm run build"
46
- },
47
38
  "dependencies": {
48
39
  "@modelcontextprotocol/sdk": "1.26.0",
49
- "@tigin-backwards/oxygen-not-included-gambling": "0.4.0",
50
- "@tigin-backwards/oxygen-not-included-worldgen-node": "0.14.1",
40
+ "@onimaxxing/worldgen-node": "0.15.1",
51
41
  "zod": "^3.25.0"
52
42
  },
53
43
  "devDependencies": {
54
- "@onimaxxing/coord-codec": "workspace:*",
55
- "@onimaxxing/i18n": "workspace:*",
56
- "@onimaxxing/knowledge-graph": "workspace:*",
57
- "@onimaxxing/prefab-kind": "workspace:*",
44
+ "@tigin-backwards/oxygen-not-included-gambling": "0.4.0",
58
45
  "@types/node": "^24.10.1",
59
46
  "oxfmt": "0.53.0",
60
47
  "oxlint": "^1.0.0",
61
48
  "tsup": "^8.3.0",
62
49
  "tsx": "^4.19.0",
63
50
  "typescript": "~5.9.3",
64
- "vitest": "^4.0.18"
51
+ "vitest": "^4.0.18",
52
+ "@onimaxxing/coord-codec": "0.0.0",
53
+ "@onimaxxing/i18n": "0.0.0",
54
+ "@onimaxxing/knowledge-graph": "0.0.0",
55
+ "@onimaxxing/prefab-kind": "0.0.0"
65
56
  },
66
57
  "engines": {
67
58
  "node": ">=20"
59
+ },
60
+ "scripts": {
61
+ "dev": "tsx src/index.ts",
62
+ "build": "tsup",
63
+ "typecheck": "tsc --noEmit -p tsconfig.json",
64
+ "lint": "pnpm run typecheck && oxfmt . && oxlint src --deny-warnings --report-unused-disable-directives",
65
+ "format": "oxfmt .",
66
+ "test": "vitest run --passWithNoTests"
68
67
  }
69
- }
68
+ }