Repository navigation
Make Turn one interface - #516
Merged
Merged
Conversation
agent.Turn is now the single interface the Router calls on a running turn: Cancel, CancellationOutcome, SteerWithReceipt, SubmitFunctionResult and AwaitSettlement. Session, DurableSteerer, Steerer and FunctionResultSubmitter are deleted, so the Router no longer discovers support through type assertions. An adapter that cannot perform an operation returns agent.ErrUnsupportedOperation, and the admitted capability declaration decides before the Router calls it. Every steer is durable. Core always sent durable_receipt=true, so the field, its producer in execution/delivery.go and the Router's non-durable branch (Steerer.Steer under a call timeout) are deleted, along with each adapter's Steer method and the onboarding fixture's. SteerWithReceipt always reports the write callback; the dispatch session.(agent.Steerer) and session.(agent.FunctionResultSubmitter) assertions and their contract_violation fallback are gone. Each adapter's contracts.go asserts only agent.Executor and agent.Turn, and the stray per-file assertions are removed. contracttest drives SteerWithReceipt directly. Test fakes implement the full Turn; durable_only_test.go tested the deleted field and is removed. harness-onboarding.md and runtime-protocol.md, with their zh translations, describe the one interface and durable-only steering. proto.Version is unchanged; the final merge bumps it.
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.
agent.Turnbecomes one interface:Cancel,CancellationOutcome,SteerWithReceipt,SubmitFunctionResultandAwaitSettlement. An operation an adapter does not support returnsagent.ErrUnsupportedOperation, and the capability declaration decides whether the Runtime calls it.agent.Session,DurableSteerer,SteererandFunctionResultSubmitter, the adapters'Steermethods andagent/testdata/onboarding.session.(agent.Steerer)andsession.(agent.FunctionResultSubmitter)type assertions and theircontract_violationfallback.PromptSteerPayload.DurableReceipt, Core's producer and the non-durable steering branch. Every steer is durable.contracts.goassertsagent.Executorandagent.Turnonly;contracttestno longer asserts the pieces.harness-onboarding.mdandruntime-protocol.md(en + zh) describe the one interface and durable-only steering.proto.Versionis unchanged; the final merge bumps it once. Net −236 lines.Checks:
go build ./...,go vet, focused tests forproto, daemonagent/...,dispatch,cli,agenthost, Coreexecutionandruntimegateway; darwin and windows daemon builds;make check-names check-docs check-ci. Coordinator review (small Runtime–Harness lane).Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.