@rulvar/planner 1.34.0 → 1.36.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/dist/index.d.ts CHANGED
@@ -47,7 +47,12 @@ interface PlanOptions {
47
47
  model?: ModelSpec;
48
48
  /** Registered profile names to advertise; default: every profile. */
49
49
  profiles?: string[];
50
- /** Self-repair rounds from JSON diagnostics; default 3 (Appendix A). */
50
+ /**
51
+ * Self-repair rounds from JSON diagnostics; default 3 (Appendix A). A
52
+ * nonnegative integer (zero means a single draft, no repair), refused
53
+ * as a ConfigError before the runId derivation, store lookup, and any
54
+ * provider dispatch.
55
+ */
51
56
  repairRounds?: number;
52
57
  /**
53
58
  * Run options of the planning conversation itself, applied at GENESIS
package/dist/index.js CHANGED
@@ -204,6 +204,7 @@ const planWorkflow = defineWorkflow({ name: "rulvar-plan" }, async (ctx, args) =
204
204
  });
205
205
  async function plan(engine, goal, o) {
206
206
  const repairRounds = o?.repairRounds ?? 3;
207
+ if (!Number.isInteger(repairRounds) || repairRounds < 0) throw new ConfigError(`PlanOptions.repairRounds must be a nonnegative integer; got ${String(repairRounds)}`);
207
208
  const args = {
208
209
  goal,
209
210
  cards: [
@@ -277,6 +278,14 @@ var WorkerSandboxRunner = class {
277
278
  workerUrl;
278
279
  execArgv;
279
280
  constructor(options) {
281
+ if (options?.timeoutMs !== void 0) {
282
+ const timeoutMs = options.timeoutMs;
283
+ if (typeof timeoutMs !== "number" || !Number.isInteger(timeoutMs) || timeoutMs < 1 || timeoutMs > 2147483647) throw new ConfigError(`WorkerSandboxRunner timeoutMs must be an integer between 1 and 2147483647 ms (the Node timer maximum); got ${String(timeoutMs)}`);
284
+ }
285
+ if (options?.memoryMb !== void 0) {
286
+ const memoryMb = options.memoryMb;
287
+ if (typeof memoryMb !== "number" || !Number.isInteger(memoryMb) || memoryMb < 1) throw new ConfigError(`WorkerSandboxRunner memoryMb must be a positive integer; got ${String(memoryMb)}`);
288
+ }
280
289
  this.timeoutMs = options?.timeoutMs ?? 3e5;
281
290
  this.memoryMb = options?.memoryMb ?? 512;
282
291
  this.workerUrl = options?.workerUrl ?? new URL("./sandbox-worker.js", import.meta.url);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulvar/planner",
3
- "version": "1.34.0",
3
+ "version": "1.36.0",
4
4
  "description": "Rulvar flagship hybrid mode: plan agent, compileScript, WorkerSandboxRunner, self-repair loop.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -23,14 +23,14 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "eslint": "^9.39.4",
26
- "eslint-plugin-rulvar": "1.34.0",
27
- "@rulvar/core": "1.34.0"
26
+ "@rulvar/core": "1.36.0",
27
+ "eslint-plugin-rulvar": "1.36.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "^22.20.0",
31
31
  "tsdown": "^0.22.3",
32
32
  "typescript": "~6.0.3",
33
- "@rulvar/testing": "1.34.0"
33
+ "@rulvar/testing": "1.36.0"
34
34
  },
35
35
  "repository": {
36
36
  "type": "git",