Repository navigation
feat(llm): add bounded direct and tool turn runner - #107
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Built-in model calls can now select a legal move through a reusable turn runner. Direct mode validates the action/reasoning object; tools mode offers current state, move selection, and only the planning assists allowed for the seat. The host binds planning to the same authorized service operations used by MCP and commits the selected move separately with a turn precondition.
Sessions preserve the immutable briefing, tool definitions, and signed conversation prefix. Reports retain every request/response, tool result, failed attempt, usage class, and elapsed time. Refusals, invalid moves, and invalid formats consume configured retries. Output tokens are capped across the entire move, the deadline includes planning calls, and sixteen provider calls bound endless tool loops. A tool batch selects at most one move and answers all remaining tool IDs. Transport/budget failures never silently retry or choose fallback actions.
Validation: all 27 provider/runner tests pass, including 12 scripted turn scenarios for recovery/exhaustion, signed-history round trips, forbidden assists, forged target fields, multiple moves, output/time limits, empty refusal completions, accounting, and uncertain provider failures. Clippy with warnings denied, formatting, and dependency-boundary checks pass.
This adds the player execution layer. Durable call reservations/journals and server seat scheduling remain a separate integration change; no paid model calls were made.
SemVer: additive feature (minor).