reducer path to strengthen too

This commit is contained in:
lda
2026-05-21 04:19:50 +07:00 Verified
parent 444b5735c1
commit d089e28c15
9 changed files with 201 additions and 38 deletions
+7 -4
View File
@@ -249,14 +249,17 @@ Reducers are a capability family, similar to reusable node specs:
- dependency-trackable
State fields reference reducers declaratively. String reducer names are accepted
as shorthand for unconfigured reducers; configured reducers use a `name` plus
JSON-compatible `config`. Workflow artifacts do not embed arbitrary Python
callables.
as shorthand for unconfigured reducers; configured reducers use a structural
`ref` plus JSON-compatible `config`. Workflow artifacts do not embed arbitrary
Python callables.
```python
StateField(
type="integer",
reducer={"name": "wf.std.modulo_add", "config": {"modulus": 10}},
reducer={
"ref": {"source": "wf.std", "capability_key": "modulo_add"},
"config": {"modulus": 10},
},
)
```