feat(config-agent): add --restore to roll back agent configs from latest backup - #129
Open
lishengzxc wants to merge 2 commits into
Open
feat(config-agent): add --restore to roll back agent configs from latest backup#129lishengzxc wants to merge 2 commits into
lishengzxc wants to merge 2 commits into
Conversation
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.
变更内容
为
bl config agent新增--restoreflag,可将 agent 配置文件还原到本命令写入前的最新备份。行为
bl config agent --agent <name> --restore:把该 agent 管理的每个配置文件还原到最新的.bak.<timestamp>备份(备份保留,可重复还原)--restore --dry-run:仅列出每个文件将使用的备份路径(无备份为null),不改文件--restore与--base-url/--region/--api-key/--key/--model互斥实现
writers/utils.ts:新增findLatestBackup()/restoreLatestBackup()(tmp + rename 原子还原);AgentDef增加configPaths()configPaths()并在write中复用,路径计算单一来源index.ts:--model从 parser 级 required 改为 validate 条件必填(仅写入模式要求)测试
vp check全绿;reference 已通过generate:reference重新生成