Skip to content

Make Turn one interface - #516

Merged
SaladDay merged 1 commit into
aos/cutoverfrom
aos/r3-turn
Oct 7, 2026
Merged

SaladDay merged 1 commit into
aos/cutoverfrom
aos/r3-turn

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

agent.Turn becomes one interface: Cancel, CancellationOutcome, SteerWithReceipt, SubmitFunctionResult and AwaitSettlement. An operation an adapter does not support returns agent.ErrUnsupportedOperation, and the capability declaration decides whether the Runtime calls it.

  • Deletes agent.Session, DurableSteerer, Steerer and FunctionResultSubmitter, the adapters' Steer methods and agent/testdata/onboarding.
  • Deletes the Router's session.(agent.Steerer) and session.(agent.FunctionResultSubmitter) type assertions and their contract_violation fallback.
  • Deletes PromptSteerPayload.DurableReceipt, Core's producer and the non-durable steering branch. Every steer is durable.
  • Each adapter's contracts.go asserts agent.Executor and agent.Turn only; contracttest no longer asserts the pieces.
  • harness-onboarding.md and runtime-protocol.md (en + zh) describe the one interface and durable-only steering.

proto.Version is unchanged; the final merge bumps it once. Net −236 lines.

Checks: go build ./..., go vet, focused tests for proto, daemon agent/..., dispatch, cli, agenthost, Core execution and runtimegateway; darwin and windows daemon builds; make check-names check-docs check-ci. Coordinator review (small Runtime–Harness lane).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@SaladDay
SaladDay merged commit e2012b1 into aos/cutover Oct 7, 2026
@SaladDay
SaladDay deleted the aos/r3-turn branch October 7, 2026 17:57
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant