C1c-1: the three build seats' verb output answers a run's answer in chunks

The part build-step gains the verb `output` (the ask and the call in, the ask and the chunk count out, marked chunks, read by the
askers of a run), and the fields output and output-object of step-ended name the run's answer inline or as an object the holder
keeps. The three seats' fixtures carry the verb; the generated Go and TypeScript follow.

Builds: design 47 G A-254, A-139, §712, §354

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
2026-11-12 09:34:48 +01:00
parent 6cbaa84c52
commit f06c9cf5fd
22 changed files with 243 additions and 17 deletions
@@ -21,6 +21,7 @@ const (
VerbDrop = "drop"
VerbKeptArtifact = "kept-artifact"
VerbSteps = "steps"
VerbOutput = "output"
)
const (
@@ -40,7 +41,7 @@ const (
// Verbs is every verb the seat serves, in its definition's order: a new copy each call.
func Verbs() []string {
return []string{VerbCurrent, VerbPause, VerbResume, VerbDrop, VerbKeptArtifact, VerbSteps}
return []string{VerbCurrent, VerbPause, VerbResume, VerbDrop, VerbKeptArtifact, VerbSteps, VerbOutput}
}
// Events is every event published on the seat's subject: a new copy each call.
@@ -802,9 +803,9 @@ type StepEnded struct {
Node string `json:"node"`
// never passed for a step that ran nothing
Outcome string `json:"outcome"`
// the step's output when it fits the message
// the run's answer (its program's standard output's last line) when it fits the event (design 47 G A-254)
Output string `json:"output,omitempty"`
// the output's object in the sender's sent store, when over the per-message limit (ADR 0666 section 16)
// the name of the object that holds the run's answer, kept by the build seat's holder, when the answer is over what the event carries (design 47 G A-254); read through the verb output
OutputObject string `json:"output-object,omitempty"`
Pipeline string `json:"pipeline,omitempty"`
Rerun bool `json:"rerun,omitempty"`
@@ -1062,6 +1063,22 @@ type StepsAnswer struct {
Steps []DetectedStep `json:"steps,omitempty"`
}
// OutputInput is what output takes.
type OutputInput struct {
// the ask's id, the `output-object` of its step-ended naming it
Ask string `json:"ask"`
// 128 random bits the caller chooses: the subject token of this send's chunks and acknowledgements
Call string `json:"call"`
}
// OutputAnswer is what output answers.
type OutputAnswer struct {
// the ask's id
Ask string `json:"ask"`
// how many chunks are sent; 0 when this node keeps no answer of that ask
Chunks int64 `json:"chunks"`
}
// DeliveryAccept is the body of delivery.
type DeliveryAccept = StepAsk
@@ -107,6 +107,10 @@ func TestFixtures(t *testing.T) {
decode: func(b []byte) (any, error) { var v StepsAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "steps answers a drop that the hand-act log refused", subject: "", given: "{\"error\":\"the hand-act log refused: nothing was deleted\"}", wire: "{\"error\":\"the hand-act log refused: nothing was deleted\"}",
decode: func(b []byte) (any, error) { var v StepsAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "output asks a run's answer by its ask", subject: "", given: "{\"ask\":\"m2kx9a1b3c4d5f\",\"call\":\"0123456789abcdef0123456789abcdef\"}", wire: "{\"ask\":\"m2kx9a1b3c4d5f\",\"call\":\"0123456789abcdef0123456789abcdef\"}",
decode: func(b []byte) (any, error) { var v OutputInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "output answers how many chunks carry the answer", subject: "", given: "{\"ask\":\"m2kx9a1b3c4d5f\",\"chunks\":3}", wire: "{\"ask\":\"m2kx9a1b3c4d5f\",\"chunks\":3}",
decode: func(b []byte) (any, error) { var v OutputAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
}
for _, c := range cases {
v, err := c.decode([]byte(c.given))