refactor: remove the legacy agent-core v1 package - #3542
Open
sailist wants to merge 2 commits into
Open
Conversation
|
Delete packages/agent-core (v1 engine) and migrate node-sdk fully onto agent-core-v2: - node-sdk owns its public contract (error protocol, KimiConfig schema and file IO, process-global logging facade, telemetry client interface); event and interaction types re-export from @moonshot-ai/protocol or agent-core-v2 - createKimiHarness is now the single harness factory, backed by the v2 client; the v1 SDKRpcClient is deleted - CLI and vscode run agent-core-v2 unconditionally; KIMI_CODE_LEGACY_FLAG and useAgentCoreV1 are removed - the wire.jsonl replay fold moves into agent-core-v2's replayBuilder (foldWireRecords), and the v2 journal now persists tool-call display so replay restores diff/todo displays - TUI engineV2 branches collapse to the v2 path
sailist
force-pushed
the
refact-119-09-01-remove-agent-core-v1
branch
from
September 4, 2026 08:32
4f1cdf5 to
da11a1c
Compare
commit: |
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.
Related Issue
Internal refactoring — no linked issue.
Problem
The repository carried two generations of the agent engine:
packages/agent-core(v1, half-retired) andpackages/agent-core-v2(the engine behind kap-server, klient, the CLI, and the VS Code extension). v2 was already the default everywhere, but v1 could not be deleted becausepackages/node-sdkstill shipped a live v1 client (SDKRpcClientconstructingKimiCorein-process) and v1-sourced public types, and the CLI / VS Code extension kept legacy engine switches (KIMI_CODE_LEGACY_FLAG,useAgentCoreV1). Maintaining both generations blocked consolidating the SDK and tooling on v2.What changed
packages/agent-core(the whole v1 package) and every remaining reference: workspace/nix manifests, tsdown/vitest/api-extractor aliases, tsconfig includes, docker e2e mounts, the v2 import-boundary guard's v1 rule, and explanatory docs.KimiConfigschema + config file IO, process-global logging facade, telemetry client interface); event and interaction types re-export from@moonshot-ai/protocolor agent-core-v2 with shapes unchanged for consumers.createKimiHarnessis the single harness factory, backed by the v2 client; the v1SDKRpcClientis deleted.run-shell,run-prompt, subcommands, upgrade, login);KIMI_CODE_LEGACY_FLAGand vscode'suseAgentCoreV1are removed, and the TUI'sengineV2branches collapse to the v2 path.foldWireRecordsinagent/replayBuilder) instead of borrowing a throwaway v1Agent; the v2 journal now persists tool-calldisplay, so diff/todo displays survive session resume (previously lost on the v2 path).Checklist
/approve). — internal refactoring, no issue.gen-changesetsskill, or this PR needs no changeset. — no user-visible changelog entry needed.gen-docsskill, or this PR needs no doc update. — doc updates included (env-vars, config-files, plugins, AGENTS.md, CONTRIBUTING).