@rulvar/planner 1.23.0 → 1.24.1

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/dist/index.js +19 -4
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -18,6 +18,14 @@ import { MessageChannel, Worker } from "node:worker_threads";
18
18
  * P2-4: the hand-maintained list had silently fallen three options
19
19
  * behind, and the card claimed identical calls journal as one result,
20
20
  * which the ordinal semantics contradict).
21
+ *
22
+ * The tools and model semantics are pinned by the v1.23.0 review:
23
+ * string entries of `tools` are registered TOOLSET names (the profile
24
+ * card prints the valid set; profile names there are agentType values,
25
+ * and runtime resolution rejects them as unknown toolsets before any
26
+ * provider call), and `model`/`routing` are normally omitted because
27
+ * the profile card never names models, so the planner has no valid ref
28
+ * source unless the goal text itself supplies an allowlist.
21
29
  */
22
30
  const CARD = [
23
31
  "You write ONE JavaScript async-function BODY (the workflow script).",
@@ -27,11 +35,14 @@ const CARD = [
27
35
  "- agent(prompt, opts?) -> Promise<value>: one subagent call.",
28
36
  ` opts (JSON only): { ${SANDBOX_AGENT_OPT_KEYS.map((key) => `${key}?`).join(", ")} }`,
29
37
  " - schema: a JSON Schema LITERAL (never a library value); the result is the validated object.",
30
- " - tools: an array of registered profile NAMES (strings only).",
38
+ " - tools: an array of registered TOOLSET names, exactly the ones the profile card lists;",
39
+ " never agent profile names (an unknown name is a typed error before any call).",
31
40
  " - onError: 'throw' | 'null' (default 'null'; a failed call yields null and the loss is recorded).",
32
- " - model: a string; agentType: a registered profile name from the profile card.",
33
- " - routing: a JSON map of invocation role to a model ref from the profile card",
34
- " (e.g. { summarize: '<model ref>' }); wins over the profile's own routing.",
41
+ " - agentType: a registered profile name from the profile card.",
42
+ " - model and routing: normally OMIT BOTH; the host profiles and routing decide models,",
43
+ " and the profile card never names any. Use them only when the goal text itself lists",
44
+ " allowed model refs (then routing maps invocation role to one of them, e.g.",
45
+ " { summarize: '<allowed ref>' }, and wins over the profile's own routing).",
35
46
  " - memoizeOutcome: true journals this exact outcome for replay on resume EVEN when it failed (default: failures rerun).",
36
47
  " - replay: 'cache' | 'never'; 'never' forces a fresh live call on every resume, 'cache' reuses any matching prior.",
37
48
  "- parallel(fns, opts?) -> Promise<values[]>: concurrent branches; fns is an array of async functions.",
@@ -310,6 +321,10 @@ var WorkerSandboxRunner = class {
310
321
  }
311
322
  if (message.t === "fail") {
312
323
  const wire = message.error;
324
+ if (wire.code === "config") {
325
+ settleErr(new ConfigError(wire.message));
326
+ return;
327
+ }
313
328
  const rebuilt = new Error(wire.message);
314
329
  rebuilt.name = wire.code;
315
330
  settleErr(rebuilt);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulvar/planner",
3
- "version": "1.23.0",
3
+ "version": "1.24.1",
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.23.0",
27
- "@rulvar/core": "1.23.0"
26
+ "@rulvar/core": "1.24.1",
27
+ "eslint-plugin-rulvar": "1.24.1"
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.23.0"
33
+ "@rulvar/testing": "1.24.1"
34
34
  },
35
35
  "repository": {
36
36
  "type": "git",