Files
archie/examples/workflows/firewall-contain.yaml
T
sam 3c32b63066 feat(workflow): declared workflow outputs for wait:true callers
A workflow declares named, typed outputs beside its inputs
(task.WorkflowInterface.Outputs). A run writes each one once through a
capture tool named after the output, or from a deterministic Go stage via
TaskContext.WriteOutput; the finish write persists them on tasks.outputs
before the outcome transition. A wait:true caller receives its successful
callee's outputs through WorkflowCallStatus and publishes one as its own
through a call step's outputs assignment.

Build authority: docs/prds/workflow-call-outputs.md.

- save time: WorkflowInterface.Validate checks output names and types;
  checkCallOutputs checks a call's assignment against both declarations
  and refuses outputs over a wait:false call.
- run time: undeclared, mistyped and required-but-missing values park the
  run; published callee values are re-checked against the caller's type.
- storage/wire: tasks.outputs (goose 0024), reset by each claim so the set
  is attempt-scoped; an encoded set past the structured-payload bound is
  refused, not clipped. Task.outputs_json and
  WorkflowCallStatusResponse.outputs_json carry it; task.Caller keeps its
  two methods.
- examples: firewall-contain calls firewall-investigate and publishes its
  summary as its own output.
2026-10-02 02:09:03 +10:00

28 lines
1.1 KiB
YAML

# The containment workflow a firewall-investigate run calls:
# firewall-investigate (workflow.call, wait: true) hands its findings upward
# from its declared summary, and this workflow's own agent stage decides and
# records the containment as its own declared outputs. Paste it into the
# dashboard's workflow definitions alongside firewall-investigate
# (docs/prds/workflow-call-outputs.md).
id: firewall-contain
repository: none
profile: network-investigator
inputs:
src_ip: { type: string, required: true }
outputs:
contained: { type: bool, required: true }
summary: { type: string }
steps:
- type: workflow.call
settings:
workflow: firewall-investigate
wait: true
inputs: { src_ip: "inputs.src_ip" }
outputs: { summary: "outputs.summary" }
- type: agent.run
settings:
mission: >-
Using the investigation summary the called workflow returned, decide
whether the source address in the inputs should be contained. Write
your decision with the contained tool, and a one-line rationale with
the summary tool.