S8 unread-away: Unread of a state and a view, the away answers, the start's phase

Builds: design 47 H2 H-A-708 (1) (2), H-A-717 (DQ-54, DQ-58)
This commit is contained in:
2026-11-25 17:09:15 +01:00
parent b4f9429115
commit f0bc6a3ceb
11 changed files with 294 additions and 6 deletions
+6
View File
@@ -301,6 +301,12 @@ func ServeOn(name string, tools []Tool, in io.Reader, out io.Writer) error {
args = map[string]any{}
}
result, err := runAs(t, inFlight{caller, call, ask}, args)
// A tool's `away` fault is its result in §776's form, so it reaches the caller whole (design 47 H2 H-A-708 (2),
// H-A-717 DQ-58); any other fault is an error as before.
var away *busretry.Away
if errors.As(err, &away) {
result, err = busretry.AwayAnswer(away.Part, away.Words), nil
}
if err != nil {
c.say(map[string]any{"id": id, "result": map[string]any{"content": []map[string]any{{"type": "text", "text": err.Error()}}, "isError": true}})
return