owenloop 0.5.26 → 0.5.27
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/CHANGELOG.md +7 -0
- package/dist/src/defs.js +59 -8
- package/dist/src/types.d.ts +13 -0
- package/package.json +1 -1
- package/plugins/claude-code/plugin/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/plugin/.mcp.json +1 -1
- package/plugins/codex/plugins/owenloop/.codex-plugin/plugin.json +1 -1
- package/plugins/codex/plugins/owenloop/.mcp.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ All notable changes to this project are documented here. The format is based on
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
|
|
5
5
|
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.5.27](https://github.com/typicalday/owenloop/compare/v0.5.26...v0.5.27) (2026-09-05)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **defs:** a synthesized judge inherits the producer's working directory ([#302](https://github.com/typicalday/owenloop/issues/302)) ([14990fd](https://github.com/typicalday/owenloop/commit/14990fd0f6e167e8a2a8bbcc393ac360aa07d713))
|
|
13
|
+
|
|
7
14
|
## [0.5.26](https://github.com/typicalday/owenloop/compare/v0.5.25...v0.5.26) (2026-09-01)
|
|
8
15
|
|
|
9
16
|
|
package/dist/src/defs.js
CHANGED
|
@@ -39,7 +39,7 @@ const RAW_PRODUCE_KEYS = ['name', 'schema', 'judges', 'maxAttempts', 'maxSchemaF
|
|
|
39
39
|
* fields, so it gets its own allowlist rather than folding into
|
|
40
40
|
* RAW_PRODUCE_KEYS (§27 unknown-key rejection). */
|
|
41
41
|
const RAW_GROUP_KEYS = ['group', 'mode', 'of'];
|
|
42
|
-
const RAW_JUDGE_KEYS = ['name', 'body', 'bodyFile', 'model', 'inputs', 'cadence', 'maxRunsPerDay', 'executor', 'command', 'spec', 'capabilities', 'modifiers'];
|
|
42
|
+
const RAW_JUDGE_KEYS = ['name', 'body', 'bodyFile', 'model', 'inputs', 'cadence', 'maxRunsPerDay', 'executor', 'command', 'spec', 'workdir', 'workdirFrom', 'capabilities', 'modifiers'];
|
|
43
43
|
/** Keys valid on a normal (non-calls:, non-include:) step entry. */
|
|
44
44
|
const RAW_STEP_KEYS = [
|
|
45
45
|
'name', 'consumes', 'produces', 'generates', 'invalidates', 'cadence',
|
|
@@ -362,6 +362,14 @@ function parseJudges(v, ctx, baseDir) {
|
|
|
362
362
|
judge.command = asString(raw.command, `judge '${name}'.command`);
|
|
363
363
|
if (raw.spec !== undefined)
|
|
364
364
|
judge.spec = asExtension(raw.spec, `judge '${name}'.spec`);
|
|
365
|
+
if (raw.workdir !== undefined)
|
|
366
|
+
judge.workdir = asString(raw.workdir, `judge '${name}'.workdir`);
|
|
367
|
+
if (raw.workdirFrom !== undefined) {
|
|
368
|
+
judge.workdirFrom = asString(raw.workdirFrom, `judge '${name}'.workdirFrom`);
|
|
369
|
+
}
|
|
370
|
+
if (raw.workdir !== undefined && raw.workdirFrom !== undefined) {
|
|
371
|
+
throw new DefError(`judge '${name}' may not declare both workdir and workdirFrom`);
|
|
372
|
+
}
|
|
365
373
|
if (raw.capabilities !== undefined) {
|
|
366
374
|
const caps = asStringArray(raw.capabilities, `judge '${name}'.capabilities`);
|
|
367
375
|
if (caps.length === 0) {
|
|
@@ -997,24 +1005,63 @@ export function parseDef(raw, source, baseDir) {
|
|
|
997
1005
|
}
|
|
998
1006
|
return def;
|
|
999
1007
|
}
|
|
1008
|
+
/**
|
|
1009
|
+
* The stem half of a `workdirFrom` expression, resolved against a list of
|
|
1010
|
+
* consumed stems. Mirrors `parseWorkdirFrom`'s boundary walk (longest stem
|
|
1011
|
+
* first, because a stem may itself contain dots) but takes bare names, since a
|
|
1012
|
+
* synthesized judge has not built its consume patterns yet. Returns null when
|
|
1013
|
+
* no consumed stem matches — the expression then names a definition input,
|
|
1014
|
+
* which validateDef resolves without a consume edge.
|
|
1015
|
+
*/
|
|
1016
|
+
function workdirFromStem(raw, stems) {
|
|
1017
|
+
const r = raw.trim();
|
|
1018
|
+
for (let boundary = r.lastIndexOf('.'); boundary > 0; boundary = r.lastIndexOf('.', boundary - 1)) {
|
|
1019
|
+
if (r.length - boundary - 1 === 0)
|
|
1020
|
+
continue;
|
|
1021
|
+
const stem = r.slice(0, boundary);
|
|
1022
|
+
if (stems.includes(stem))
|
|
1023
|
+
return stem;
|
|
1024
|
+
}
|
|
1025
|
+
return null;
|
|
1026
|
+
}
|
|
1000
1027
|
/**
|
|
1001
1028
|
* Synthesize one full StepDef per declared `judges:` entry on a produce
|
|
1002
1029
|
* pattern (§24 §3.2, §7.2). Shape mirrors the `calls:` template above, with
|
|
1003
1030
|
* exactly three deltas from a hand-written step: the `judges: <stem>` marker
|
|
1004
1031
|
* (eligibility trigger, replacing inputsGreen — see model.ts), `produces: []`
|
|
1005
1032
|
* (a judge emits a verdict against the judged stem, not a new artifact), and
|
|
1006
|
-
* `consumes: [stem, ...(inputs ? producerConsumeStems : [])]`
|
|
1007
|
-
* flows from the existing consume-edge check (`assertAuthority`)
|
|
1008
|
-
* special-casing. Everything else (cadence, maxRunsPerDay, model, body,
|
|
1009
|
-
* maxAttempts/maxSchemaFailures defaults) is inherited
|
|
1010
|
-
* an ordinary step, because judge orders flow through the normal
|
|
1033
|
+
* `consumes: [stem, ...(inputs ? producerConsumeStems : []), ...workdirFromStem]`
|
|
1034
|
+
* so authority flows from the existing consume-edge check (`assertAuthority`)
|
|
1035
|
+
* with no special-casing. Everything else (cadence, maxRunsPerDay, model, body,
|
|
1036
|
+
* workdir/workdirFrom, maxAttempts/maxSchemaFailures defaults) is inherited
|
|
1037
|
+
* exactly like an ordinary step, because judge orders flow through the normal
|
|
1011
1038
|
* eligibleFirings → applySchedule → claim → buildOrder pipeline (§7.1).
|
|
1012
1039
|
*/
|
|
1013
|
-
function synthesizeJudgeSteps(producerStepName, pat, producerConsumeStems, producerX, producerCapabilities) {
|
|
1040
|
+
function synthesizeJudgeSteps(producerStepName, pat, producerConsumeStems, producerX, producerCapabilities, producerWorkdir, producerWorkdirFrom) {
|
|
1014
1041
|
if (!pat.judges || pat.judges.length === 0)
|
|
1015
1042
|
return [];
|
|
1016
1043
|
return pat.judges.map((j) => {
|
|
1044
|
+
// A judge with no workdir of its own INHERITS the producer's, so it reads
|
|
1045
|
+
// the same tree the work it judges was produced in. Declaring either key
|
|
1046
|
+
// opts out of both halves of the inheritance: producer and judge each carry
|
|
1047
|
+
// at most one, and silently pairing an authored `workdir` with an inherited
|
|
1048
|
+
// `workdirFrom` would trip validateDef's mutual-exclusion check on a
|
|
1049
|
+
// definition the author never wrote that way.
|
|
1050
|
+
const authoredWorkdir = j.workdir !== undefined || j.workdirFrom !== undefined;
|
|
1051
|
+
const workdir = authoredWorkdir ? j.workdir : producerWorkdir;
|
|
1052
|
+
const workdirFrom = authoredWorkdir ? j.workdirFrom : producerWorkdirFrom;
|
|
1017
1053
|
const consumeStems = j.inputs ? [pat.stem, ...producerConsumeStems] : [pat.stem];
|
|
1054
|
+
// A workdirFrom value is resolved from a CONSUMED artifact, so the stem it
|
|
1055
|
+
// names must be on this step's consume list or validateDef rejects the whole
|
|
1056
|
+
// definition. `inputs: false` is the case that needs this: the judge sees
|
|
1057
|
+
// only the judged stem, which is never the stem the producer resolved its
|
|
1058
|
+
// workdir from. Deduplicated, so `inputs: true` (where the stem is already
|
|
1059
|
+
// carried) stays byte-identical to the pre-inheritance shape.
|
|
1060
|
+
if (workdirFrom !== undefined) {
|
|
1061
|
+
const stem = workdirFromStem(workdirFrom, producerConsumeStems);
|
|
1062
|
+
if (stem !== null && !consumeStems.includes(stem))
|
|
1063
|
+
consumeStems.push(stem);
|
|
1064
|
+
}
|
|
1018
1065
|
const consumes = consumeStems.map((stem) => parseConsume(stem));
|
|
1019
1066
|
const cadence = j.cadence ?? DEFAULTS.cadence;
|
|
1020
1067
|
const step = {
|
|
@@ -1055,6 +1102,10 @@ function synthesizeJudgeSteps(producerStepName, pat, producerConsumeStems, produ
|
|
|
1055
1102
|
step.command = j.command;
|
|
1056
1103
|
if (j.spec !== undefined)
|
|
1057
1104
|
step.spec = j.spec;
|
|
1105
|
+
if (workdir !== undefined)
|
|
1106
|
+
step.workdir = workdir;
|
|
1107
|
+
if (workdirFrom !== undefined)
|
|
1108
|
+
step.workdirFrom = workdirFrom;
|
|
1058
1109
|
if (j.modifiers !== undefined)
|
|
1059
1110
|
step.judgeModifiers = [...j.modifiers];
|
|
1060
1111
|
return step;
|
|
@@ -1243,7 +1294,7 @@ function buildStep(rl, i, baseDir) {
|
|
|
1243
1294
|
}
|
|
1244
1295
|
}
|
|
1245
1296
|
const producerConsumeStems = consumes.map((c) => c.stem);
|
|
1246
|
-
const judgeSteps = producesPatterns.flatMap((p) => synthesizeJudgeSteps(name, p, producerConsumeStems, step.x, step.capabilities));
|
|
1297
|
+
const judgeSteps = producesPatterns.flatMap((p) => synthesizeJudgeSteps(name, p, producerConsumeStems, step.x, step.capabilities, step.workdir, step.workdirFrom));
|
|
1247
1298
|
return [step, ...judgeSteps];
|
|
1248
1299
|
}
|
|
1249
1300
|
// ---- validation --------------------------------------------------------------
|
package/dist/src/types.d.ts
CHANGED
|
@@ -485,6 +485,19 @@ export interface ProducePattern {
|
|
|
485
485
|
* (or additionally alongside `command`). Shape-checked as a plain map
|
|
486
486
|
* only (mirrors `x:`'s asExtension contract) — contents never read. */
|
|
487
487
|
spec?: Record<string, unknown>;
|
|
488
|
+
/** opaque location hint passed through on the judge's synthesized order.
|
|
489
|
+
* Omitted = INHERIT the producing step's `workdir`/`workdirFrom`, so a
|
|
490
|
+
* judge reads the same tree the work it judges was produced in. Mutually
|
|
491
|
+
* exclusive with workdirFrom, same as StepDef. */
|
|
492
|
+
workdir?: string;
|
|
493
|
+
/**
|
|
494
|
+
* Resolve the judge order's workdir from `<consumedStem>.<dotted.path>` in a
|
|
495
|
+
* consumed artifact value. Mutually exclusive with workdir. Omitted =
|
|
496
|
+
* INHERIT the producer's. The named stem is added to the synthesized step's
|
|
497
|
+
* consumes when it is not already there, so the value passes the engine's
|
|
498
|
+
* consume-side verification gate.
|
|
499
|
+
*/
|
|
500
|
+
workdirFrom?: string;
|
|
488
501
|
/** Routing capabilities for this judge's synthesized step. Omitted =
|
|
489
502
|
* INHERIT the producing step's `capabilities`, so a judge routes to the
|
|
490
503
|
* same grade of crew as the work it judges instead of being claimable by
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "owenloop",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.27",
|
|
4
4
|
"description": "Deterministic rails for agentic workflows. Declare steps and dependencies; the engine guarantees order, redoes what changes invalidate, and stops what keeps failing — instead of hoping the agent follows through.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "typicalday",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "owenloop",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.27",
|
|
4
4
|
"description": "Claude Code driver for owenloop — cross-harness shift and conduct skills driven by the owenloop CLI, plus one hub control-plane MCP server backing an author skill and a fallback worker, for conducting and authoring workflows against your hosted owenloop server.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Typical Day"
|