mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 10:45:59 -10:00
Coordinator, which wraps an executor agent with a planner, moves to internal/runtime/coordinator. Nothing in the agent's own loop referenced it; it was a client living inside the package it drives, reaching into the executor's fields. It now drives the executor through exported agent methods, collected in agent/coordination.go: ModelRef, ProviderName, ToolSchemas, MarkExecutorHandoff, WithTurnPreferences and MaxStepsPauseOf. Helpers it shared with the loop are exported by rename: UserImages, NormalizePlannerDecision, WithRunStepLimit, IsToolLoopPause, TrackPublishedHostStream, PlanningPhase, PlanContract, SummaryTagOpen and SummaryTagClose. Runner and PlannerPlanApprover stay in agent, since control consumes them as the agent's contract. Coordinator tests moved with it, and so did the agent tests that were really coordinator tests. The one test of an agent message moved back. The planner-sink audit check is its own test now. Test helpers used on both sides are copied, since neither test binary may import the other. Baseline: coordinator.go and coordinator_test.go carry their essay and orphan debt unchanged under the new path (-allow-widen); totals are unchanged.
22 lines
459 B
Go
22 lines
459 B
Go
package agent
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestExecutorHandoffRetryMessageKeepsUserChoicesInteractive(t *testing.T) {
|
|
msg := executorHandoffRetryMessage()
|
|
lower := strings.ToLower(msg)
|
|
for _, want := range []string{
|
|
"ask tool",
|
|
"wait for its tool result",
|
|
"do not ask in prose",
|
|
"do not claim the user answered",
|
|
} {
|
|
if !strings.Contains(lower, want) {
|
|
t.Fatalf("executorHandoffRetryMessage() missing %q:\n%s", want, msg)
|
|
}
|
|
}
|
|
}
|