Skip to content

refactor(agent-core-v2): clarify human-layer names - #3727

Draft
7Sageer wants to merge 1 commit into
mainfrom
codex/rename-human-names
Draft

refactor(agent-core-v2): clarify human-layer names#3727
7Sageer wants to merge 1 commit into
mainfrom
codex/rename-human-names

Conversation

@7Sageer

@7Sageer 7Sageer commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

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

  • 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.

Validation

  • pnpm --filter @moonshot-ai/agent-core-v2 typecheck
  • pnpm --filter @moonshot-ai/klient typecheck
  • pnpm --filter @moonshot-ai/agent-core-v2 lint:imports
  • Targeted Vitest: 6 files, 171 tests passed
  • pnpm lint: no errors; existing repository warnings remain

No changeset: this is an internal naming refactor with no user-visible behavior change.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the relevant review context.
  • I have added/updated tests for the renamed contracts.
  • Ran gen-changesets skill; no changeset is needed.
  • Ran gen-docs skill; updated the internal bilingual LLM design guide.

@changeset-bot

changeset-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4d336a9

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

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@7Hanrui

7Hanrui commented Sep 11, 2026

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 4d336a93f9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

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.

2 participants