@rulvar/cli 1.11.0 → 1.12.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
|
@@ -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-
|
|
86995
|
+
const { hfs } = await import("./src-pgjrRW_Q.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-
|
|
87043
|
+
const { hfs } = await import("./src-pgjrRW_Q.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;
|
|
@@ -95178,7 +95178,18 @@ async function plan(engine, goal, o) {
|
|
|
95178
95178
|
repairRounds,
|
|
95179
95179
|
...o?.model === void 0 ? {} : { model: o.model }
|
|
95180
95180
|
};
|
|
95181
|
-
const
|
|
95181
|
+
const runId = planRunIdOf(goal);
|
|
95182
|
+
const recorded = (await engine.stores.journal.listRuns()).find((meta) => meta.runId === runId);
|
|
95183
|
+
const existing = recorded !== void 0 || (await engine.stores.journal.load(runId)).length > 0;
|
|
95184
|
+
const requested = o?.run?.budgetUsd;
|
|
95185
|
+
if (existing && requested !== void 0 && recorded?.budgetUsd !== requested) process.emitWarning(`plan: run '${runId}' already has a planning journal ` + (recorded?.budgetUsd === void 0 ? "with no recorded budget ceiling" : `with its ceiling frozen at $${String(recorded.budgetUsd)}`) + `; the requested budgetUsd ${String(requested)} does not apply (delete the run or plan a new goal to change the ceiling)`, {
|
|
95186
|
+
code: "RULVAR_PLAN_BUDGET_DRIFT",
|
|
95187
|
+
type: "RulvarWarning"
|
|
95188
|
+
});
|
|
95189
|
+
const outcome = await (existing ? engine.resume(runId, planWorkflow, { args }) : engine.run(planWorkflow, args, {
|
|
95190
|
+
runId,
|
|
95191
|
+
...o?.run
|
|
95192
|
+
})).result;
|
|
95182
95193
|
if (outcome.status !== "ok" || outcome.value === void 0) {
|
|
95183
95194
|
const wire = outcome.error;
|
|
95184
95195
|
throw new ScriptRejected(`plan: the planner run settled '${outcome.status}'${wire === void 0 ? "" : `: ${wire.message}`}`, { data: {
|
|
@@ -95197,10 +95208,13 @@ async function plan(engine, goal, o) {
|
|
|
95197
95208
|
/**
|
|
95198
95209
|
* plan-then-run in one call (amended during M6-T05:
|
|
95199
95210
|
* the composition is async because planning itself is a run).
|
|
95211
|
+
* options.plan bounds the planning conversation, options.run bounds the
|
|
95212
|
+
* generated workflow's execution; the two ceilings are independent, and
|
|
95213
|
+
* the bare form without options runs BOTH legs unbounded, as before.
|
|
95200
95214
|
*/
|
|
95201
|
-
async function runPlanned(engine, goal, args) {
|
|
95202
|
-
const planned = await plan(engine, goal);
|
|
95203
|
-
return engine.run(planned.workflow, args ?? null);
|
|
95215
|
+
async function runPlanned(engine, goal, args, options) {
|
|
95216
|
+
const planned = await plan(engine, goal, options?.plan);
|
|
95217
|
+
return engine.run(planned.workflow, args ?? null, options?.run);
|
|
95204
95218
|
}
|
|
95205
95219
|
/**
|
|
95206
95220
|
* WorkerSandboxRunner (M6-T02): the mandatory runner for machine-generated
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resumeCommand, c as driveRun, d as renderEventLine, f as DEFAULT_STORE_DIR, g as looksLikeFile, h as loadWorkflowModule, i as inspectCommand, l as reportOutcome, m as loadCliConfig, n as HELP, o as runCommand, p as assembleEngine, r as runCli, s as runsLsCommand, t as processIo, u as attachProgress } from "./io-
|
|
1
|
+
import { a as resumeCommand, c as driveRun, d as renderEventLine, f as DEFAULT_STORE_DIR, g as looksLikeFile, h as loadWorkflowModule, i as inspectCommand, l as reportOutcome, m as loadCliConfig, n as HELP, o as runCommand, p as assembleEngine, r as runCli, s as runsLsCommand, t as processIo, u as attachProgress } from "./io-Bex4Du1t.js";
|
|
2
2
|
import { ConfigError, InvalidResolutionError, JournalCompatibilityError, LeaseHeldError, Replayer, RulvarError, buildDeriverRegistry, costReportFromJournal, maskSecrets, normalizeEntry, scanJournalCompatibility, validateSchemaSpec } from "@rulvar/core";
|
|
3
3
|
//#region src/server.ts
|
|
4
4
|
/**
|
|
@@ -481,7 +481,7 @@ async function planCommand(argv, context) {
|
|
|
481
481
|
if (goal === void 0 || parsed.positionals.length > 1) throw new ConfigError("usage: rulvar plan \"<goal>\" [--dry-run]");
|
|
482
482
|
let plannerModule;
|
|
483
483
|
try {
|
|
484
|
-
plannerModule = await import("./dist-
|
|
484
|
+
plannerModule = await import("./dist-D9g28MUP.js");
|
|
485
485
|
} catch {
|
|
486
486
|
throw new ConfigError("rulvar plan requires @rulvar/planner (the plan agent, compileScript, and the worker sandbox live there); install it next to the CLI");
|
|
487
487
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulvar/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "Rulvar shell: run/resume/runs/inspect/plan/kb commands, TUI progress, createServer, createWorker, OTel exporter.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@rulvar/core": "1.
|
|
25
|
+
"@rulvar/core": "1.12.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^22.20.0",
|
|
29
29
|
"tsdown": "^0.22.3",
|
|
30
30
|
"typescript": "~6.0.3",
|
|
31
|
-
"@rulvar/
|
|
32
|
-
"@rulvar/
|
|
33
|
-
"@rulvar/
|
|
34
|
-
"@rulvar/
|
|
35
|
-
"@rulvar/
|
|
31
|
+
"@rulvar/store-sqlite": "1.12.0",
|
|
32
|
+
"@rulvar/plan": "1.12.0",
|
|
33
|
+
"@rulvar/planner": "1.12.0",
|
|
34
|
+
"@rulvar/evals": "1.12.0",
|
|
35
|
+
"@rulvar/testing": "1.12.0"
|
|
36
36
|
},
|
|
37
37
|
"bin": {
|
|
38
38
|
"rulvar": "./dist/cli.js"
|