@rulvar/cli 1.1.0 → 1.3.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/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { r as runCli, t as processIo } from "./io-TjsY28AR.js";
2
+ import { r as runCli, t as processIo } from "./io-DSpNsEKg.js";
3
3
  //#region src/cli.ts
4
4
  /**
5
5
  * The `rulvar` bin entry: thin wrapper over runCli with process io.
@@ -14,9 +14,9 @@ var __esmMin = (fn, res, err) => () => {
14
14
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
15
15
  var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
16
16
  //#endregion
17
- //#region ../planner/dist/compile-CfWgGVyz.js
17
+ //#region ../planner/dist/compile-BtCY9wfO.js
18
18
  /**
19
- * The exact curated sandbox global set, in docs order (docs/06, 8.2).
19
+ * The exact curated sandbox global set, in canonical order.
20
20
  * The worker binds the ctx methods as bare globals under these names and
21
21
  * the API card teaches exactly this list.
22
22
  */
@@ -180,11 +180,11 @@ function scanImports(source, blanked, allowImports) {
180
180
  return diagnostics;
181
181
  }
182
182
  /**
183
- * Validates and compiles planner-generated source into a CompiledWorkflow
184
- * (docs/06, 8.3). The source is an async function body over the sandbox
183
+ * Validates and compiles planner-generated source into a CompiledWorkflow.
184
+ * The source is an async function body over the sandbox
185
185
  * globals; its `return` value is the workflow result. The compiled form is
186
186
  * pure data (the source is evaluated only inside the worker sandbox);
187
- * machine scripts run under errorPolicy 'lenient' (docs/06, Appendix A).
187
+ * machine scripts run under errorPolicy 'lenient'.
188
188
  */
