You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Internal follow-up to the recent human-layer review; no external issue.
Problem
Several names introduced or changed in the recent human-layer refactors hide the owning concept or lifecycle. In particular, protocol bindings were called variants, recovery messages did not identify their attempt role, and credential factories were named like credential values. These names make callers read implementation details before they can understand the data flow.
What changed
Rename ProtocolVariant to ProtocolBinding, with defaultBinding and bindingFor at the provider boundary.
Rename ProtocolTraitMap to ProtocolTraitsByName and expose the clearer generic ProtocolTraitFor<N> to preserve the protocol-to-trait relationship in adapter types.
Rename turn.failure.triaged to turn.failure.classified and recoveryMessages to attemptMessageOverride.
Rename the recovery side-effect hook from prepare to beforeRetry.
Rename credential factories to createStaticCredentialProvider and createOAuthCredentialProvider, and CredentialTokenSource to AccessTokenResolver.
Update all affected internal consumers, tests, examples, and the bilingual LLM module guide.
This intentionally does not rename inherited names such as LlmInput, LlmEvent, TraitContext, entries, vertexai, or store.changed.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
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
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.
Related Issue
Internal follow-up to the recent human-layer review; no external issue.
Problem
Several names introduced or changed in the recent human-layer refactors hide the owning concept or lifecycle. In particular, protocol bindings were called variants, recovery messages did not identify their attempt role, and credential factories were named like credential values. These names make callers read implementation details before they can understand the data flow.
What changed
ProtocolVarianttoProtocolBinding, withdefaultBindingandbindingForat the provider boundary.ProtocolTraitMaptoProtocolTraitsByNameand expose the clearer genericProtocolTraitFor<N>to preserve the protocol-to-trait relationship in adapter types.turn.failure.triagedtoturn.failure.classifiedandrecoveryMessagestoattemptMessageOverride.preparetobeforeRetry.createStaticCredentialProviderandcreateOAuthCredentialProvider, andCredentialTokenSourcetoAccessTokenResolver.This intentionally does not rename inherited names such as
LlmInput,LlmEvent,TraitContext,entries,vertexai, orstore.changed.Validation
pnpm --filter @moonshot-ai/agent-core-v2 typecheckpnpm --filter @moonshot-ai/klient typecheckpnpm --filter @moonshot-ai/agent-core-v2 lint:importspnpm lint: no errors; existing repository warnings remainNo changeset: this is an internal naming refactor with no user-visible behavior change.
Checklist