Give each correction repair branch its own outcome

This commit is contained in:
2026-11-16 14:36:07 +00:00
parent a0c70e8dce
commit e2710d869e
11 changed files with 309 additions and 233 deletions

View File

@@ -3,6 +3,7 @@ package llm
import (
"context"
"encoding/json"
"fmt"
"gitea.maximumdirect.net/eric/audita/v3/internal/framework/structuredoutput"
pk "go.maximumdirect.net/promptkit"
@@ -17,6 +18,9 @@ func (c *RoleClient) Coordinate(ctx context.Context, start *structuredoutput.Exc
if start != nil {
exchange, _ = start.State.(*pk.Exchange)
}
if exchange == nil {
return false, classifiedFailure(ctx, fmt.Errorf("%w: repair exchange is unavailable", pk.ErrInvalidRequest), nil)
}
var pending *pendingCall
result, err := c.runtime.Engine.Coordinate(ctx, pk.CoordinateRequest{
Start: exchange, AdditionalTurns: budget, Observer: c.hooks.OnEvent,