189
189
  function compileScript(source, o) {
190
190
  const allowImports = o?.allowImports ?? [];
@@ -86992,7 +86992,7 @@ var require_eslint_helpers = /* @__PURE__ */ __commonJSMin(((exports, module) =>
86992
86992
  */
86993
86993
  async function globMatch({ basePath, pattern }) {
86994
86994
  let found = false;
86995
- const { hfs } = await import("./src-DVFj9U50.js");
86995
+ const { hfs } = await import("./src-BA7JP7vn.js");
86996
86996
  const patternToUse = normalizeToPosix(path$9.relative(basePath, pattern));
86997
86997
  const matcher = new Minimatch(patternToUse, MINIMATCH_OPTIONS);
86998
86998
  const walkSettings = {
@@ -87040,7 +87040,7 @@ var require_eslint_helpers = /* @__PURE__ */ __commonJSMin(((exports, module) =>
87040
87040
  return new Minimatch(patternToUse, MINIMATCH_OPTIONS);
87041
87041
  });
87042
87042
  const unmatchedPatterns = /* @__PURE__ */ new Set([...relativeToPatterns.keys()]);
87043
- const { hfs } = await import("./src-DVFj9U50.js");
87043
+ const { hfs } = await import("./src-BA7JP7vn.js");
87044
87044
  const walk = hfs.walk(basePath, {
87045
87045
  async directoryFilter(entry) {
87046
87046
  if (!matchers.some((matcher) => matcher.match(entry.path, true))) return false;
@@ -94765,7 +94765,7 @@ const CTX_CALL_METHODS = /* @__PURE__ */ new Set([
94765
94765
  "parallel",
94766
94766
  "pipeline"
94767
94767
  ]);
94768
- /** Bare sandbox globals that are ctx calls in compiled scripts (docs/06, 8.2). */
94768
+ /** Bare sandbox globals that are ctx calls in compiled scripts. */
94769
94769
  const SANDBOX_CALL_GLOBALS = /* @__PURE__ */ new Set([
94770
94770
  "agent",
94771
94771
  "workflow",
@@ -94980,8 +94980,7 @@ const plugin = {
94980
94980
  };
94981
94981
  /**
94982
94982
  * The flat-config preset for workflow modules: the determinism bans as
94983
- * errors, the duplicate-identical-call advisory as a warning (docs/06,
94984
- * 8.4).
94983
+ * errors, the duplicate-identical-call advisory as a warning.
94985
94984
  */
94986
94985
  const workflowsConfig = {
94987
94986
  name: "rulvar/workflows",
@@ -95000,7 +94999,7 @@ plugin.configs = { workflows: workflowsConfig };
95000
94999
  //#region ../planner/dist/index.js
95001
95000
  /**
95002
95001
  * The API card (M6-T04): teaches the planner model EXACTLY the sandbox
95003
- * dialect and global set (docs/06, sections 8.2 and 8.3). The card is a
95002
+ * dialect and global set. The card is a
95004
95003
  * pure constant, byte-stable across runs; plan() (M6-T05) composes it
95005
95004
  * with profileCard(registry) and the goal. The usage examples are
95006
95005
  * distilled from the runnable examples/ corpus (M5-T09).
@@ -95052,7 +95051,7 @@ function apiCard() {
95052
95051
  }
95053
95052
  /**
95054
95053
  * The plan agent and the self-repair loop (M6-T05): mode (b), the
95055
- * flagship hybrid (docs/06, section 9.2). plan() asks a planner model
95054
+ * flagship hybrid. plan() asks a planner model
95056
95055
  * (role 'plan') to write a script against the API card and the profile
95057
95056
  * card, lints it with eslint-plugin-rulvar, self-repairs up to
95058
95057
  * repairRounds rounds from the JSON diagnostics, and compiles the
@@ -95063,7 +95062,7 @@ function apiCard() {
95063
95062
  * against the same store REPLAYS the unchanged prefix for free
95064
95063
  * (invariant I1; the M6-T05 acceptance).
95065
95064
  */
95066
- /** The deterministic planner runId: one goal, one journal (docs/06, 9.2). */
95065
+ /** The deterministic planner runId: one goal, one journal. */
95067
95066
  function planRunIdOf(goal) {
95068
95067
  return `plan-${createHash("sha256").update(goal, "utf8").digest("hex").slice(0, 24)}`;
95069
95068
  }
@@ -95196,7 +95195,7 @@ async function plan(engine, goal, o) {
95196
95195
  };
95197
95196
  }
95198
95197
  /**
95199
- * plan-then-run in one call (docs/06, section 9; amended during M6-T05:
95198
+ * plan-then-run in one call (amended during M6-T05:
95200
95199
  * the composition is async because planning itself is a run).
95201
95200
  */
95202
95201
  async function runPlanned(engine, goal, args) {
@@ -95207,19 +95206,19 @@ async function runPlanned(engine, goal, args) {
95207
95206
  * WorkerSandboxRunner (M6-T02): the mandatory runner for machine-generated
95208
95207
  * scripts, mode (b). Owns the worker lifecycle and the dedicated
95209
95208
  * MessageChannel; every primitive call is served by the core sandbox
95210
- * bridge against the canonical run ctx (docs/06, 8.2).
95209
+ * bridge against the canonical run ctx.
95211
95210
  *
95212
95211
  * Port lifecycle: one channel per run; the worker end rides the init
95213
95212
  * transfer list; the host end is referenced while the worker computes and
95214
95213
  * unreferenced while every worker frame is blocked on a host call, so a
95215
- * suspended run lets the process exit (docs/06, 2.7) and a computing
95214
+ * suspended run lets the process exit and a computing
95216
95215
  * worker keeps it alive. Breaching timeoutMs or memoryMb terminates the
95217
95216
  * worker and the run completes with outcome 'error' carrying the typed
95218
- * SandboxError (docs/02, error taxonomy).
95217
+ * SandboxError.
95219
95218
  */
95220
95219
  const DEFAULT_SANDBOX_TIMEOUT_MS = 3e5;
95221
95220
  const DEFAULT_SANDBOX_MEMORY_MB = 512;
95222
- /** Accepts CompiledWorkflow ONLY: feeding a closure is a type error (docs/06, 8). */
95221
+ /** Accepts CompiledWorkflow ONLY: feeding a closure is a type error. */
95223
95222
  var WorkerSandboxRunner = class {
95224
95223
  timeoutMs;
95225
95224
  memoryMb;