owenloop 0.5.24 → 0.5.26

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/docs/design.md CHANGED
@@ -724,7 +724,7 @@ this version yet.
724
724
  - **Reads as OUTSTANDING for completion** — `OUTSTANDING_STATES = DEBT_STATES
725
725
  ∪ { submitted }` (§5). A workflow is not `done` while any artifact sits in
726
726
  `submitted`, even though the producer itself has no further debt.
727
- - Artifacts whose `produces` entry declares no `judges:` never enter
727
+ - Artifacts whose `produces` entry declares no active `judges:` never enter
728
728
  `submitted` — a plain commit lands `green` exactly as before. This is fully
729
729
  backward compatible: no judges declared, zero behavior change.
730
730
 
@@ -744,6 +744,8 @@ named `${producerStep}.${producedStem}.judges.${judgeName}`. Each judge step:
744
744
  - `judges: <judgedStem>` — the marker field that makes it a judge (mirrors
745
745
  `calls:`'s marker-field pattern), read by both layers:
746
746
  `eligibleFirings`/`applyOutcome` (model.ts) and `green()` (engine.ts).
747
+ - `judgeModifiers?: string[]` — the internal compiled carrier for the
748
+ authored judge's optional scope; it is not a general conditional-step key.
747
749
  - The producer step's complete parsed `x:` extension carrier is deep-cloned
748
750
  onto every synthesized judge. Judge entries do not author their own `x:`;
749
751
  inheritance happens after the producer has been fully parsed. Every judge
@@ -773,7 +775,7 @@ sign-off ledger, present only while relevant (`undefined` once an artifact is
773
775
  `green`/`rejected` cleanly, cleared on every reject/retry/fresh-submit).
774
776
 
775
777
  - **Judge approve**: `approvals[judgeName] = artifact.version`. If every
776
- declared judge name now maps to the artifact's *current* version, the
778
+ active judge name now maps to the artifact's *current* version, the
777
779
  artifact transitions `submitted → green`. Otherwise it stays `submitted`
778
780
  with a partial ledger.
779
781
  - **Judge reject**: any single reject wins immediately —
@@ -913,6 +915,7 @@ steps:
913
915
  model: strong # optional, per-judge model
914
916
  inputs: true # optional, default false — judge also
915
917
  # reads the producer's inputs (question)
918
+ modifiers: [deep] # optional exact workflow-modifier scope
916
919
  maxAttempts: 8 # optional, §6 — overrides the step default below
917
920
  # just for `report`; absent caps still inherit
918
921
  maxAttempts: 5 # producer's cap (default for every produce on this step)
@@ -933,6 +936,22 @@ steps:
933
936
  inputs, for criteria that need "what was asked for" as context.
934
937
  - `cadence:` / `maxRunsPerDay:` — optional throttles, same meaning as on
935
938
  steps; firing is event-driven (on submit), the throttles just cap the rate.
939
+ - `modifiers:` — optional non-empty set of exact workflow modifier names. The
940
+ names must be declared in the workflow's top-level `modifiers:` vocabulary.
941
+ Unscoped judges stay unconditional; a scoped judge is inactive without a
942
+ matching stored instance modifier. `activeJudgesForStem(def, stem, modifier)`
943
+ is the shared derivation used by eligibility, pending status, producer and
944
+ verdict commits, rejection, groups, terminal timing, and model checking.
945
+ Inactive judges create no order, approval ledger slot, routing receipt, or
946
+ completion debt.
947
+
948
+ When a definition binds `modifier` from a produced artifact, scoped-judge
949
+ producers must be strictly downstream of that artifact under the same exact
950
+ consume/produce matching used by routing lint. This rules out the binder itself
951
+ and sibling branches, which might commit before the stored modifier is known.
952
+ Definitions with no modifier bind remain valid: their instance modifier is
953
+ chosen at create time (or absent), and active judge orders retain ordinary
954
+ capability composition.
936
955
 
937
956
  See `examples/workflows/judged-research.yaml` for a runnable end-to-end
938
957
  example (mirrors this shape exactly, plus `examples/workflows/judges/rigor.md`
@@ -984,9 +1003,15 @@ with code `0`. A nonzero exit sends the worker's `reject` request for
984
1003
  `order.judge` and submits no receipt. A signal or machinery failure has no
985
1004
  verdict, so the worker issues neither verb and the reap path re-offers the order.
986
1005
 
987
- Command receipts may also carry a bounded JSON payload emitted by a stdout line
988
- beginning with `##owenloop:payload##`. The last marker line wins, and the 64 KiB
989
- JSON-text cap protects the runner because the runner does not buffer full stdout.
1006
+ Command receipts may also carry a bounded JSON payload, returned either by a
1007
+ stdout line beginning with `##owenloop:payload##` or by writing the JSON to the
1008
+ path the worker offers in `OWENLOOP_PAYLOAD_FILE`. The last marker line wins,
1009
+ and the marker's 64 KiB JSON-text cap protects the runner because the runner
1010
+ does not buffer full stdout. That cap is a property of the transport rather than
1011
+ of the result, which is why the file exists: it carries up to 24 MB, below the
1012
+ hub's own artifact cap. Returning a payload through both transports in one run
1013
+ is refused by name instead of resolved by precedence, because two statements of
1014
+ the result are an error in the command rather than a choice for the worker.
990
1015
  A valid plain-step payload reject is delivered BEFORE any owed receipt is
991
1016
  submitted. The hub refuses a reject from a run whose claim has closed, and a
992
1017
  step's last owed submit is what closes it — so the reverse order made every
@@ -1147,6 +1172,12 @@ at `create` time. `CheckOptions.assumeProvided` (library level, when calling
1147
1172
  library default is unchanged by the CLI change below, and is what the
1148
1173
  `modelCheck` unit tests calling it directly still rely on.
1149
1174
 
1175
+ `CheckOptions.modifier` selects one concrete stored-modifier variant for the
1176
+ pure checker. Call `modelCheck(def, { modifier: 'deep', assumeProvided: true })`
1177
+ for each declared variant; inactive synthesized judge steps are omitted from
1178
+ that variant's dead/unreached accounting, while active judges are checked
1179
+ normally.
1180
+
1150
1181
  `owenloop check` (the CLI command), however, now defaults to
1151
1182
  `assumeProvided: true` — seedOwed inputs are seeded green by default,
1152
1183
  modeling "the operator already ran `provide` at `create`." This dissolves
package/docs/routing.md CHANGED
@@ -564,8 +564,9 @@ from the run's stored value again — whatever the last accepted bind left there
564
564
  accepted artifact value is the whole `CommandReceipt`. The short form
565
565
  `bind: modifier` is shorthand for `{to: modifier, from: modifier}`. A
566
566
  `CommandReceipt` has no top-level `modifier` key, so that derived path does
567
- not resolve and the submit is refused. Have the command emit a payload marker —
568
- `##owenloop:payload##{"value":"deep"}` — and bind `from: payload.value`.
567
+ not resolve and the submit is refused. Have the command return a payload —
568
+ either the marker `##owenloop:payload##{"value":"deep"}` on stdout or the same
569
+ JSON written to `$OWENLOOP_PAYLOAD_FILE` — and bind `from: payload.value`.
569
570
 
570
571
  > **Not shipped.** The routing plan also calls for a hub-side routing alert of
571
572
  > kind `modifier-changed`, raised on each sync so an operator sees it. It exists
@@ -379,7 +379,10 @@ implemented at the consuming driver boundary and never delegated to the hub.
379
379
 
380
380
  ## Command payload and worker reject contracts
381
381
 
382
- A command worker may emit one payload marker line on stdout:
382
+ A command worker returns a payload through one of two transports, and the
383
+ receipt records exactly one of `payload` or `payloadError` either way.
384
+
385
+ The first is a marker line on stdout:
383
386
 
384
387
  ```text
385
388
  ##owenloop:payload## {"...json..."}
@@ -390,6 +393,24 @@ beginning of the line. A marker in the middle of a line is not a match. The JSON
390
393
  text after the marker is capped at 64 KiB. A missing marker leaves `payload`
391
394
  out of the `CommandReceipt`; malformed or over-cap JSON produces
392
395
  `payloadError` and no `payload`, while leaving the command exit code unchanged.
396
+
397
+ The second is a file. The worker sets `OWENLOOP_PAYLOAD_FILE` on every command
398
+ spawn to an absolute path inside a private `0700` directory it creates and
399
+ removes around the command's lifetime, and the command may write its JSON there
400
+ instead. The file's size is taken from the open descriptor before any bytes are
401
+ read and is capped at 24 MB, which is below the hub's artifact cap so that a
402
+ payload the worker accepts is one the hub can store. A path that does not exist,
403
+ holds nothing, or holds only whitespace is read as an absent payload — that is
404
+ what keeps a marker-only command working with the variable set. Anything at the
405
+ path that is not a regular file, and any read or parse failure, produces
406
+ `payloadError` and no `payload`. The worker opens the path without following
407
+ symbolic links and without blocking, so a path replaced mid-run cannot stall it.
408
+
409
+ Supplying both transports in one run is a refusal, not a precedence rule: the
410
+ receipt carries a `payloadError` naming the conflict and both byte counts, and
411
+ no `payload`. A definition whose command writes the file must declare the
412
+ `command-payload-file.v1` runtime feature, because an older worker leaves the
413
+ variable unset and the payload is then written nowhere without any error.
393
414
  When the hub supplies authoritative output-version metadata and the driver can
394
415
  sign, the parsed payload is part of the receipt value covered by the DSSE
395
416
  submission proof. Current successful producer command receipts are unsigned
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owenloop",
3
- "version": "0.5.24",
3
+ "version": "0.5.26",
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.24",
3
+ "version": "0.5.26",
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"
@@ -7,7 +7,7 @@
7
7
  "mcp"
8
8
  ],
9
9
  "env": {
10
- "OWENLOOP_PLUGIN_VERSION": "0.5.24"
10
+ "OWENLOOP_PLUGIN_VERSION": "0.5.26"
11
11
  }
12
12
  }
13
13
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owenloop",
3
- "version": "0.5.24",
3
+ "version": "0.5.26",
4
4
  "description": "Codex plugin for the owenloop workflow engine.",
5
5
  "skills": "./skills/",
6
6
  "mcpServers": "./.mcp.json"
@@ -6,7 +6,7 @@
6
6
  "mcp"
7
7
  ],
8
8
  "env": {
9
- "OWENLOOP_PLUGIN_VERSION": "0.5.24"
9
+ "OWENLOOP_PLUGIN_VERSION": "0.5.26"
10
10
  },
11
11
  "env_vars": [
12
12
  "HOME",