Fix stack 09 (breaking): open runtime-kind + async lifecycle in protocol#33
Merged
ebarti merged 1 commit intoJul 2, 2026
Conversation
c690cce to
f61ce9e
Compare
1fa35d3 to
61c32c4
Compare
f61ce9e to
dd94de4
Compare
61c32c4 to
b3da251
Compare
dd94de4 to
87d0229
Compare
b3da251 to
23c6d0c
Compare
…o protocol BREAKING: widens AgentRuntimeKind and the AgentRuntime protocol surface. - AgentRuntimeKind.coerce now returns a namespaced string for values that are not built-in members (instead of raising), so a third party can register and dispatch a 4th runtime kind (e.g. 'x-myorg-agent') without forking the enum. Blank values still raise. Adds runtime_kind_value() for the wire form; kind fields on RuntimeAvailability, the typed errors, and the registry are now AgentRuntimeKind | str, and the registry keys/kinds() accept strings. - AgentRuntime protocol now declares aclose(), __aenter__, __aexit__ (the reuse adapters already had them; the flagship example previously reached for them via getattr). kind is a read-only property so adapters may narrow it. Both fake runtimes gained no-op lifecycle methods to stay protocol-conformant. Refs REVIEW.md §5.1, §5.2.
87d0229 to
ea010d9
Compare
23c6d0c to
f6537d5
Compare
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.
Stacked review-fix PR 9/N (base:
review-fixes/08-vendor-drift). Breaking API change (pre-1.0, alpha).REVIEW.md §5.1, §5.2 — the extensibility linchpins:
AgentRuntimeKind.coercenow returns a namespaced string for non-built-in values instead of raising, so a 4th runtime can be registered/dispatched (registry.register("x-myorg-agent", factory)) without forking the enum. Addsruntime_kind_value()for the wire form;kindfields onRuntimeAvailability, the typed errors, and the registry areAgentRuntimeKind | str.AgentRuntimenow declaresaclose(),__aenter__,__aexit__(the reuse adapters already implemented them; the example previously usedgetattrto find them).kindis a read-only property so adapters may narrow it; both fakes gained no-op lifecycle methods.Tests: namespaced-kind registration, lenient/strict
coerce, fake protocol conformance with lifecycle. Full suite 173 passed / 12 skipped; ruff + mypy strict clean.