interrupt to get the same treatment too!
This commit is contained in:
@@ -79,6 +79,12 @@ dump only canonical `input` and `output` bindings. `wf_authoring` exposes the
|
||||
same canonical binding lists and keeps `in_map`, `input_values`, and `out_map`
|
||||
only as deprecated Python-builder sugar that compiles into canonical bindings.
|
||||
|
||||
Interrupts follow the same pattern with different field names: `request` uses
|
||||
canonical input bindings to build the public interrupt payload, and `resume`
|
||||
uses canonical output bindings to write resume payload fields back into state.
|
||||
Legacy interrupt `request_map` and `out_map` inputs are accepted only as
|
||||
parse compatibility and should not be written by new plans.
|
||||
|
||||
## Explicitness Rules
|
||||
|
||||
### Node-local writes must not overlap
|
||||
|
||||
@@ -150,16 +150,18 @@ metadata at runtime without becoming a declared schema field.
|
||||
Current core interrupt semantics are node-level. An `InterruptNode` has:
|
||||
|
||||
- `kind`
|
||||
- `request_map`, mapping state/input/context paths to public interrupt payload
|
||||
fields
|
||||
- `out_map`, mapping resume payload fields back into state
|
||||
- `request`, a canonical input-binding list mapping state/input/context paths
|
||||
or literal values to public interrupt payload fields
|
||||
- `resume`, a canonical output-binding list mapping resume payload fields back
|
||||
into workflow state
|
||||
- declared resume `outcomes`
|
||||
|
||||
That means an artifact can document interrupt boundaries by scanning its
|
||||
declarative plan for interrupt nodes and deriving their request/resume payload
|
||||
schemas from the maps and workflow state/input schemas. It should not need to
|
||||
store unrelated child graph internals just to describe the public interrupt
|
||||
points.
|
||||
schemas from the bindings and workflow state/input schemas. Legacy
|
||||
`request_map` and `out_map` inputs are parse-only compatibility shapes; saved
|
||||
artifacts should write `request` and `resume`. They should not need to store
|
||||
unrelated child graph internals just to describe the public interrupt points.
|
||||
|
||||
## Composition Rule
|
||||
|
||||
|
||||
+18
-6
@@ -296,17 +296,29 @@ Declares an interrupting step.
|
||||
{
|
||||
"interrupt": {
|
||||
"kind": "input",
|
||||
"request": {
|
||||
"state.question": "question"
|
||||
},
|
||||
"resume": {
|
||||
"answer": "state.answer"
|
||||
},
|
||||
"request": [
|
||||
{
|
||||
"target": {"root": "local", "parts": ["question"]},
|
||||
"path": {"root": "state", "parts": ["question"]}
|
||||
}
|
||||
],
|
||||
"resume": [
|
||||
{
|
||||
"source": {"root": "local", "parts": ["answer"]},
|
||||
"target": {"root": "state", "parts": ["answer"]}
|
||||
}
|
||||
],
|
||||
"outcomes": ["resumed", "cancelled"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Draft interrupts use the same binding shapes as core interrupt nodes:
|
||||
`request` builds the public interrupt payload, while `resume` maps the payload
|
||||
provided on resume back into workflow state. Older map-shaped `request` and
|
||||
`resume` values are accepted only as parse compatibility and dump back to the
|
||||
canonical list shape.
|
||||
|
||||
Saved interrupting artifacts are still limited in the current execution
|
||||
surface. If a deployment reports `interrupting_artifact_unsupported`, that is a
|
||||
known platform limitation rather than a draft bug.
|
||||
|
||||
Reference in New Issue
Block a user