@vibemancer/core 1.0.0 → 1.0.2

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.
@@ -607,7 +607,7 @@ declare function currentRuleset(): Record<string, number>;
607
607
  * Used to gate spectator replays: a recorded match can only be re-simulated when
608
608
  * the runtime engine version matches the version that produced the match.
609
609
  */
610
- declare const ENGINE_VERSION = 3668533683721718;
610
+ declare const ENGINE_VERSION = 1203306608058186;
611
611
 
612
612
  interface InternalWizardState extends WizardState {
613
613
  missileConfig?: MissileConfig;
@@ -2418,9 +2418,6 @@ type WorkerFactory = (code: string) => {
2418
2418
  worker: WorkerLike;
2419
2419
  cleanup?: () => void;
2420
2420
  };
2421
- /**
2422
- * Options for browser sandbox creation.
2423
- */
2424
2421
  interface BrowserSandboxOptions {
2425
2422
  /** Timeout in ms for fight/simulate calls (default: 30000). */
2426
2423
  timeoutMs?: number;
@@ -222,7 +222,7 @@ import {
222
222
  withMissileContext,
223
223
  withWizardContext,
224
224
  wrapWithParams
225
- } from "./chunk-OTLG74DO.js";
225
+ } from "./chunk-XYEK7THS.js";
226
226
  export {
227
227
  ALL_BOTS,
228
228
  ARENA_MAX,
package/dist/index.js CHANGED
@@ -222,7 +222,7 @@ import {
222
222
  withMissileContext,
223
223
  withWizardContext,
224
224
  wrapWithParams
225
- } from "./chunk-OTLG74DO.js";
225
+ } from "./chunk-XYEK7THS.js";
226
226
 
227
227
  // src/engine/sandbox.ts
228
228
  import ivm from "isolated-vm";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibemancer/core",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Vibemancer game engine - competitive programming wizard battle arena",
5
5
  "type": "module",
6
6
  "author": "Low Entry",
@@ -51,6 +51,18 @@ export type WorkerFactory = (code: string) => {worker: WorkerLike; cleanup?: ()
51
51
  /**
52
52
  * Options for browser sandbox creation.
53
53
  */
54
+ /**
55
+ * Floor for worker STARTUP, independent of the fight budget.
56
+ *
57
+ * `timeoutMs` answers "how long may a fight run" — the crasher tests set it to 2-3s on
58
+ * purpose so an infinite loop is caught quickly. Booting a worker is not a fight, and on a
59
+ * busy machine it can exceed a deliberately tiny budget, which surfaced as "Worker
60
+ * initialization timed out" from tests asserting something else entirely.
61
+ *
62
+ * A floor rather than a replacement: a caller asking for a LONGER budget still gets it.
63
+ */
64
+ const WORKER_INIT_MIN_MS = 30_000;
65
+
54
66
  export interface BrowserSandboxOptions
55
67
  {
56
68
  /** Timeout in ms for fight/simulate calls (default: 30000). */
@@ -214,7 +226,7 @@ export class BrowserMatchSandbox
214
226
 
215
227
  try
216
228
  {
217
- await sandbox.waitForReady(timeout);
229
+ await sandbox.waitForReady(Math.max(timeout, WORKER_INIT_MIN_MS));
218
230
  }
219
231
  catch(error)
220
232
  {
@@ -9,4 +9,4 @@
9
9
  * Used to gate spectator replays: a recorded match can only be re-simulated when
10
10
  * the runtime engine version matches the version that produced the match.
11
11
  */
12
- export const ENGINE_VERSION = 3668533683721718;
12
+ export const ENGINE_VERSION = 1203306608058186;